C# Class TwitchLib.TwitchApiv5

Static class with functionality for Twitch API calls using version 5.
Exibir arquivo Open project: swiftyspiffy/TwitchLib

Private Properties

Property Type Description
MakeGetRequest Task
MakeRestRequest Task
handleWebException void

Public Methods

Method Description
GetUsers ( string username ) : Task>

Retrieves User object from Twitch including important Id

SetAccessToken ( string accessToken ) : void

Sets Access Token, which is saved in memory. This is not necessary, as tokens can be passed into Api calls.

SetClientId ( string clientId ) : void

Sets ClientId, which is required for all API calls. Also validates ClientId. Client-Id to bind to TwitchApi.

Private Methods

Method Description
MakeGetRequest ( string url, string accessToken = null ) : Task
MakeRestRequest ( string url, string method, string requestData = null, string accessToken = null ) : Task
handleWebException ( WebException e ) : void

Method Details

GetUsers() public static method

Retrieves User object from Twitch including important Id
public static GetUsers ( string username ) : Task>
username string username of the of the user
return Task>

SetAccessToken() public static method

Sets Access Token, which is saved in memory. This is not necessary, as tokens can be passed into Api calls.
public static SetAccessToken ( string accessToken ) : void
accessToken string Twitch account OAuth token to store in memory.
return void

SetClientId() public static method

Sets ClientId, which is required for all API calls. Also validates ClientId. Client-Id to bind to TwitchApi.
public static SetClientId ( string clientId ) : void
clientId string
return void