TwitchLib 3.5.3
|
User related APIs More...
Public Member Functions | |
Users (IApiSettings settings, IRateLimiter rateLimiter, IHttpCallHandler http) | |
Task< GetUserBlockListResponse > | GetUserBlockListAsync (string broadcasterId, int first=20, string after=null, string accessToken=null) |
Gets a specified user’s block list. More... | |
Task | BlockUserAsync (string targetUserId, BlockUserSourceContextEnum? sourceContext=null, BlockUserReasonEnum? reason=null, string accessToken=null) |
Blocks the specified user on behalf of the authenticated user. More... | |
Task | UnblockUserAsync (string targetUserId, string accessToken=null) |
Unblocks the specified user on behalf of the authenticated user. More... | |
Task< GetUsersResponse > | GetUsersAsync (List< string > ids=null, List< string > logins=null, string accessToken=null) |
Gets information about one or more specified Twitch users. More... | |
Task< GetUsersFollowsResponse > | GetUsersFollowsAsync (string after=null, string before=null, int first=20, string fromId=null, string toId=null, string accessToken=null) |
Gets information on follow relationships between two Twitch users. More... | |
Task | UpdateUserAsync (string description, string accessToken=null) |
Updates the description of a user specified by the bearer token. More... | |
Task< GetUserExtensionsResponse > | GetUserExtensionsAsync (string accessToken=null) |
Gets a list of all extensions (both active and inactive) for a specified user, identified by a Bearer token. More... | |
Task< GetUserActiveExtensionsResponse > | GetUserActiveExtensionsAsync (string userid=null, string accessToken=null) |
Gets information about active extensions installed by a specified user, identified by a user ID or Bearer token. More... | |
Task< GetUserActiveExtensionsResponse > | UpdateUserExtensionsAsync (IEnumerable< ExtensionSlot > userExtensionStates, string accessToken=null) |
Updates the activation state, extension ID, and/or version number of installed extensions for a specified user, identified by a Bearer token. 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 |
User related APIs
TwitchLib.Api.Helix.Users.Users | ( | IApiSettings | settings, |
IRateLimiter | rateLimiter, | ||
IHttpCallHandler | http | ||
) |
Task TwitchLib.Api.Helix.Users.BlockUserAsync | ( | string | targetUserId, |
BlockUserSourceContextEnum? | sourceContext = null , |
||
BlockUserReasonEnum? | reason = null , |
||
string | accessToken = null |
||
) |
Blocks the specified user on behalf of the authenticated user.
Required scope: user:manage:blocked_users
targetUserId | User ID of the user to be blocked. |
sourceContext | Source context for blocking the user. |
reason | Reason for blocking the user. |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task< GetUserActiveExtensionsResponse > TwitchLib.Api.Helix.Users.GetUserActiveExtensionsAsync | ( | string | userid = null , |
string | accessToken = null |
||
) |
Gets information about active extensions installed by a specified user, identified by a user ID or Bearer token.
Required scope: user:read:broadcast or user:edit:broadcast
userid | |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task< GetUserBlockListResponse > TwitchLib.Api.Helix.Users.GetUserBlockListAsync | ( | string | broadcasterId, |
int | first = 20 , |
||
string | after = null , |
||
string | accessToken = null |
||
) |
Gets a specified user’s block list.
The list is sorted by when the block occurred in descending order (i.e. most recent block first).
Required scope: user:read:blocked_users
broadcasterId | User ID for a Twitch user. |
first | Maximum number of objects to return. Maximum: 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< GetUserExtensionsResponse > TwitchLib.Api.Helix.Users.GetUserExtensionsAsync | ( | string | accessToken = null | ) |
Gets a list of all extensions (both active and inactive) for a specified user, identified by a Bearer token.
Required scope: user:read:broadcast or user:edit:broadcast
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task< GetUsersResponse > TwitchLib.Api.Helix.Users.GetUsersAsync | ( | List< string > | ids = null , |
List< string > | logins = null , |
||
string | accessToken = null |
||
) |
Gets information about one or more specified Twitch users.
Users are identified by optional user IDs and/or login name.
If neither a user ID nor a login name is specified, the user is looked up by Bearer token.
OAuth token with user:read:email scope required to include the user’s verified email address in response.
ids | UserIds to query. Maximum: 100. |
The limit of 100 IDs and login names is the total limit.
You can request, for example, 50 of each or 100 of one of them. You cannot request 100 of both.
logins | UserLogins to query. Maximum: 100. |
The limit of 100 IDs and login names is the total limit.
You can request, for example, 50 of each or 100 of one of them. You cannot request 100 of both.
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task< GetUsersFollowsResponse > TwitchLib.Api.Helix.Users.GetUsersFollowsAsync | ( | string | after = null , |
string | before = null , |
||
int | first = 20 , |
||
string | fromId = null , |
||
string | toId = null , |
||
string | accessToken = null |
||
) |
Gets information on follow relationships between two Twitch users.
This can return information like “who is X following,” “who is following X,” or “is user X following user Y.”
Information returned is sorted in order, most recent follow first.
after | Cursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response. |
before | |
first | Maximum number of objects to return. Maximum: 100. Default: 20. |
fromId | User ID. The request returns information about users who are being followed by the from_id user. |
toId | User ID. The request returns information about users who are following the to_id user. |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task TwitchLib.Api.Helix.Users.UnblockUserAsync | ( | string | targetUserId, |
string | accessToken = null |
||
) |
Unblocks the specified user on behalf of the authenticated user.
Required scope: user:manage:blocked_users
targetUserId | User ID of the user to be unblocked. |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task TwitchLib.Api.Helix.Users.UpdateUserAsync | ( | string | description, |
string | accessToken = null |
||
) |
Updates the description of a user specified by the bearer token.
Note that the description parameter is optional should other updatable parameters become available in the future.
If the description parameter is not provided, no update will occur.
Required scope: user:edit
description | User’s account description |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
Task< GetUserActiveExtensionsResponse > TwitchLib.Api.Helix.Users.UpdateUserExtensionsAsync | ( | IEnumerable< ExtensionSlot > | userExtensionStates, |
string | accessToken = null |
||
) |
Updates the activation state, extension ID, and/or version number of installed extensions for a specified user, identified by a Bearer token.
If you try to activate a given extension under multiple extension types, the last write wins (and there is no guarantee of write order).
Required scope: user:edit:broadcast
userExtensionStates | |
accessToken | optional access token to override the use of the stored one in the TwitchAPI instance |
ArgumentOutOfRangeException |