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.
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
|
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