This file contains the readily available functions which interact with the ITSLanguage user API.
Members
(inner, constant) singleUserUrl :string
- Source:
The URL for a single user handler.
Type:
- string
(inner, constant) url :string
- Source:
The URL for the user handler(s).
Type:
- string
Methods
(static) create(user) → {Promise}
- Source:
Create a new user.
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
user |
Object | The user to create. Properties
|
Returns:
- The user creation promise.
- Type
- Promise
(static) getAll(filtersopt) → {Promise}
- Source:
Get a all users.
By default all users are fetched though it is allowed to pass filters as a URLSearchParams
object.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
filters |
URLSearchParams |
<optional> |
The filters to apply to the category list. |
Throws:
-
- If the given optional filters are not an instance of
URLSearchParams.
- If the given optional filters are not an instance of
- Type
- Promise.<string>
Returns:
- The promise for the users.
- Type
- Promise
(static) getById(id) → {Promise}
- Source:
Get a single user by its ID.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
string | The ID of the desired user. |
Returns:
- The promise for the user.
- Type
- Promise
(static) getCurrent() → {Promise}
- Source:
Get the current user.
Returns:
- The current user.
- Type
- Promise