TwitchLib 3.5.3
Loading...
Searching...
No Matches
TwitchLib.Api.Helix.ChannelPoints Class Reference

Channel Points related APIs More...

Inheritance diagram for TwitchLib.Api.Helix.ChannelPoints:
TwitchLib.Api.Core.ApiBase

Public Member Functions

 ChannelPoints (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http)
 
Task< CreateCustomRewardsResponseCreateCustomRewardsAsync (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< GetCustomRewardsResponseGetCustomRewardAsync (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< UpdateCustomRewardResponseUpdateCustomRewardAsync (string broadcasterId, string rewardId, UpdateCustomRewardRequest request, string accessToken=null)
 Updates a Custom Reward created on a channel. More...
 
Task< GetCustomRewardRedemptionResponseGetCustomRewardRedemptionAsync (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< UpdateRedemptionStatusResponseUpdateRedemptionStatusAsync (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
 

Detailed Description

Channel Points related APIs

Constructor & Destructor Documentation

◆ ChannelPoints()

TwitchLib.Api.Helix.ChannelPoints.ChannelPoints ( IApiSettings  settings,
IRateLimiter  rateLimiter,
IHttpCallHandler  http 
)

Member Function Documentation

◆ CreateCustomRewardsAsync()

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.

Parameters
broadcasterIdBroadcaster Id to create the reward for.

Provided broadcaster_id must match the user_id in the user OAuth token.

Parameters
request
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns

◆ DeleteCustomRewardAsync()

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.

Parameters
broadcasterIdBroadcaster Id to delete the reward from.

Provided broadcaster_id must match the user_id in the user OAuth token.

Parameters
rewardIdID of the Custom Reward to delete.

Must match a Custom Reward on broadcaster_id’s channel.

Parameters
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns

◆ GetCustomRewardAsync()

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

Parameters
broadcasterIdBroadcaster Id to get the rewards for.

Provided broadcaster_id must match the user_id in the user OAuth token.

Parameters
rewardIdsWhen used, this parameter filters the results and only returns reward objects for the Custom Rewards with matching ID. Maximum: 50
onlyManageableRewardsWhen set to true, only returns custom rewards that the calling ClientId can manage. Default: false.
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns

◆ GetCustomRewardRedemptionAsync()

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

Parameters
broadcasterIdBroadcaster Id to get the reward redemptions for.

Provided broadcaster_id must match the user_id in the user OAuth token.

Parameters
rewardIdWhen ID is not provided, this parameter returns paginated Custom Reward Redemption objects for redemptions of the Custom Reward with ID RewardId.
redemptionIdsWhen used, this param filters the results and only returns Custom Reward Redemption objects for the redemptions with matching IDs. Maximum: 50
statusWhen 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

Parameters
sortSort order of redemptions returned when getting the paginated Custom Reward Redemption objects for a reward.

One of: OLDEST, NEWEST. Default: OLDEST.

Parameters
afterCursor 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.

Parameters
firstNumber of results to be returned when getting the paginated Custom Reward Redemption objects for a reward. Limit: 50. Default: 20.
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns

◆ UpdateCustomRewardAsync()

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

Parameters
broadcasterIdBroadcaster Id to update the reward for.

Provided broadcaster_id must match the user_id in the user OAuth token.

Parameters
rewardIdID of the Custom Reward to update. Must match a Custom Reward on the channel of the Broadcaster Id.
request
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns

◆ UpdateRedemptionStatusAsync()

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

Parameters
broadcasterIdBroadcaster Id to update the reward redemptions status for.

Provided broadcaster_id must match the user_id in the user OAuth token.

Parameters
rewardIdID of the Custom Reward the redemptions to be updated are for.
redemptionIdsIDs of the Custom Reward Redemptions to update, must match a Custom Reward Redemption on BroadcasterId’s channel. Maximum: 50.
request
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns

The documentation for this class was generated from the following file: