Overview
Methods
createCustomReward(broadcaster, data)
asyncCreates a new custom reward.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to create the reward for. |
|
data | HelixCreateCustomRewardData | none | The reward data. |
|
data.autoFulfill | boolean | none |
Whether the redemption should automatically set its status to fulfilled. |
|
data.backgroundColor | string | none |
The hex code of the background color of the reward. |
|
data.cost | number | none |
The channel points cost of the reward. |
|
data.globalCooldown | number | null | none |
The cooldown between two redemptions of the reward, in
seconds. 0 or |
|
data.isEnabled | boolean | none |
Whether the reward is enabled (shown to users). |
|
data.maxRedemptionsPerStream | number | null | none |
The maximum number of redemptions of the reward per
stream. 0 or |
|
data.maxRedemptionsPerUserPerStream | number | null | none |
The maximum number of redemptions of the reward per
stream for each user. 0 or |
|
data.prompt | string | none |
The prompt shown to users when redeeming the reward. |
|
data.title | string | none | The title of the reward. |
|
data.userInputRequired | boolean | none |
Whether the reward requires user input to be redeemed. |
deleteCustomReward(broadcaster, rewardId)
asyncDeletes a custom reward.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to delete the reward for. |
|
rewardId | string | none | The ID of the reward. |
getCustomRewardById(broadcaster, rewardId)
asyncRetrieves a custom reward by ID.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to retrieve the reward for. |
|
rewardId | string | none | The ID of the reward. |
getCustomRewards(broadcaster, onlyManageable)
asyncRetrieves all custom rewards for the given broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to retrieve the rewards for. |
|
onlyManageable | boolean | none |
Whether to only retrieve rewards that can be managed by the API. |
getCustomRewardsByIds(broadcaster, rewardIds)
asyncRetrieves custom rewards by IDs.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to retrieve the rewards for. |
|
rewardIds | Array<string> | none | The IDs of the rewards. |
getRedemptionById(broadcaster, rewardId, redemptionId)
asyncRetrieves a custom reward redemption by ID.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to retrieve the redemption for. |
|
rewardId | string | none | The ID of the reward. |
|
redemptionId | string | none | The ID of the redemption. |
getRedemptionsByIds(broadcaster, rewardId, redemptionIds)
asyncRetrieves custom reward redemptions by IDs.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to retrieve the redemptions for. |
|
rewardId | string | none | The ID of the reward. |
|
redemptionIds | Array<string> | none | The IDs of the redemptions. |
getRedemptionsForBroadcaster(broadcaster, rewardId, status, filter)
asyncRetrieves custom reward redemptions for the given broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to retrieve the redemptions for. |
|
rewardId | string | none | The ID of the reward. |
|
status |
HelixCustomRewardRedemptionStatus
The possible statuses of a custom Channel Points reward redemption.
Aliased type:
"UNFULFILLED"
|
The possible statuses of a custom
Channel Points reward redemption you
can set.
Aliased type:
"FULFILLED"
|
"CANCELED"
|
none |
The status of the redemptions to retrieve. |
|
filter | HelixPaginatedCustomRewardRedemptionFilter | none | ||
filter.after | string | none |
A cursor to get the following page of. |
|
filter.limit | string | none |
The number of results per page. |
|
filter.newestFirst | boolean | none |
Whether to put the newest redemptions first. Oldest redemptions are shown first by default. |
getRedemptionsForBroadcasterPaginated(broadcaster, rewardId, status, filter)
Creates a paginator for custom reward redemptions for the given broadcaster.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to retrieve the redemptions for. |
|
rewardId | string | none | The ID of the reward. |
|
status |
HelixCustomRewardRedemptionStatus
The possible statuses of a custom Channel Points reward redemption.
Aliased type:
"UNFULFILLED"
|
The possible statuses of a custom
Channel Points reward redemption you
can set.
Aliased type:
"FULFILLED"
|
"CANCELED"
|
none |
The status of the redemptions to retrieve. |
|
filter | HelixCustomRewardRedemptionFilter | none | ||
filter.newestFirst | boolean | none |
Whether to put the newest redemptions first. Oldest redemptions are shown first by default. |
updateCustomReward(broadcaster, rewardId, data)
asyncUpdates a custom reward.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to update the reward for. |
|
rewardId | string | none | The ID of the reward. |
|
data | HelixUpdateCustomRewardData | none | The reward data. |
updateRedemptionStatusByIds(broadcaster, rewardId, redemptionIds, status)
asyncUpdates the status of the given redemptions by IDs.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
broadcaster | UserIdResolvable | none |
The broadcaster to retrieve the redemptions for. |
|
rewardId | string | none | The ID of the reward. |
|
redemptionIds | Array<string> | none |
The IDs of the redemptions to update. |
|
status |
HelixCustomRewardRedemptionTargetStatus
The possible statuses of a custom Channel Points reward redemption you can set. Aliased type: "FULFILLED" | "CANCELED" |
none |
The status to set for the redemptions. |