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

Games related APIs More...

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

Public Member Functions

 Games (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http)
 
Task< GetGamesResponseGetGamesAsync (List< string > gameIds=null, List< string > gameNames=null, string accessToken=null)
 Gets game information by game ID or name. More...
 
Task< GetTopGamesResponseGetTopGamesAsync (string before=null, string after=null, int first=20, string accessToken=null)
 Gets games sorted by number of current viewers on Twitch, most popular first. 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

Games related APIs

Constructor & Destructor Documentation

◆ Games()

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

Member Function Documentation

◆ GetGamesAsync()

Task< GetGamesResponse > TwitchLib.Api.Helix.Games.GetGamesAsync ( List< string >  gameIds = null,
List< string >  gameNames = null,
string  accessToken = null 
)

Gets game information by game ID or name.

For a query to be valid, name and/or id must be specified.

Parameters
gameIdsList of Game IDs. At most 100 id values can be specified.
gameNamesList of Game names.

The name must be an exact match. For example, “Pokemon” will not return a list of Pokemon games; instead, query any specific Pokemon games in which you are interested.

At most 100 name values can be specified.

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

◆ GetTopGamesAsync()

Task< GetTopGamesResponse > TwitchLib.Api.Helix.Games.GetTopGamesAsync ( string  before = null,
string  after = null,
int  first = 20,
string  accessToken = null 
)

Gets games sorted by number of current viewers on Twitch, most popular first.

Parameters
beforeCursor for backward pagination: tells the server where to start fetching the next set of results, in a multi-page response.
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: 100. Default: 20.
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: