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

Streams related APIs More...

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

Public Member Functions

 Streams (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http)
 
Task< GetStreamsResponseGetStreamsAsync (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< GetStreamTagsResponseGetStreamTagsAsync (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< GetStreamKeyResponseGetStreamKeyAsync (string broadcasterId, string accessToken=null)
 Gets the channel stream key for a user. More...
 
Task< CreateStreamMarkerResponseCreateStreamMarkerAsync (CreateStreamMarkerRequest request, string accessToken=null)
 Creates a marker in the stream of a user specified by user ID More...
 
Task< GetStreamMarkersResponseGetStreamMarkersAsync (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< GetFollowedStreamsResponseGetFollowedStreamsAsync (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
 

Detailed Description

Streams related APIs

Constructor & Destructor Documentation

◆ Streams()

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

Member Function Documentation

◆ CreateStreamMarkerAsync()

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

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

◆ GetFollowedStreamsAsync()

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

Parameters
userIdResults will only include active streams from the channels that this Twitch user follows.
firstMaximum number of objects to return. Maximum: 100. Default: 100.
afterCursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response.
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns
Exceptions
BadParameterException

◆ GetStreamKeyAsync()

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

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

◆ GetStreamMarkersAsync()

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

Parameters
userIdID of the broadcaster from whose stream markers are returned.

Only one of userId and videoId must be specified.

Parameters
videoIdID of the VOD/video whose stream markers are returned.

Only one of userId and videoId must be specified.

Parameters
firstNumber of values to be returned when getting videos by user or game ID. Limit: 100. Default: 20.
afterCursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response.
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns
Exceptions
BadParameterException

◆ GetStreamsAsync()

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.

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: 100. Default: 20.
gameIdsReturns streams broadcasting a specified game ID. You can specify up to 100 IDs.
languagesFilter 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”.

Parameters
userIdsReturns streams broadcast by one or more specified user IDs. You can specify up to 100 IDs.
userLoginsReturns streams broadcast by one or more specified user login names. You can specify up to 100 names.
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns

◆ GetStreamTagsAsync()

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.

Parameters
broadcasterIdThe user ID of the channel to get the tags from.
accessTokenoptional access token to override the use of the stored one in the TwitchAPI instance
Returns
Exceptions
BadParameterException

◆ ReplaceStreamTagsAsync()

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.

Parameters
broadcasterIdThe user ID of the channel to apply the tags to.
tagIdsA 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.

Parameters
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: