C# Класс TwitchLib.TwitchApiv5

Static class with functionality for Twitch API calls using version 5.
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
MakeGetRequest Task
MakeRestRequest Task
handleWebException void

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
MakeGetRequest ( string url, string accessToken = null ) : Task
MakeRestRequest ( string url, string method, string requestData = null, string accessToken = null ) : Task
handleWebException ( WebException e ) : void

Описание методов

GetUsers() публичный статический Метод

Retrieves User object from Twitch including important Id
public static GetUsers ( string username ) : Task>
username string username of the of the user
Результат Task>

SetAccessToken() публичный статический Метод

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.
Результат void

SetClientId() публичный статический Метод

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
Результат void