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

Subscriptions related APIs More...

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

Public Member Functions

 Subscriptions (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http)
 
Task< CheckUserSubscriptionResponseCheckUserSubscriptionAsync (string broadcasterId, string userId, string accessToken=null)
 Checks if a specific user (userId) is subscribed to a specific channel (broadcasterId). More...
 
Task< GetUserSubscriptionsResponseGetUserSubscriptionsAsync (string broadcasterId, List< string > userIds, string accessToken=null)
 Gets a list of users that subscribe to the specified broadcaster filtered by a list of UserIds. More...
 
Task< GetBroadcasterSubscriptionsResponseGetBroadcasterSubscriptionsAsync (string broadcasterId, int first=20, string after=null, string accessToken=null)
 Gets a list of users that subscribe to the specified broadcaster. 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

Subscriptions related APIs

Constructor & Destructor Documentation

◆ Subscriptions()

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

Member Function Documentation

◆ CheckUserSubscriptionAsync()

Task< CheckUserSubscriptionResponse > TwitchLib.Api.Helix.Subscriptions.CheckUserSubscriptionAsync ( string  broadcasterId,
string  userId,
string  accessToken = null 
)

Checks if a specific user (userId) is subscribed to a specific channel (broadcasterId).

Requires User access token with scope user:read:subscriptions

Or requires App access token if the user has authorized your application with scope user:read:subscriptions

Parameters
broadcasterIdUser ID of an Affiliate or Partner broadcaster.
userIdUser ID of a Twitch viewer.
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns
Exceptions
BadParameterException

◆ GetBroadcasterSubscriptionsAsync()

Task< GetBroadcasterSubscriptionsResponse > TwitchLib.Api.Helix.Subscriptions.GetBroadcasterSubscriptionsAsync ( string  broadcasterId,
int  first = 20,
string  after = null,
string  accessToken = null 
)

Gets a list of users that subscribe to the specified broadcaster.

Required scope: channel:read:subscriptions

Parameters
broadcasterIdUser ID of the broadcaster. Must match the User ID in the Bearer token.
firstMaximum number of objects to return. Maximum: 100. Default: 20.
afterCursor for forward pagination: tells the server where to start fetching the next set of results in a multi-page response.
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns
Exceptions
BadParameterException

◆ GetUserSubscriptionsAsync()

Task< GetUserSubscriptionsResponse > TwitchLib.Api.Helix.Subscriptions.GetUserSubscriptionsAsync ( string  broadcasterId,
List< string >  userIds,
string  accessToken = null 
)

Gets a list of users that subscribe to the specified broadcaster filtered by a list of UserIds.

Required scope: channel:read:subscriptions

Parameters
broadcasterIdUser ID of the broadcaster. Must match the User ID in the Bearer token.
userIdsFilters the list to include only the specified subscribers. You may specify a maximum of 100 subscribers.
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns
Exceptions
BadParameterException

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