3using System.Threading.Tasks;
5using Microsoft.AspNetCore.SignalR.Client;
6using Microsoft.Extensions.Logging;
23 get => apiClient.Headers.Token ??
throw new InvalidOperationException(
"apiClient.Headers.Token was null!");
31 set => apiClient.Timeout = value;
81 Action<ILoggingBuilder>? loggingConfigureAction,
82 CancellationToken cancellationToken)
83 =>
apiClient.CreateHubConnection(jobsReceiver, retryPolicy, loggingConfigureAction, cancellationToken);
Represents a JWT returned by the API.
Routes to a server actions.
const string ApiRoot
The root of API methods.
IUsersClient Users
Access the IUsersClient.
Uri Url
The connected server's root Uri.
TimeSpan Timeout
The connection timeout.
IAdministrationClient Administration
Access the IAdministrationClient.
IInstanceManagerClient Instances
Access the IInstanceManagerClient.
readonly IApiClient apiClient
The IApiClient for the RestServerClient.
ValueTask< IAsyncDisposable > SubscribeToJobUpdates(IJobsHub jobsReceiver, IRetryPolicy? retryPolicy, Action< ILoggingBuilder >? loggingConfigureAction, CancellationToken cancellationToken)
Subscribe to all job updates available to the IRestServerClient.An IAsyncDisposable representing the ...
void AddRequestLogger(IRequestLogger requestLogger)
Adds a requestLogger to the request pipeline.
TokenResponse Token
The Token used to access the server.
ValueTask< ServerInformationResponse > ServerInformation(CancellationToken cancellationToken)
The ServerInformationResponse of the IRestServerClient.A Task<TResult> resulting in the ServerInforma...
IUserGroupsClient Groups
Access the IUserGroupsClient.
ITransferClient Transfer
Access the ITransferClient.Most client methods handle transfers in their invocations....
RestServerClient(IApiClient apiClient)
Initializes a new instance of the RestServerClient class.
SignalR client methods for receiving JobResponses.
For managing server administration.
Web interface for the API.
Uri Url
The Uri pointing the tgstation-server.
void AddRequestLogger(IRequestLogger requestLogger)
Adds a requestLogger to the request pipeline.
TimeSpan Timeout
The request timeout.
ApiHeaders Headers
The ApiHeaders the IApiClient uses.
For logging HTTP requests and responses.
Main client for communicating with a server.
For transferring data Streams.
For managing UserGroupResponses.
For managing UserResponses.