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

Bits related APIs More...

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

Public Member Functions

 Bits (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http)
 
Task< GetCheermotesResponseGetCheermotesAsync (string broadcasterId=null, string accessToken=null)
 Retrieves the list of available Cheermotes, animated emotes to which viewers can assign Bits, to cheer in chat. Cheermotes returned are available throughout Twitch, in all Bits-enabled channels. More...
 
Task< GetBitsLeaderboardResponseGetBitsLeaderboardAsync (int count=10, BitsLeaderboardPeriodEnum period=BitsLeaderboardPeriodEnum.All, DateTime? startedAt=null, string userid=null, string accessToken=null)
 Gets a ranked list of Bits leaderboard information for an authorized broadcaster. More...
 
Task< GetExtensionBitsProductsResponseGetExtensionBitsProductsAsync (bool shouldIncludeAll=false, string accessToken=null)
 Gets a list of Bits products that belongs to an Extension More...
 
Task< UpdateExtensionBitsProductResponseUpdateExtensionBitsProductAsync (ExtensionBitsProduct extensionBitsProduct, string accessToken=null)
 Add or update a Bits products that belongs to an Extension. 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

Bits related APIs

Constructor & Destructor Documentation

◆ Bits()

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

Member Function Documentation

◆ GetBitsLeaderboardAsync()

Task< GetBitsLeaderboardResponse > TwitchLib.Api.Helix.Bits.GetBitsLeaderboardAsync ( int  count = 10,
BitsLeaderboardPeriodEnum  period = BitsLeaderboardPeriodEnum.All,
DateTime?  startedAt = null,
string  userid = null,
string  accessToken = null 
)

Gets a ranked list of Bits leaderboard information for an authorized broadcaster.

Required scope: bits:read

Parameters
countNumber of results to be returned. Maximum: 100. Default: 10.
periodTime period over which data is aggregated (PST time zone). This parameter interacts with started_at. Default: "All".

"Day" – 00:00:00 on the day specified in started_at, through 00:00:00 on the following day.

"Week" – 00:00:00 on Monday of the week specified in started_at, through 00:00:00 on the following Monday.

"Month" – 00:00:00 on the first day of the month specified in started_at, through 00:00:00 on the first day of the following month.

"Year" – 00:00:00 on the first day of the year specified in started_at, through 00:00:00 on the first day of the following year.

"All" – The lifetime of the broadcaster's channel. If this is specified (or used by default), started_at is ignored.

Parameters
startedAtTimestamp for the period over which the returned data is aggregated. If this is not provided, data is aggregated over the current period; e.g., the current day/week/month/year. This value is ignored if period is "All".
useridID of the user whose results are returned; i.e., the person who paid for the Bits.

As long as count is greater than 1, the returned data includes additional users, with Bits amounts above and below the user specified by user_id.

If user_id is not provided, the endpoint returns the Bits leaderboard data across top users (subject to the value of count).

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

◆ GetCheermotesAsync()

Task< GetCheermotesResponse > TwitchLib.Api.Helix.Bits.GetCheermotesAsync ( string  broadcasterId = null,
string  accessToken = null 
)

Retrieves the list of available Cheermotes, animated emotes to which viewers can assign Bits, to cheer in chat. Cheermotes returned are available throughout Twitch, in all Bits-enabled channels.

Parameters
broadcasterIdD for the broadcaster who might own specialized Cheermotes.
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns

◆ GetExtensionBitsProductsAsync()

Task< GetExtensionBitsProductsResponse > TwitchLib.Api.Helix.Bits.GetExtensionBitsProductsAsync ( bool  shouldIncludeAll = false,
string  accessToken = null 
)

Gets a list of Bits products that belongs to an Extension

Requires App Access Token associated with the Extension client ID

Parameters
shouldIncludeAllWhether Bits products that are disabled/expired should be included in the response.
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns

◆ UpdateExtensionBitsProductAsync()

Task< UpdateExtensionBitsProductResponse > TwitchLib.Api.Helix.Bits.UpdateExtensionBitsProductAsync ( ExtensionBitsProduct  extensionBitsProduct,
string  accessToken = null 
)

Add or update a Bits products that belongs to an Extension.

Requires App Access Token associated with the Extension client ID

Parameters
extensionBitsProductBits product to add/update
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: