Interface IUsersClient
Provides methods to interact with users.
public interface IUsersClient
Methods
CreateToken(CreateTokenRequest)
Creates a personal access token.
string CreateToken(CreateTokenRequest token)
Parameters
tokenCreateTokenRequestThe personal access token to create.
Returns
CreateTokenAsync(CreateTokenRequest, CancellationToken)
Creates a personal access token.
Task<string> CreateTokenAsync(CreateTokenRequest token, CancellationToken cancellationToken = default)
Parameters
tokenCreateTokenRequestThe personal access token to create.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
DeleteToken(Guid)
Deletes a personal access token.
HttpResponseMessage DeleteToken(Guid tokenId)
Parameters
tokenIdGuidThe identifier of the personal access token.
Returns
DeleteTokenAsync(Guid, CancellationToken)
Deletes a personal access token.
Task<HttpResponseMessage> DeleteTokenAsync(Guid tokenId, CancellationToken cancellationToken = default)
Parameters
tokenIdGuidThe identifier of the personal access token.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
DeleteTokenByValue(string)
Deletes a personal access token.
HttpResponseMessage DeleteTokenByValue(string value)
Parameters
valuestringThe personal access token to delete.
Returns
DeleteTokenByValueAsync(string, CancellationToken)
Deletes a personal access token.
Task<HttpResponseMessage> DeleteTokenByValueAsync(string value, CancellationToken cancellationToken = default)
Parameters
valuestringThe personal access token to delete.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetMe()
Gets the current user.
MeResponse GetMe()
Returns
GetMeAsync(CancellationToken)
Gets the current user.
Task<MeResponse> GetMeAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetTokens()
Gets all personal access tokens.
IReadOnlyDictionary<string, PersonalAccessToken> GetTokens()
Returns
GetTokensAsync(CancellationToken)
Gets all personal access tokens.
Task<IReadOnlyDictionary<string, PersonalAccessToken>> GetTokensAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe token to cancel the current operation.