Overview
Can be accessed using client.kraken.channels
on an
ApiClient
instance.
Example
const api = new ApiClient(new StaticAuthProvider(clientId, accessToken));
const channel = await api.kraken.channels.getMyChannel();
Methods
getChannel(user)
asyncRetrieves the channel for the given user.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable | none |
The user you want to retrieve the channel for. |
getChannelEditors(channel)
asyncRetrieves the list of users that have editor rights to the given channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
channel | UserIdResolvable | none |
The channel you want to retrieve the list of editors for. |
getChannelFollowers(channel, page, limit, orderDirection)
asyncRetrieves the list of followers of the given channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
channel | UserIdResolvable | none |
The channel you want to retrieve the list of followers of. |
|
page | number | none |
The result page you want to retrieve. |
|
limit | number | 25 |
The number of results you want to retrieve. |
|
orderDirection | "asc" | "desc" | none |
The direction to order in - ascending or descending. |
getChannelSubscriptionByUser(channel, byUser)
asyncRetrieves the subscription data for the given user to a given channel.
Throws if the channel doesn't have a subscription program or the user is not subscribed to it.
This method requires access to the channel. If you only have access to the user, use UserApi#getSubscriptionData instead.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
channel | UserIdResolvable | none |
The channel to check the subscription to. |
|
byUser | UserIdResolvable | none |
The user to check the subscription for. |
getChannelSubscriptionCount(channel)
asyncRetrieves the total number of subscribers for the given channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
channel | UserIdResolvable | none |
The channel you want to retrieve the number of subscribers for. |
getChannelSubscriptions(channel, page, limit, orderDirection)
asyncRetrieves the list of subscribers of the given channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
channel | UserIdResolvable | none |
The channel you want to retrieve the list of subscribers of. |
|
page | number | none |
The result page you want to retrieve. |
|
limit | number | 25 |
The number of results you want to retrieve. |
|
orderDirection | "asc" | "desc" | none |
The direction to order in - ascending or descending. |
getChannelTeams(channel)
asyncRetrieves a list of teams of the given channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
channel | UserIdResolvable | none |
The channel you want to retrieve the list of teams of. |
resetChannelStreamKey(channel)
asyncResets the given channel's stream key.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
channel | UserIdResolvable | none |
The channel to reset the stream key for. |
startChannelCommercial(channel, length)
asyncStarts a commercial in the given channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
channel | UserIdResolvable | none |
The channel to start the commercial in. |
|
length | CommercialLength | none |
The length of the commercial. |
updateChannel(channel, data)
asyncUpdates the given channel with the given data.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
channel | UserIdResolvable | none |
The channel you want to update. |
|
data | ChannelUpdateData | none | The updated channel data. |