new UserRepository()
Methods
userForId(userId) → {LiveObject}
Get user for id.
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | The user ID of the requested user. |
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
The LiveObject instance of
UserModel
.
- Type
- LiveObject
getAllUsers(sortByopt) → {LiveCollection}
Get all users.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
sortBy |
EkoUserSortingMethod |
<optional> |
A sorting option |
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
The LiveCollection instance of user
models
.
- Type
- LiveCollection
searchUserByDisplayName(search) → {LiveCollection}
Search user by displayName.
Parameters:
Name | Type | Description |
---|---|---|
search |
String | A search query. |
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
The LiveCollection instance of user
models
.
- Type
- LiveCollection
flag(userId) → {Promise.<undefined, EkoSDKError>}
Flag a user
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | The user ID of the user to be flagged. |
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
Returns a promise.
- Type
- Promise.<undefined, EkoSDKError>
unflag(userId) → {Promise.<undefined, EkoSDKError>}
Unflag a flagged user
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | The user ID of the flagged user. |
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
Returns a promise.
- Type
- Promise.<undefined, EkoSDKError>