TwitchLib 3.5.3
|
Channel Points related APIs More...
Public Member Functions | |
ChannelPoints (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http) | |
Task< CreateCustomRewardsResponse > | CreateCustomRewardsAsync (string broadcasterId, CreateCustomRewardsRequest request, string accessToken=null) |
Creates a Custom Reward on a channel. More... | |
Task | DeleteCustomRewardAsync (string broadcasterId, string rewardId, string accessToken=null) |
Deletes a Custom Reward on a channel. More... | |
Task< GetCustomRewardsResponse > | GetCustomRewardAsync (string broadcasterId, List< string > rewardIds=null, bool onlyManageableRewards=false, string accessToken=null) |
Returns a list of Custom Reward objects for the Custom Rewards on a channel. More... | |
Task< UpdateCustomRewardResponse > | UpdateCustomRewardAsync (string broadcasterId, string rewardId, UpdateCustomRewardRequest request, string accessToken=null) |
Updates a Custom Reward created on a channel. More... | |
Task< GetCustomRewardRedemptionResponse > | GetCustomRewardRedemptionAsync (string broadcasterId, string rewardId, List< string > redemptionIds=null, string status=null, string sort=null, string after=null, string first=null, string accessToken=null) |
Returns Custom Reward Redemption objects for a Custom Reward on a channel that was created by the same ClientId. More... | |
Task< UpdateRedemptionStatusResponse > | UpdateRedemptionStatusAsync (string broadcasterId, string rewardId, List< string > redemptionIds, UpdateCustomRewardRedemptionStatusRequest request, string accessToken=null) |
Updates a Custom Reward created on a channel. More... | |
Public Member Functions inherited from TwitchLib.Api.Core.ApiBase | |
ApiBase (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http) | |
async ValueTask< string > | GetAccessTokenAsync (string accessToken=null) |
Additional Inherited Members | |
Protected Member Functions inherited from TwitchLib.Api.Core.ApiBase | |
async Task< string > | TwitchGetAsync (string resource, ApiVersion api, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null) |
async Task< T > | TwitchGetGenericAsync< T > (string resource, ApiVersion api, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null) |
async Task< T > | TwitchPatchGenericAsync< T > (string resource, ApiVersion api, string payload, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null) |
async Task< string > | TwitchPatchAsync (string resource, ApiVersion api, string payload, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null) |
async Task< KeyValuePair< int, string > > | TwitchDeleteAsync (string resource, ApiVersion api, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null) |
async Task< T > | TwitchPostGenericAsync< T > (string resource, ApiVersion api, string payload, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null) |
async Task< T > | TwitchPostGenericModelAsync< T > (string resource, ApiVersion api, RequestModel model, string accessToken=null, string clientId=null, string customBase=null) |
async Task< T > | TwitchDeleteGenericAsync< T > (string resource, ApiVersion api, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null) |
async Task< T > | TwitchPutGenericAsync< T > (string resource, ApiVersion api, string payload=null, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null) |
async Task< string > | TwitchPutAsync (string resource, ApiVersion api, string payload, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null) |
async Task< KeyValuePair< int, string > > | TwitchPostAsync (string resource, ApiVersion api, string payload, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, string clientId=null, string customBase=null) |
Task | PutBytesAsync (string url, byte[] payload) |
async Task< T > | GetGenericAsync< T > (string url, List< KeyValuePair< string, string > > getParams=null, string accessToken=null, ApiVersion api=ApiVersion.Helix, string clientId=null) |
Protected Attributes inherited from TwitchLib.Api.Core.ApiBase | |
readonly IApiSettings | Settings |
Channel Points related APIs
TwitchLib.Api.Helix.ChannelPoints.ChannelPoints | ( | IApiSettings | settings, |
IRateLimiter | rateLimiter, | ||
IHttpCallHandler | http | ||
) |
Task< CreateCustomRewardsResponse > TwitchLib.Api.Helix.ChannelPoints.CreateCustomRewardsAsync | ( | string | broadcasterId, |
CreateCustomRewardsRequest | request, | ||
string | accessToken = null |
||
) |
Creates a Custom Reward on a channel.
Required scope: channel:manage:redemptions
The maximum number of custom rewards per channel is 50, which includes both enabled and disabled rewards.
broadcasterId | Broadcaster Id to create the reward for. |
Provided broadcaster_id must match the user_id in the user OAuth token.
request | |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task TwitchLib.Api.Helix.ChannelPoints.DeleteCustomRewardAsync | ( | string | broadcasterId, |
string | rewardId, | ||
string | accessToken = null |
||
) |
Deletes a Custom Reward on a channel.
Required scope: channel:manage:redemptions
The Custom Reward specified by id must have been created by the ClientId attached to the OAuth token in order to be deleted.
Any UNFULFILLED Custom Reward Redemptions of the deleted Custom Reward will be updated to the FULFILLED status.
broadcasterId | Broadcaster Id to delete the reward from. |
Provided broadcaster_id must match the user_id in the user OAuth token.
rewardId | ID of the Custom Reward to delete. |
Must match a Custom Reward on broadcaster_id’s channel.
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task< GetCustomRewardsResponse > TwitchLib.Api.Helix.ChannelPoints.GetCustomRewardAsync | ( | string | broadcasterId, |
List< string > | rewardIds = null , |
||
bool | onlyManageableRewards = false , |
||
string | accessToken = null |
||
) |
Returns a list of Custom Reward objects for the Custom Rewards on a channel.
Required scope: channel:read:redemptions
broadcasterId | Broadcaster Id to get the rewards for. |
Provided broadcaster_id must match the user_id in the user OAuth token.
rewardIds | When used, this parameter filters the results and only returns reward objects for the Custom Rewards with matching ID. Maximum: 50 |
onlyManageableRewards | When set to true, only returns custom rewards that the calling ClientId can manage. Default: false. |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task< GetCustomRewardRedemptionResponse > TwitchLib.Api.Helix.ChannelPoints.GetCustomRewardRedemptionAsync | ( | string | broadcasterId, |
string | rewardId, | ||
List< string > | redemptionIds = null , |
||
string | status = null , |
||
string | sort = null , |
||
string | after = null , |
||
string | first = null , |
||
string | accessToken = null |
||
) |
Returns Custom Reward Redemption objects for a Custom Reward on a channel that was created by the same ClientId.
Developers only have access to get and update redemptions for the rewards created programmatically by the same ClientId.
Required scope: channel:read:redemptions
broadcasterId | Broadcaster Id to get the reward redemptions for. |
Provided broadcaster_id must match the user_id in the user OAuth token.
rewardId | When ID is not provided, this parameter returns paginated Custom Reward Redemption objects for redemptions of the Custom Reward with ID RewardId. |
redemptionIds | When used, this param filters the results and only returns Custom Reward Redemption objects for the redemptions with matching IDs. Maximum: 50 |
status | When id is not provided, this param is required and filters the paginated Custom Reward Redemption objects for redemptions with the matching status. |
Can be one of UNFULFILLED, FULFILLED or CANCELED
sort | Sort order of redemptions returned when getting the paginated Custom Reward Redemption objects for a reward. |
One of: OLDEST, NEWEST. Default: OLDEST.
after | Cursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response. |
This applies only to queries without ID. If an ID is specified, it supersedes any cursor/offset combinations.
The cursor value specified here is from the pagination response field of a prior query.
first | Number of results to be returned when getting the paginated Custom Reward Redemption objects for a reward. Limit: 50. Default: 20. |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task< UpdateCustomRewardResponse > TwitchLib.Api.Helix.ChannelPoints.UpdateCustomRewardAsync | ( | string | broadcasterId, |
string | rewardId, | ||
UpdateCustomRewardRequest | request, | ||
string | accessToken = null |
||
) |
Updates a Custom Reward created on a channel.
The Custom Reward specified by id must have been created by the ClientId attached to the user OAuth token.
Required scope: channel:manage:redemptions
broadcasterId | Broadcaster Id to update the reward for. |
Provided broadcaster_id must match the user_id in the user OAuth token.
rewardId | ID of the Custom Reward to update. Must match a Custom Reward on the channel of the Broadcaster Id. |
request | |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task< UpdateRedemptionStatusResponse > TwitchLib.Api.Helix.ChannelPoints.UpdateRedemptionStatusAsync | ( | string | broadcasterId, |
string | rewardId, | ||
List< string > | redemptionIds, | ||
UpdateCustomRewardRedemptionStatusRequest | request, | ||
string | accessToken = null |
||
) |
Updates a Custom Reward created on a channel.
The Custom Reward specified by id must have been created by the ClientId attached to the user OAuth token.
Required scope: channel:manage:redemptions
broadcasterId | Broadcaster Id to update the reward redemptions status for. |
Provided broadcaster_id must match the user_id in the user OAuth token.
rewardId | ID of the Custom Reward the redemptions to be updated are for. |
redemptionIds | IDs of the Custom Reward Redemptions to update, must match a Custom Reward Redemption on BroadcasterId’s channel. Maximum: 50. |
request | |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |