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 | Description |
---|---|---|
user | UserIdResolvable | 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 | Description |
---|---|---|
channel | UserIdResolvable | 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 | Description |
---|---|---|
channel | UserIdResolvable | The channel you want to retrieve the list of followers of. |
page | number | The result page you want to retrieve. |
limit | number | The number of results you want to retrieve. |
orderDirection | "asc" | "desc" | 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 | Description |
---|---|---|
channel | UserIdResolvable | The channel to check the subscription to. |
byUser | UserIdResolvable | The user to check the subscription for. |
getChannelSubscriptionCount(channel)
asyncRetrieves the total number of subscribers for the given channel.
Parameter | Type | Description |
---|---|---|
channel | UserIdResolvable | 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 | Description |
---|---|---|
channel | UserIdResolvable | The channel you want to retrieve the list of subscribers of. |
page | number | The result page you want to retrieve. |
limit | number | The number of results you want to retrieve. |
orderDirection | "asc" | "desc" | The direction to order in - ascending or descending. |
getChannelTeams(channel)
asyncRetrieves a list of teams of the given channel.
Parameter | Type | Description |
---|---|---|
channel | UserIdResolvable | The channel you want to retrieve the list of teams of. |
resetChannelStreamKey(channel)
asyncResets the given channel's stream key.
Parameter | Type | Description |
---|---|---|
channel | UserIdResolvable | The channel to reset the stream key for. |
startChannelCommercial(channel, length)
asyncStarts a commercial in the given channel.
Parameter | Type | Description |
---|---|---|
channel | UserIdResolvable | The channel to start the commercial in. |
length | CommercialLength The possible lengths of a channel commercial. Aliased type: 30 | 60 | 90 | 120 | 150 | 180 | The length of the commercial. |
updateChannel(channel, data)
asyncUpdates the given channel with the given data.
Parameter | Type | Description |
---|---|---|
channel | UserIdResolvable | The channel you want to update. |
data | ChannelUpdateData | The updated channel data. |