api/users

This file contains the readily available functions which interact with the ITSLanguage user API.

Source:
See:

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
Name Type Attributes Description
id string <optional>

A unique identifier. If none is given, one is generated.

firstName string

The first name of the user.

infix string

The infix of the user.

lastName string

The last name of the user.

groups Array <optional>

Groups the user resides in.

roles Array

The names of roles to grant the user.

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