api/profile

This file contains the readily available functions which interact with the ITSLanguage user API. Profiles contain information about a User. A User does not need a Profile.

Source:
See:

Methods

(static) create(userId, profile) → {Promise}

Source:

Link a profile to a user. If a user already has a profile, it will be overwritten.

Parameters:
Name Type Description
userId string

The Id of the user to create or overwrite a profile for.

profile Object

The profile containing information about the user.

Properties
Name Type Attributes Description
firstName string <optional>

The profile containing information about the user.

lastName string <optional>

The groups this user is part of.

infix string <optional>

The names of roles to grant the user.

gender string <optional>

The gender of the user.

birthDate string <optional>

The birthDate of the user. In the proper ISO 8601 format.

Returns:
  • The user creation promise.
Type
Promise

(static) getById(id) → {Promise}

Source:

Get a profile for a user by its Id.

Parameters:
Name Type Description
id string

The Id of the desired user.

Returns:
  • The promise for the profile of the requested user.
Type
Promise

(static) getCurrent() → {Promise}

Source:

Get profile for the current user.

Returns:
  • The current user.
Type
Promise

(inner) url(userIdopt) → {string}

Source:

The URL for the profile handler(s). According to the docs the following URL's are valid to be used for profile interaction.

  • POST/GET /users/:userId/profile.
  • GET /user/profile.
Parameters:
Name Type Attributes Description
userId string <optional>

The id of the user to interact with profile API.

Returns:
  • A composed URL to use for requests.
Type
string