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

Public Member Functions

 Polls (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http)
 
Task< GetPollsResponseGetPollsAsync (string broadcasterId, List< string > ids=null, string after=null, int first=20, string accessToken=null)
 Get information about all polls or specific polls for a Twitch channel. Poll information is available for 90 days. More...
 
Task< CreatePollResponseCreatePollAsync (CreatePollRequest request, string accessToken=null)
 Create a poll for a specific Twitch channel. More...
 
Task< EndPollResponseEndPollAsync (string broadcasterId, string id, PollStatusEnum status, string accessToken=null)
 End a poll that is currently active. 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

◆ Polls()

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

Member Function Documentation

◆ CreatePollAsync()

Task< CreatePollResponse > TwitchLib.Api.Helix.Polls.CreatePollAsync ( CreatePollRequest  request,
string  accessToken = null 
)

Create a poll for a specific Twitch channel.

Required scope: channel:manage:polls

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

◆ EndPollAsync()

Task< EndPollResponse > TwitchLib.Api.Helix.Polls.EndPollAsync ( string  broadcasterId,
string  id,
PollStatusEnum  status,
string  accessToken = null 
)

End a poll that is currently active.

Required scope: channel:manage:polls

Parameters
broadcasterIdThe broadcaster running polls. Provided broadcaster_id must match the user_id in the user OAuth token.
idID of the poll to end.
statusThe poll status to be set. Valid values:

TERMINATED: End the poll manually, but allow it to be viewed publicly.

ARCHIVED: End the poll manually and do not allow it to be viewed publicly.

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

◆ GetPollsAsync()

Task< GetPollsResponse > TwitchLib.Api.Helix.Polls.GetPollsAsync ( string  broadcasterId,
List< string >  ids = null,
string  after = null,
int  first = 20,
string  accessToken = null 
)

Get information about all polls or specific polls for a Twitch channel. Poll information is available for 90 days.

Required scope: channel:read:polls

Parameters
broadcasterIdThe broadcaster running polls. Provided broadcaster_id must match the user_id in the user OAuth token.
idsIDs polls. Filters results to one or more specific polls.

Not providing one or more IDs will return the full list of polls for the authenticated channel.

Maximum: 100

Parameters
afterCursor for forward pagination: tells the server where to start fetching the next set of results in a multi-page response.
firstMaximum number of objects to return. Maximum: 20. Default: 20.
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: