Table of Contents

Interface IUsersClient

Namespace
Nexus.Api.V1
Assembly
Nexus.Api.dll

Provides methods to interact with users.

public interface IUsersClient

Methods

CreateToken(CreateTokenRequest)

Creates a personal access token.

string CreateToken(CreateTokenRequest token)

Parameters

token CreateTokenRequest

The personal access token to create.

Returns

string

CreateTokenAsync(CreateTokenRequest, CancellationToken)

Creates a personal access token.

Task<string> CreateTokenAsync(CreateTokenRequest token, CancellationToken cancellationToken = default)

Parameters

token CreateTokenRequest

The personal access token to create.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<string>

DeleteToken(Guid)

Deletes a personal access token.

HttpResponseMessage DeleteToken(Guid tokenId)

Parameters

tokenId Guid

The identifier of the personal access token.

Returns

HttpResponseMessage

DeleteTokenAsync(Guid, CancellationToken)

Deletes a personal access token.

Task<HttpResponseMessage> DeleteTokenAsync(Guid tokenId, CancellationToken cancellationToken = default)

Parameters

tokenId Guid

The identifier of the personal access token.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<HttpResponseMessage>

DeleteTokenByValue(string)

Deletes a personal access token.

HttpResponseMessage DeleteTokenByValue(string value)

Parameters

value string

The personal access token to delete.

Returns

HttpResponseMessage

DeleteTokenByValueAsync(string, CancellationToken)

Deletes a personal access token.

Task<HttpResponseMessage> DeleteTokenByValueAsync(string value, CancellationToken cancellationToken = default)

Parameters

value string

The personal access token to delete.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<HttpResponseMessage>

GetMe()

Gets the current user.

MeResponse GetMe()

Returns

MeResponse

GetMeAsync(CancellationToken)

Gets the current user.

Task<MeResponse> GetMeAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<MeResponse>

GetTokens()

Gets all personal access tokens.

IReadOnlyDictionary<string, PersonalAccessToken> GetTokens()

Returns

IReadOnlyDictionary<string, PersonalAccessToken>

GetTokensAsync(CancellationToken)

Gets all personal access tokens.

Task<IReadOnlyDictionary<string, PersonalAccessToken>> GetTokensAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<IReadOnlyDictionary<string, PersonalAccessToken>>