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

Entitlements related APIs More...

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

Public Member Functions

 Entitlements (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http)
 
Task< GetCodeStatusResponseGetCodeStatusAsync (List< string > codes, string userId, string accessToken=null)
 Gets the status of one or more provided codes. More...
 
Task< GetDropsEntitlementsResponseGetDropsEntitlementsAsync (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< UpdateDropsEntitlementsResponseUpdateDropsEntitlementsAsync (string[] entitlementIds, FulfillmentStatus fulfillmentStatus, string accessToken)
 Updates the fulfillment status on a set of Drops entitlements, specified by their entitlement IDs. More...
 
Task< RedeemCodeResponseRedeemCodeAsync (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
 

Detailed Description

Entitlements related APIs

Constructor & Destructor Documentation

◆ Entitlements()

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

Member Function Documentation

◆ GetCodeStatusAsync()

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.

Parameters
codesThe codes to get the status of.

1-20 code parameters are allowed.

Parameters
userIdThe user account which is going to receive the entitlement associated with the code.
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns
Exceptions
BadParameterException

◆ GetDropsEntitlementsAsync()

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:

Parameters
idUnique identifier of the entitlement.
userIdA Twitch user ID to filter by.
gameIdA Twitch game ID to filter by.
afterThe cursor used to fetch the next page of data.
firstMaximum number of entitlements to return. Default: 20 Max: 1000
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns

◆ RedeemCodeAsync()

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.

Parameters
codesThe redemption codes to redeem. You may specify a maximum of 20 codes.
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns
Exceptions
BadParameterException

◆ UpdateDropsEntitlementsAsync()

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

Parameters
entitlementIdsAn array of unique identifiers of the entitlements to update. Maximum: 100.
fulfillmentStatusWhat fulfillment status to set to. Valid values are "CLAIMED" or "FULFILLED"
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: