UserInfoClient¶
Namespace: IntegrationTests.ApiClient
Inheritance Object → UserInfoClient
Properties¶
BaseUrl¶
Property Value¶
ReadResponseAsString¶
Property Value¶
Constructors¶
UserInfoClient(String, HttpClient)¶
Parameters¶
baseUrl String
httpClient HttpClient
Methods¶
ChangePasswordAsync(ChangePassword)¶
Changes the password for a user.
Parameters¶
input ChangePassword
The change password request containing user ID, current password, and new password.
Returns¶
Ok if successful; otherwise, an error response.
Exceptions¶
ApiException
A server side error occurred.
ChangePasswordAsync(ChangePassword, CancellationToken)¶
Changes the password for a user.
public Task<FileResponse> ChangePasswordAsync(ChangePassword input, CancellationToken cancellationToken)
Parameters¶
input ChangePassword
The change password request containing user ID, current password, and new password.
cancellationToken CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns¶
Ok if successful; otherwise, an error response.
Exceptions¶
ApiException
A server side error occurred.
ChangeUserAsync(ApiUser)¶
Updates user information.
Parameters¶
user ApiUser
The user object with updated information.
Returns¶
Ok if successful; otherwise, an error response.
Exceptions¶
ApiException
A server side error occurred.
ChangeUserAsync(ApiUser, CancellationToken)¶
Updates user information.
Parameters¶
user ApiUser
The user object with updated information.
cancellationToken CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns¶
Ok if successful; otherwise, an error response.
Exceptions¶
ApiException
A server side error occurred.
DeleteUserAsync(String)¶
Deletes a user by their unique identifier.
Parameters¶
userId String
The unique identifier of the user to delete.
Returns¶
Ok if successful; otherwise, an error response.
Exceptions¶
ApiException
A server side error occurred.
DeleteUserAsync(String, CancellationToken)¶
Deletes a user by their unique identifier.
Parameters¶
userId String
The unique identifier of the user to delete.
cancellationToken CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns¶
Ok if successful; otherwise, an error response.
Exceptions¶
ApiException
A server side error occurred.
GetUserByIdAsync(String)¶
Retrieves a user by their unique identifier.
Parameters¶
userId String
The unique identifier of the user.
Returns¶
The user information if found; otherwise, NotFound.
Exceptions¶
ApiException
A server side error occurred.
GetUserByIdAsync(String, CancellationToken)¶
Retrieves a user by their unique identifier.
Parameters¶
userId String
The unique identifier of the user.
cancellationToken CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns¶
The user information if found; otherwise, NotFound.
Exceptions¶
ApiException
A server side error occurred.
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<String, IEnumerable<String>>, CancellationToken)¶
protected Task<ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<String, IEnumerable<String>> headers, CancellationToken cancellationToken)
Type Parameters¶
T
Parameters¶
response HttpResponseMessage
headers IReadOnlyDictionary<String, IEnumerable<String>>
cancellationToken CancellationToken
Returns¶
Task<ObjectResponseResult<T>>