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 | Description |
---|---|---|
user | UserIdResolvable | The user you want to block with. |
userToBlock | UserIdResolvable | The user to block. |
followChannel(user, channel, notifications)
asyncFollows a given channel with a given user.
Parameter | Type | Description |
---|---|---|
user | UserIdResolvable | The user you want to follow with. |
channel | UserIdResolvable | The channel to follow. |
notifications | boolean | Whether the user will receive notifications. |
getBlockedUsers(user, page, limit)
asyncRetrieves a list of users a given user has blocked.
Parameter | Type | Description |
---|---|---|
user | UserIdResolvable | The user you want to retrieve the block list of. |
page | number | The result page you want to retrieve. |
limit | number | The number of results you want to retrieve. |
getChatInfo(user)
asyncRetrieves information about the user's chat appearance and privileges.
Parameter | Type | Description |
---|---|---|
user | UserIdResolvable | 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 | Description |
---|---|---|
user | UserIdResolvable | The user you want to retrieve follow data of. |
channel | UserIdResolvable | 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 | Description |
---|---|---|
user | UserIdResolvable | The user you want to retrieve the follows of. |
page | number | The result page you want to retrieve. |
limit | number | The number of results you want to retrieve. |
orderBy | string | The field to order by. |
orderDirection | "asc" | "desc" | The direction to order in - ascending or descending. |
getSubscriptionData(user, toChannel)
asyncRetrieves the subscription data for a given user to a given channel.
Parameter | Type | Description |
---|---|---|
user | UserIdResolvable | The user to retrieve the subscription data of. |
toChannel | UserIdResolvable | The channel you want to retrieve the subscription data to. |
getUser(userId)
asyncRetrieves the user data for the given user ID.
Parameter | Type | Description |
---|---|---|
userId | UserIdResolvable | The user ID you want to look up. |
getUserByName(userName)
asyncRetrieves the user data for the given user name.
Parameter | Type | Description |
---|---|---|
userName | string | The user name you want to look up. |
getUserEmotes(user)
asyncRetrieves the emotes a given user can use.
Parameter | Type | Description |
---|---|---|
user | UserIdResolvable | The user you want to get emotes for. |
getUsersByNames(userNames)
asyncRetrieves the user data for the given user names.
Parameter | Type | Description |
---|---|---|
userNames | Array<string> | The user names you want to look up. |
unblockUser(user, userToUnblock)
asyncUnblocks a given user with another given user.
Parameter | Type | Description |
---|---|---|
user | UserIdResolvable | The user you want to unblock with. |
userToUnblock | UserIdResolvable | The user to unblock. |
unfollowChannel(user, channel)
asyncUnfollows a given channel with a given user.
Parameter | Type | Description |
---|---|---|
user | UserIdResolvable | The user you want to unfollow with. |
channel | UserIdResolvable | The channel to unfollow. |