tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
Tgstation.Server.Client.UsersClient Class Referencesealed

More...

Inheritance diagram for Tgstation.Server.Client.UsersClient:
Inheritance graph
[legend]
Collaboration diagram for Tgstation.Server.Client.UsersClient:
Collaboration graph
[legend]

Public Member Functions

 UsersClient (IApiClient apiClient)
 Initializes a new instance of the UsersClient class.
 
ValueTask< UserResponseCreate (UserCreateRequest user, CancellationToken cancellationToken)
 Create a new user .
Parameters
userThe UserCreateRequest.
cancellationTokenThe CancellationToken for the operation.
Returns
A ValueTask<TResult> resulting in the new UserResponse.

 
ValueTask< UserResponseGetId (EntityId user, CancellationToken cancellationToken)
 Get a specific user .
Parameters
userThe EntityId of the UserResponse to get.
cancellationTokenThe CancellationToken for the operation.
Returns
A ValueTask<TResult> resulting in the requested user .

 
ValueTask< List< UserResponse > > List (PaginationSettings? paginationSettings, CancellationToken cancellationToken)
 List all UserResponses.
Parameters
paginationSettingsThe optional PaginationSettings for the operation.
cancellationTokenThe CancellationToken for the operation.
Returns
A ValueTask<TResult> resulting in a List<T> of all UserResponses.

 
ValueTask< UserResponseRead (CancellationToken cancellationToken)
 Read the current user's information and general rights.
Parameters
cancellationTokenThe CancellationToken for the operation.
Returns
A ValueTask<TResult> resulting in the current UserResponse.

 
ValueTask< UserResponseUpdate (UserUpdateRequest user, CancellationToken cancellationToken)
 Update a user .
Parameters
userThe UserUpdateRequest used to update the UserResponse.
cancellationTokenThe CancellationToken for the operation.
Returns
A ValueTask<TResult> resulting in the updated UserResponse.

 
- Public Member Functions inherited from Tgstation.Server.Client.PaginatedClient
 PaginatedClient (IApiClient apiClient)
 Initializes a new instance of the PaginatedClient class.
 

Private Member Functions

ValueTask< UserResponseUserResponse (Routes.User, user ?? throw new ArgumentNullException(nameof(user)), cancellationToken)
 
ValueTask< UserResponseUserResponse (Routes.User, user ?? throw new ArgumentNullException(nameof(user)), cancellationToken)
 

Additional Inherited Members

- Protected Member Functions inherited from Tgstation.Server.Client.PaginatedClient
async ValueTask< List< TModel > > ReadPaged< TModel > (PaginationSettings? paginationSettings, string route, long? instanceId, CancellationToken cancellationToken)
 Reads a given route with paged results.
 
- Properties inherited from Tgstation.Server.Client.PaginatedClient
IApiClient ApiClient [get]
 The IApiClient for the PaginatedClient.
 

Detailed Description

Definition at line 14 of file UsersClient.cs.

Constructor & Destructor Documentation

◆ UsersClient()

Tgstation.Server.Client.UsersClient.UsersClient ( IApiClient  apiClient)

Initializes a new instance of the UsersClient class.

Parameters
apiClientThe IApiClient for the PaginatedClient.

Definition at line 20 of file UsersClient.cs.

21 : base(apiClient)
22 {
23 }
ValueTask< List< UserResponse > > List(PaginationSettings? paginationSettings, CancellationToken cancellationToken)
List all UserResponses.A ValueTask<TResult> resulting in a List<T> of all UserResponses.

Member Function Documentation

◆ Create()

ValueTask< UserResponse > Tgstation.Server.Client.UsersClient.Create ( UserCreateRequest  user,
CancellationToken  cancellationToken 
)

Create a new user .

Parameters
userThe UserCreateRequest.
cancellationTokenThe CancellationToken for the operation.
Returns
A ValueTask<TResult> resulting in the new UserResponse.

Implements Tgstation.Server.Client.IUsersClient.

◆ GetId()

ValueTask< UserResponse > Tgstation.Server.Client.UsersClient.GetId ( EntityId  user,
CancellationToken  cancellationToken 
)

Get a specific user .

Parameters
userThe EntityId of the UserResponse to get.
cancellationTokenThe CancellationToken for the operation.
Returns
A ValueTask<TResult> resulting in the requested user .

Implements Tgstation.Server.Client.IUsersClient.

◆ List()

ValueTask< List< UserResponse > > Tgstation.Server.Client.UsersClient.List ( PaginationSettings paginationSettings,
CancellationToken  cancellationToken 
)

List all UserResponses.

Parameters
paginationSettingsThe optional PaginationSettings for the operation.
cancellationTokenThe CancellationToken for the operation.
Returns
A ValueTask<TResult> resulting in a List<T> of all UserResponses.

Implements Tgstation.Server.Client.IUsersClient.

◆ Read()

ValueTask< UserResponse > Tgstation.Server.Client.UsersClient.Read ( CancellationToken  cancellationToken)

Read the current user's information and general rights.

Parameters
cancellationTokenThe CancellationToken for the operation.
Returns
A ValueTask<TResult> resulting in the current UserResponse.

Implements Tgstation.Server.Client.IUsersClient.

◆ Update()

ValueTask< UserResponse > Tgstation.Server.Client.UsersClient.Update ( UserUpdateRequest  user,
CancellationToken  cancellationToken 
)

Update a user .

Parameters
userThe UserUpdateRequest used to update the UserResponse.
cancellationTokenThe CancellationToken for the operation.
Returns
A ValueTask<TResult> resulting in the updated UserResponse.

Implements Tgstation.Server.Client.IUsersClient.

◆ UserResponse() [1/2]

ValueTask< UserResponse > Tgstation.Server.Client.UsersClient.UserResponse ( Routes.  User,
user ?? throw new   ArgumentNullExceptionnameof(user),
cancellationToken   
)
private

◆ UserResponse() [2/2]

ValueTask< UserResponse > Tgstation.Server.Client.UsersClient.UserResponse ( Routes.  User,
user ?? throw new   ArgumentNullExceptionnameof(user),
cancellationToken   
)
private

The documentation for this class was generated from the following file: