TwitchLib 3.5.3
Loading...
Searching...
No Matches
TwitchLib.Api.Helix.EventSub Class Reference
Inheritance diagram for TwitchLib.Api.Helix.EventSub:
TwitchLib.Api.Core.ApiBase

Public Member Functions

 EventSub (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http)
 
Task< CreateEventSubSubscriptionResponseCreateEventSubSubscriptionAsync (string type, string version, Dictionary< string, string > condition, EventSubTransportMethod method, string websocketSessionId=null, string webhookCallback=null, string webhookSecret=null, string clientId=null, string accessToken=null)
 Creates an EventSub subscription. More...
 
Task< GetEventSubSubscriptionsResponseGetEventSubSubscriptionsAsync (string status=null, string type=null, string userId=null, string after=null, string clientId=null, string accessToken=null)
 Gets a list of your EventSub subscriptions. The list is paginated and ordered by the oldest subscription first. More...
 
async Task< bool > DeleteEventSubSubscriptionAsync (string id, string clientId=null, string accessToken=null)
 Deletes an EventSub subscription. 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
 

Constructor & Destructor Documentation

◆ EventSub()

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

Member Function Documentation

◆ CreateEventSubSubscriptionAsync()

Task< CreateEventSubSubscriptionResponse > TwitchLib.Api.Helix.EventSub.CreateEventSubSubscriptionAsync ( string  type,
string  version,
Dictionary< string, string >  condition,
EventSubTransportMethod  method,
string  websocketSessionId = null,
string  webhookCallback = null,
string  webhookSecret = null,
string  clientId = null,
string  accessToken = null 
)

Creates an EventSub subscription.

Parameters
typeThe type of subscription to create.
versionThe version of the subscription type used in this request.
conditionThe parameter values that are specific to the specified subscription type.
methodThe transport method. Supported values: Webhook, Websocket.
websocketSessionIdThe session Id of a websocket connection that you want to subscribe to an event for. Only needed if method is Websocket
webhookCallbackThe callback URL where the Webhook notification should be sent. Only needed if method is Webhook
webhookSecretThe secret used for verifying a Webhooks signature. Only needed if method is Webhook
clientIdoptional Client ID to override the use of the stored one in the TwitchAPI instance
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns

◆ DeleteEventSubSubscriptionAsync()

async Task< bool > TwitchLib.Api.Helix.EventSub.DeleteEventSubSubscriptionAsync ( string  id,
string  clientId = null,
string  accessToken = null 
)

Deletes an EventSub subscription.

Parameters
idThe ID of the subscription to delete.
clientIdoptional Client ID to override the use of the stored one in the TwitchAPI instance
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns
True: If successfully deleted; False: If delete failed

◆ GetEventSubSubscriptionsAsync()

Task< GetEventSubSubscriptionsResponse > TwitchLib.Api.Helix.EventSub.GetEventSubSubscriptionsAsync ( string  status = null,
string  type = null,
string  userId = null,
string  after = null,
string  clientId = null,
string  accessToken = null 
)

Gets a list of your EventSub subscriptions. The list is paginated and ordered by the oldest subscription first.

Parameters
statusFilter subscriptions by its status.
typeFilter subscriptions by subscription type (e.g., channel.update).
userIdFilter subscriptions by user ID.
afterThe cursor used to get the next page of results.
clientIdoptional Client ID to override the use of the stored one in the TwitchAPI instance
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns
Returns a list of your EventSub subscriptions.

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