Overview
Can be accessed using client.kraken.users on an
ApiClient
instance.
Example
const api = new ApiClient(new StaticAuthProvider(clientId, accessToken));
const user = await api.kraken.users.getUser('125328655');
Methods
blockUser(user, userToBlock)
asyncBlocks a given user with another given user.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| user | UserIdResolvable | none |
The user you want to block with. |
|
| userToBlock | UserIdResolvable | none | The user to block. |
followChannel(user, channel, notifications)
asyncFollows a given channel with a given user.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| user | UserIdResolvable | none |
The user you want to follow with. |
|
| channel | UserIdResolvable | none | The channel to follow. |
|
| notifications | boolean | none |
Whether the user will receive notifications. |
getBlockedUsers(user, page, limit)
asyncRetrieves a list of users a given user has blocked.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| user | UserIdResolvable | none |
The user you want to retrieve the block list of. |
|
| page | number | none |
The result page you want to retrieve. |
|
| limit | number | 25 |
The number of results you want to retrieve. |
getChatInfo(user)
asyncRetrieves information about the user's chat appearance and privileges.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| user | UserIdResolvable | none |
The user you want to get chat info for. |
getFollowedChannel(user, channel)
asyncGet follow data for a given user to a given channel.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| user | UserIdResolvable | none |
The user you want to retrieve follow data of. |
|
| channel | UserIdResolvable | none |
The channel you want to retrieve follow data to. |
getFollowedChannels(user, page, limit, orderBy, orderDirection)
asyncGet a list of channels a given user follows.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| user | UserIdResolvable | none |
The user you want to retrieve the follows of. |
|
| page | number | none |
The result page you want to retrieve. |
|
| limit | number | 25 |
The number of results you want to retrieve. |
|
| orderBy | string | none | The field to order by. |
|
| orderDirection | "asc" | "desc" | none |
The direction to order in - ascending or descending. |
getMe()
asyncRetrieves the user data of the currently authenticated user.
getSubscriptionData(user, toChannel)
asyncRetrieves the subscription data for a given user to a given channel.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| user | UserIdResolvable | none |
The user to retrieve the subscription data of. |
|
| toChannel | UserIdResolvable | none |
The channel you want to retrieve the subscription data to. |
getUser(userId)
asyncRetrieves the user data for the given user ID.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| userId | UserIdResolvable | none |
The user ID you want to look up. |
getUserByName(userName)
asyncRetrieves the user data for the given user name.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| userName | string | none |
The user name you want to look up. |
getUserEmotes(user)
asyncRetrieves the emotes a given user can use.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| user | UserIdResolvable | none |
The user you want to get emotes for. |
getUsersByNames(userNames)
asyncRetrieves the user data for the given user names.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| userNames | Array<string> | none |
The user names you want to look up. |
unblockUser(user, userToUnblock)
asyncUnblocks a given user with another given user.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| user | UserIdResolvable | none |
The user you want to unblock with. |
|
| userToUnblock | UserIdResolvable | none | The user to unblock. |
unfollowChannel(user, channel)
asyncUnfollows a given channel with a given user.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| user | UserIdResolvable | none |
The user you want to unfollow with. |
|
| channel | UserIdResolvable | none | The channel to unfollow. |