TwitchLib 3.5.3
|
Entitlements related APIs More...
Public Member Functions | |
Entitlements (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http) | |
Task< GetCodeStatusResponse > | GetCodeStatusAsync (List< string > codes, string userId, string accessToken=null) |
Gets the status of one or more provided codes. More... | |
Task< GetDropsEntitlementsResponse > | GetDropsEntitlementsAsync (string id=null, string userId=null, string gameId=null, string after=null, int first=20, string accessToken=null) |
Gets a list of entitlements for a given organization that have been granted to a game, user, or both. More... | |
Task< UpdateDropsEntitlementsResponse > | UpdateDropsEntitlementsAsync (string[] entitlementIds, FulfillmentStatus fulfillmentStatus, string accessToken) |
Updates the fulfillment status on a set of Drops entitlements, specified by their entitlement IDs. More... | |
Task< RedeemCodeResponse > | RedeemCodeAsync (List< string > codes, string accessToken=null) |
Redeems one or more redemption codes. 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 |
Entitlements related APIs
TwitchLib.Api.Helix.Entitlements.Entitlements | ( | IApiSettings | settings, |
IRateLimiter | rateLimiter, | ||
IHttpCallHandler | http | ||
) |
Task< GetCodeStatusResponse > TwitchLib.Api.Helix.Entitlements.GetCodeStatusAsync | ( | List< string > | codes, |
string | userId, | ||
string | accessToken = null |
||
) |
Gets the status of one or more provided codes.
This API requires that the caller is an authenticated Twitch user.
The API is throttled to one request per second per authenticated user.
codes | The codes to get the status of. |
1-20 code parameters are allowed.
userId | The user account which is going to receive the entitlement associated with the code. |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
BadParameterException |
Task< GetDropsEntitlementsResponse > TwitchLib.Api.Helix.Entitlements.GetDropsEntitlementsAsync | ( | string | id = null , |
string | userId = null , |
||
string | gameId = null , |
||
string | after = null , |
||
int | first = 20 , |
||
string | accessToken = null |
||
) |
Gets a list of entitlements for a given organization that have been granted to a game, user, or both.
The client ID associated with the access token must have ownership of the game:
id | Unique identifier of the entitlement. |
userId | A Twitch user ID to filter by. |
gameId | A Twitch game ID to filter by. |
after | The cursor used to fetch the next page of data. |
first | Maximum number of entitlements to return. Default: 20 Max: 1000 |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task< RedeemCodeResponse > TwitchLib.Api.Helix.Entitlements.RedeemCodeAsync | ( | List< string > | codes, |
string | accessToken = null |
||
) |
Redeems one or more redemption codes.
Redeeming a code credits the user’s account with the entitlement associated with the code.
For example, a Bits reward earned when playing a game.
Rate limit: You may send at most one request per second per user.
Only client IDs approved by Twitch may redeem codes on behalf of any Twitch user account.
codes | The redemption codes to redeem. You may specify a maximum of 20 codes. |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
BadParameterException |
Task< UpdateDropsEntitlementsResponse > TwitchLib.Api.Helix.Entitlements.UpdateDropsEntitlementsAsync | ( | string[] | entitlementIds, |
FulfillmentStatus | fulfillmentStatus, | ||
string | accessToken | ||
) |
Updates the fulfillment status on a set of Drops entitlements, specified by their entitlement IDs.
The client ID associated with the access token must have ownership of the game
entitlementIds | An array of unique identifiers of the entitlements to update. Maximum: 100. |
fulfillmentStatus | What fulfillment status to set to. Valid values are "CLAIMED" or "FULFILLED" |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |