Overview
Methods
- addVipa
- checkVipForUsera
- checkVipForUsersa
- getAdSchedulea
- getChannelEditorsa
- getChannelFollowerCounta
- getChannelFollowersa
- getChannelFollowersPaginated
- getChannelInfoByIda
- getChannelInfoByIdBatcheda
- getChannelInfoByIdsa
- getFollowedChannelsa
- getFollowedChannelsPaginated
- getVipsa
- getVipsPaginated
- removeVipa
- snoozeNextAda
- startChannelCommerciala
- updateChannelInfoa
Can be accessed using client.channels
on an ApiClient instance.
Example
const api = new ApiClient({ authProvider }); const channel = await api.channels.getChannelInfoById('125328655');
Methods
addVip(broadcaster, user)
asyncAdds a VIP to the broadcaster’s chat room.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster that’s granting VIP status to the user. This ID must match the user ID in the access token. | |
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user to add as a VIP in the broadcaster’s chat room. |
checkVipForUser(broadcaster, user)
asyncChecks the VIP status of a user in a channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The owner of the channel to check VIP status in. | |
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user to check. |
checkVipForUsers(broadcaster, users)
asyncChecks the VIP status of a list of users in a channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The owner of the channel to check VIP status in. | |
users | UserIdResolvable []A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The users to check. |
getAdSchedule(broadcaster)
asyncGets information about the broadcaster's ad schedule.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster to get ad schedule information about. |
getChannelEditors(broadcaster)
asyncGets a list of users who have editor permissions on your channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster to retreive the editors for. |
getChannelFollowerCount(broadcaster)
asyncGets the total number of users that follow the specified broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster you want to get the number of followers of. |
getChannelFollowers(broadcaster, user, pagination)
asyncGets a list of users that follow the specified broadcaster. You can also use this endpoint to see whether a specific user follows the broadcaster.
This uses the token of the broadcaster by default. If you want to execute this in the context of another user (who has to be moderator of the channel) you can do so using user context overrides.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster you want to get a list of followers for. | |
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | An optional user to determine if this user follows the broadcaster. If specified, the response contains this user if they follow the broadcaster. If not specified, the response contains all users that follow the broadcaster. | |
pagination | HelixForwardPagination | none | see below | |
pagination.after | string | none | A cursor to get the following page of. | |
pagination.limit | number | none | The number of results per page. |
getChannelFollowersPaginated(broadcaster)
Creates a paginator for users that follow the specified broadcaster.
This uses the token of the broadcaster by default. If you want to execute this in the context of another user (who has to be moderator of the channel) you can do so using user context overrides.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster for whom you are getting a list of followers. |
getChannelInfoById(user)
asyncGets the channel data for the given user.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user you want to get channel info for. |
getChannelInfoByIdBatched(user)
asyncGets the channel data for the given user, batching multiple calls into fewer requests as the API allows.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user you want to get channel info for. |
getChannelInfoByIds(users)
asyncGets the channel data for the given users.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
users | UserIdResolvable []A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The users you want to get channel info for. |
getFollowedChannels(user, broadcaster, pagination)
asyncGets a list of broadcasters that the specified user follows. You can also use this endpoint to see whether the user follows a specific broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user that's getting a list of followed channels. This ID must match the user ID in the access token. | |
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | An optional broadcaster to determine if the user follows this broadcaster. If specified, the response contains this broadcaster if the user follows them. If not specified, the response contains all broadcasters that the user follows. | |
pagination | HelixForwardPagination | none | none |
getFollowedChannelsPaginated(user, broadcaster)
Creates a paginator for broadcasters that the specified user follows.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user that's getting a list of followed channels. The token of this user will be used to get the list of followed channels. | |
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | An optional broadcaster to determine if the user follows this broadcaster. If specified, the response contains this broadcaster if the user follows them. If not specified, the response contains all broadcasters that the user follows. |
getVips(broadcaster, pagination)
asyncGets a list of VIPs in a channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The owner of the channel to get VIPs for. | |
pagination | HelixForwardPagination | none | see below | |
pagination.after | string | none | A cursor to get the following page of. | |
pagination.limit | number | none | The number of results per page. |
getVipsPaginated(broadcaster)
Creates a paginator for VIPs in a channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The owner of the channel to get VIPs for. |
removeVip(broadcaster, user)
asyncRemoves a VIP from the broadcaster’s chat room.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster that’s removing VIP status from the user. This ID must match the user ID in the access token. | |
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user to remove as a VIP from the broadcaster’s chat room. |
snoozeNextAd(broadcaster)
asyncSnoozes the broadcaster's next ad, if a snooze is available.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster to get ad schedule information about. |
startChannelCommercial(broadcaster, length)
asyncStarts a commercial on a channel.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The broadcaster on whose channel the commercial is started. | |
length | CommercialLength The possible lengths of a channel commercial. Aliased type: 30 | 60 | 90 | 120 | 150 | 180 | none | The length of the commercial, in seconds. |
updateChannelInfo(user, data)
asyncUpdates the given user's channel data.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
user | UserIdResolvable A user ID or a user or channel object. This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name. Aliased type: string | number | UserIdResolvableType | none | The user you want to update channel info for. | |
data | HelixChannelUpdate | none | The channel info to set. |