TwitchLib 3.5.3
|
Public Member Functions | |
Streams (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http) | |
Task< GetStreamsResponse > | GetStreamsAsync (string after=null, int first=20, List< string > gameIds=null, List< string > languages=null, List< string > userIds=null, List< string > userLogins=null, string accessToken=null) |
Gets information about active streams. More... | |
Task< GetStreamTagsResponse > | GetStreamTagsAsync (string broadcasterId, string accessToken=null) |
Gets the list of stream tags that are set on the specified channel. More... | |
Task | ReplaceStreamTagsAsync (string broadcasterId, List< string > tagIds=null, string accessToken=null) |
Applies one or more tags to the specified channel, overwriting any existing tags. More... | |
Task< GetStreamKeyResponse > | GetStreamKeyAsync (string broadcasterId, string accessToken=null) |
Gets the channel stream key for a user. More... | |
Task< CreateStreamMarkerResponse > | CreateStreamMarkerAsync (CreateStreamMarkerRequest request, string accessToken=null) |
Creates a marker in the stream of a user specified by user ID More... | |
Task< GetStreamMarkersResponse > | GetStreamMarkersAsync (string userId=null, string videoId=null, int first=20, string after=null, string accessToken=null) |
Gets a list of markers for either a specified user’s most recent stream or a specified VOD/video (stream), ordered by recency. More... | |
Task< GetFollowedStreamsResponse > | GetFollowedStreamsAsync (string userId, int first=100, string after=null, string accessToken=null) |
Gets information about active streams belonging to channels that the authenticated user follows. 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 |
Streams related APIs
TwitchLib.Api.Helix.Streams.Streams | ( | IApiSettings | settings, |
IRateLimiter | rateLimiter, | ||
IHttpCallHandler | http | ||
) |
Task< CreateStreamMarkerResponse > TwitchLib.Api.Helix.Streams.CreateStreamMarkerAsync | ( | CreateStreamMarkerRequest | request, |
string | accessToken = null |
||
) |
Creates a marker in the stream of a user specified by user ID
A marker is an arbitrary point in a stream that the broadcaster wants to mark; e.g., to easily return to later.
Markers can be created by the stream owner or editors.
Required scope: channel:manage:broadcast
request | |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task< GetFollowedStreamsResponse > TwitchLib.Api.Helix.Streams.GetFollowedStreamsAsync | ( | string | userId, |
int | first = 100 , |
||
string | after = null , |
||
string | accessToken = null |
||
) |
Gets information about active streams belonging to channels that the authenticated user follows.
Streams are returned sorted by number of current viewers, in descending order.
Across multiple pages of results, there may be duplicate or missing streams, as viewers join and leave streams.
userId must match the User ID in the bearer token.
Required scope: user:read:follows
userId | Results will only include active streams from the channels that this Twitch user follows. |
first | Maximum number of objects to return. Maximum: 100. Default: 100. |
after | Cursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response. |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
BadParameterException |
Task< GetStreamKeyResponse > TwitchLib.Api.Helix.Streams.GetStreamKeyAsync | ( | string | broadcasterId, |
string | accessToken = null |
||
) |
Gets the channel stream key for a user.
Required scope: channel:read:stream_key
broadcasterId | User ID of the broadcaster |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task< GetStreamMarkersResponse > TwitchLib.Api.Helix.Streams.GetStreamMarkersAsync | ( | string | userId = null , |
string | videoId = null , |
||
int | first = 20 , |
||
string | after = null , |
||
string | accessToken = null |
||
) |
Gets a list of markers for either a specified user’s most recent stream or a specified VOD/video (stream), ordered by recency.
A marker is an arbitrary point in a stream that the broadcaster wants to mark; e.g., to easily return to later.
The only markers returned are those created by the user identified by the Bearer token.
Only one of userId and videoId must be specified.
Required scope: user:read:broadcast
userId | ID of the broadcaster from whose stream markers are returned. |
Only one of userId and videoId must be specified.
videoId | ID of the VOD/video whose stream markers are returned. |
Only one of userId and videoId must be specified.
first | Number of values to be returned when getting videos by user or game ID. Limit: 100. Default: 20. |
after | Cursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response. |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
BadParameterException |
Task< GetStreamsResponse > TwitchLib.Api.Helix.Streams.GetStreamsAsync | ( | string | after = null , |
int | first = 20 , |
||
List< string > | gameIds = null , |
||
List< string > | languages = null , |
||
List< string > | userIds = null , |
||
List< string > | userLogins = null , |
||
string | accessToken = null |
||
) |
Gets information about active streams.
Streams are returned sorted by number of current viewers, in descending order.
Across multiple pages of results, there may be duplicate or missing streams, as viewers join and leave streams.
after | Cursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response. |
first | Maximum number of objects to return. Maximum: 100. Default: 20. |
gameIds | Returns streams broadcasting a specified game ID. You can specify up to 100 IDs. |
languages | Filter by Stream language. |
You can specify up to 100 languages.
A language value must be either the ISO 639-1 two-letter code for a supported stream language or “other”.
userIds | Returns streams broadcast by one or more specified user IDs. You can specify up to 100 IDs. |
userLogins | Returns streams broadcast by one or more specified user login names. You can specify up to 100 names. |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task< GetStreamTagsResponse > TwitchLib.Api.Helix.Streams.GetStreamTagsAsync | ( | string | broadcasterId, |
string | accessToken = null |
||
) |
Gets the list of stream tags that are set on the specified channel.
broadcasterId | The user ID of the channel to get the tags from. |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
BadParameterException |
Task TwitchLib.Api.Helix.Streams.ReplaceStreamTagsAsync | ( | string | broadcasterId, |
List< string > | tagIds = null , |
||
string | accessToken = null |
||
) |
Applies one or more tags to the specified channel, overwriting any existing tags.
If the request does not specify tags, all existing tags are removed from the channel.
You may not specify automatic tags; the call will fail if you specify automatic tags.
Tags expire 72 hours after they are applied, unless the channel is live within that time period.
The expiration period is subject to change.
Requires a user OAuth access token with a scope of channel:manage:broadcast.
broadcasterId | The user ID of the channel to apply the tags to. |
tagIds | A list of IDs that identify the tags to apply to the channel. |
You may specify a maximum of five tags.
To remove all tags from the channel, set tagIds to an empty list / null.
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |