|
tgstation-server 6.19.0
The /tg/station 13 server suite
|


Public Member Functions | |||||||||||||
| ApiClient (HttpClient httpClient, Uri url, ApiHeaders apiHeaders, ApiHeaders? tokenRefreshHeaders, bool authless) | |||||||||||||
| Initializes a new instance of the ApiClient class. | |||||||||||||
| async ValueTask | DisposeAsync () | ||||||||||||
| ValueTask< TResult > | Create< TResult > (string route, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP PUT request.
| |||||||||||||
| ValueTask< TResult > | Read< TResult > (string route, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP GET request.
| |||||||||||||
| ValueTask< TResult > | Update< TResult > (string route, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP POST request.
| |||||||||||||
| ValueTask< TResult > | Update< TBody, TResult > (string route, TBody body, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP POST request.
| |||||||||||||
| ValueTask | Patch (string route, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP PATCH request.
| |||||||||||||
| ValueTask | Update< TBody > (string route, TBody body, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP POST request.
| |||||||||||||
| ValueTask< TResult > | Create< TBody, TResult > (string route, TBody body, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP PUT request.
| |||||||||||||
| ValueTask | Delete (string route, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP DELETE request.
| |||||||||||||
| ValueTask< TResult > | Create< TBody, TResult > (string route, TBody body, long instanceId, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP PUT request.
| |||||||||||||
| ValueTask< TResult > | Read< TResult > (string route, long instanceId, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP GET request.
| |||||||||||||
| ValueTask< TResult > | Update< TBody, TResult > (string route, TBody body, long instanceId, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP POST request.
| |||||||||||||
| ValueTask | Delete (string route, long instanceId, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP DELETE request.
| |||||||||||||
| ValueTask | Delete< TBody > (string route, TBody body, long instanceId, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP DELETE request.
| |||||||||||||
| ValueTask< TResult > | Delete< TResult > (string route, long instanceId, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP DELETE request.
| |||||||||||||
| ValueTask< TResult > | Delete< TBody, TResult > (string route, TBody body, long instanceId, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP DELETE request.
| |||||||||||||
| ValueTask< TResult > | Create< TResult > (string route, long instanceId, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP PUT request.
| |||||||||||||
| ValueTask< TResult > | Patch< TResult > (string route, long instanceId, CancellationToken cancellationToken) | ||||||||||||
Run an HTTP PATCH request.
| |||||||||||||
| void | AddRequestLogger (IRequestLogger requestLogger) | ||||||||||||
Adds a requestLogger to the request pipeline.
| |||||||||||||
| ValueTask< Stream > | Download (FileTicketResponse ticket, CancellationToken cancellationToken) | ||||||||||||
Downloads a file Stream for a given ticket .
| |||||||||||||
| async ValueTask | Upload (FileTicketResponse ticket, Stream? uploadStream, CancellationToken cancellationToken) | ||||||||||||
Uploads a given uploadStream for a given ticket .
| |||||||||||||
| async ValueTask< bool > | RefreshToken (CancellationToken cancellationToken) | ||||||||||||
| Attempt to refresh the stored Bearer token in Headers. | |||||||||||||
| async ValueTask< IAsyncDisposable > | CreateHubConnection< THubImplementation > (THubImplementation hubImplementation, IRetryPolicy? retryPolicy, Action< ILoggingBuilder >? loggingConfigureAction, CancellationToken cancellationToken) | ||||||||||||
Subscribe to all job updates available to the IRestServerClient.
| |||||||||||||
Protected Member Functions | |
| virtual async ValueTask< TResult > | RunRequest< TResult > (string route, HttpContent? content, HttpMethod method, long? instanceId, bool tokenRefresh, CancellationToken cancellationToken) |
| Main request method. | |
Properties | |
| Uri | Url [get] |
| The Uri pointing the tgstation-server. | |
| ApiHeaders | Headers [get, set] |
| The ApiHeaders the IApiClient uses. | |
| TimeSpan | Timeout [get, set] |
| The request timeout. | |
Properties inherited from Tgstation.Server.Client.IApiClient | |
Private Member Functions | |
| ValueTask< TResult > | TResult (route, new object(), HttpMethod.Put, null, false, cancellationToken) |
| ValueTask< TResult > | TResult (route, null, HttpMethod.Get, null, false, cancellationToken) |
| ValueTask< TResult > | TResult (route, new object(), HttpMethod.Post, null, false, cancellationToken) |
| ValueTask< TResult > | TResult (route, new object(), HttpMethod.Put, instanceId, false, cancellationToken) |
| ValueTask< TResult > | TResult (route, new object(), HttpPatch, instanceId, false, cancellationToken) |
| async ValueTask< HubConnection > | WrapHubInitialConnectAuthRefresh (Func< ValueTask< HubConnection > > connectFunc, CancellationToken cancellationToken) |
| Wrap a hub connection attempt via a connectFunc with proper token refreshing. | |
| async ValueTask< TResult > | RunRequest< TBody, TResult > (string route, TBody? body, HttpMethod method, long? instanceId, bool tokenRefresh, CancellationToken cancellationToken) |
| Main request method. | |
| async ValueTask | RunResultlessRequest< TBody > (string route, TBody? body, HttpMethod method, long? instanceId, bool tokenRefresh, CancellationToken cancellationToken) |
| Main request method. | |
| ValueTask | RunRequest (string route, HttpMethod method, long? instanceId, bool tokenRefresh, CancellationToken cancellationToken) |
| Main request method. | |
Static Private Member Functions | |
| static void | HandleBadResponse (HttpResponseMessage response, string json) |
| Handle a bad HTTP response . | |
Private Attributes | |
| readonly HttpClient | httpClient |
| The HttpClient for the ApiClient. | |
| readonly List< IRequestLogger > | requestLoggers |
| The IRequestLoggers used by the ApiClient. | |
| readonly List< HubConnection > | hubConnections |
| List of HubConnections created by the ApiClient. | |
| readonly? ApiHeaders | tokenRefreshHeaders |
| Backing field for Headers. | |
| readonly SemaphoreSlim | semaphoreSlim |
| The SemaphoreSlim for TokenResponse refreshes. | |
| readonly bool | authless |
| If the authentication header should be stripped from requests. | |
| ApiHeaders | headers |
| Backing field for Headers. | |
| bool | disposed |
| If the ApiClient is disposed. | |
Static Private Attributes | |
| static readonly HttpMethod | HttpPatch = new("PATCH") |
| PATCH HttpMethod. | |
| static readonly JsonSerializerSettings | SerializerSettings |
| The JsonSerializerSettings to use. | |
Definition at line 34 of file ApiClient.cs.
| Tgstation.Server.Client.ApiClient.ApiClient | ( | HttpClient | httpClient, |
| Uri | url, | ||
| ApiHeaders | apiHeaders, | ||
| ApiHeaders? | tokenRefreshHeaders, | ||
| bool | authless | ||
| ) |
Initializes a new instance of the ApiClient class.
| httpClient | The value of httpClient. |
| url | The value of Url. |
| apiHeaders | The value of Headers. |
| tokenRefreshHeaders | The value of tokenRefreshHeaders. |
| authless | The value of authless. |
Definition at line 168 of file ApiClient.cs.
References Tgstation.Server.Client.ApiClient.authless, Tgstation.Server.Client.ApiClient.headers, Tgstation.Server.Client.ApiClient.httpClient, Tgstation.Server.Client.ApiClient.hubConnections, Tgstation.Server.Client.ApiClient.requestLoggers, Tgstation.Server.Client.ApiClient.semaphoreSlim, Tgstation.Server.Client.ApiClient.tokenRefreshHeaders, and Tgstation.Server.Client.ApiClient.Url.
| void Tgstation.Server.Client.ApiClient.AddRequestLogger | ( | IRequestLogger | requestLogger | ) |
Adds a requestLogger to the request pipeline.
| requestLogger | The IRequestLogger to add. |
Implements Tgstation.Server.Client.IApiClient.
| ValueTask< TResult > Tgstation.Server.Client.ApiClient.Create< TBody, TResult > | ( | string | route, |
| TBody | body, | ||
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP PUT request.
| TBody | The type to of the request body. |
| TResult | The type of the response body. |
| route | The server route to make the request to. |
| body | The request body. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| TBody | : | class | |
| TBody | : | RunRequest | |
| TBody | : | TBody | |
| TBody | : | TResult | |
| TBody | : | route | |
| TBody | : | body | |
| TBody | : | HttpMethod.Put | |
| TBody | : | null | |
| TBody | : | false | |
| TBody | : | cancellationToken |
| ValueTask< TResult > Tgstation.Server.Client.ApiClient.Create< TBody, TResult > | ( | string | route, |
| TBody | body, | ||
| long | instanceId, | ||
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP PUT request.
| TBody | The type to of the request body. |
| TResult | The type of the response body. |
| route | The server route to make the request to. |
| body | The request body. |
| instanceId | The instance EntityId.Id to make the request to. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| TBody | : | class | |
| TBody | : | RunRequest | |
| TBody | : | TBody | |
| TBody | : | TResult | |
| TBody | : | route | |
| TBody | : | body | |
| TBody | : | HttpMethod.Put | |
| TBody | : | instanceId | |
| TBody | : | false | |
| TBody | : | cancellationToken |
| ValueTask< TResult > Tgstation.Server.Client.ApiClient.Create< TResult > | ( | string | route, |
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP PUT request.
| TResult | The type of the response body. |
| route | The server route to make the request to. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| ValueTask< TResult > Tgstation.Server.Client.ApiClient.Create< TResult > | ( | string | route, |
| long | instanceId, | ||
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP PUT request.
| TResult | The type of the response body. |
| route | The server route to make the request to. |
| instanceId | The instance EntityId.Id to make the request to. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| async ValueTask< IAsyncDisposable > Tgstation.Server.Client.ApiClient.CreateHubConnection< THubImplementation > | ( | THubImplementation | hubImplementation, |
| IRetryPolicy? | retryPolicy, | ||
| Action< ILoggingBuilder >? | loggingConfigureAction, | ||
| CancellationToken | cancellationToken | ||
| ) |
Subscribe to all job updates available to the IRestServerClient.
| THubImplementation | The Type of the hub being implemented. |
| hubImplementation | The THubImplementation to use for proxying the methods of the hub connection. |
| retryPolicy | The optional IRetryPolicy to use for the backing connection. The default retry policy waits for 1, 2, 4, 8, and 16 seconds, then 30s repeatedly. |
| loggingConfigureAction | The optional Action<T1> used to configure a ILoggingBuilder. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| THubImplementation | : | class |
Definition at line 360 of file ApiClient.cs.
References Tgstation.Server.Client.ApiClient.Headers, Tgstation.Server.Api.Routes.JobsHub, Tgstation.Server.Client.ApiClient.SerializerSettings, Tgstation.Server.Api.ApiHeaders.SetHubConnectionHeaders(), Tgstation.Server.Client.ApiClient.Timeout, and Tgstation.Server.Client.ApiClient.Url.

| ValueTask Tgstation.Server.Client.ApiClient.Delete | ( | string | route, |
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP DELETE request.
| route | The server route to make the request to. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| ValueTask Tgstation.Server.Client.ApiClient.Delete | ( | string | route, |
| long | instanceId, | ||
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP DELETE request.
| route | The server route to make the request to. |
| instanceId | The instance EntityId.Id to make the request to. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| ValueTask Tgstation.Server.Client.ApiClient.Delete< TBody > | ( | string | route, |
| TBody | body, | ||
| long | instanceId, | ||
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP DELETE request.
| TBody | The type to of the request body. |
| route | The server route to make the request to. |
| body | The request body. |
| instanceId | The instance EntityId.Id to make the request to. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| TBody | : | class | |
| TBody | : | RunResultlessRequest | |
| TBody | : | route | |
| TBody | : | body | |
| TBody | : | HttpMethod.Delete | |
| TBody | : | instanceId | |
| TBody | : | false | |
| TBody | : | cancellationToken |
| ValueTask< TResult > Tgstation.Server.Client.ApiClient.Delete< TBody, TResult > | ( | string | route, |
| TBody | body, | ||
| long | instanceId, | ||
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP DELETE request.
| TBody | The type to of the request body. |
| TResult | The type of the response body. |
| route | The server route to make the request to. |
| body | The request body. |
| instanceId | The instance EntityId.Id to make the request to. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| TBody | : | class | |
| TBody | : | RunRequest | |
| TBody | : | TBody | |
| TBody | : | TResult | |
| TBody | : | route | |
| TBody | : | body | |
| TBody | : | HttpMethod.Delete | |
| TBody | : | instanceId | |
| TBody | : | false | |
| TBody | : | cancellationToken |
| ValueTask< TResult > Tgstation.Server.Client.ApiClient.Delete< TResult > | ( | string | route, |
| long | instanceId, | ||
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP DELETE request.
| TResult | The type of the response body. |
| route | The server route to make the request to. |
| instanceId | The instance EntityId.Id to make the request to. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| async ValueTask Tgstation.Server.Client.ApiClient.DisposeAsync | ( | ) |
Definition at line 187 of file ApiClient.cs.
References Tgstation.Server.Client.ApiClient.disposed, Tgstation.Server.Client.ApiClient.httpClient, Tgstation.Server.Client.ApiClient.hubConnections, Tgstation.Server.Client.ApiClient.semaphoreSlim, and Tgstation.Server.Common.Extensions.ValueTaskExtensions.WhenAll().

| ValueTask< Stream > Tgstation.Server.Client.ApiClient.Download | ( | FileTicketResponse | ticket, |
| CancellationToken | cancellationToken | ||
| ) |
Downloads a file Stream for a given ticket .
| ticket | The FileTicketResponse to download. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.ITransferClient.
Definition at line 285 of file ApiClient.cs.
Referenced by Tgstation.Server.Client.AdministrationClient.GetLog(), and Tgstation.Server.Client.Components.ConfigurationClient.Read().

|
staticprivate |
Handle a bad HTTP response .
| response | The HttpResponseMessage. |
| json | The JSON string if any. |
Definition at line 116 of file ApiClient.cs.
References Tgstation.Server.Client.ApiClient.SerializerSettings.
| ValueTask Tgstation.Server.Client.ApiClient.Patch | ( | string | route, |
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP PATCH request.
| route | The server route to make the request to. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| ValueTask< TResult > Tgstation.Server.Client.ApiClient.Patch< TResult > | ( | string | route, |
| long | instanceId, | ||
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP PATCH request.
| TResult | The type of the response body. |
| route | The server route to make the request to. |
| instanceId | The instance EntityId.Id to make the request to. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| ValueTask< TResult > Tgstation.Server.Client.ApiClient.Read< TResult > | ( | string | route, |
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP GET request.
| TResult | The type of the response body. |
| route | The server route to make the request to. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| ValueTask< TResult > Tgstation.Server.Client.ApiClient.Read< TResult > | ( | string | route, |
| long | instanceId, | ||
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP GET request.
| TResult | The type of the response body. |
| route | The server route to make the request to. |
| instanceId | The instance EntityId.Id to make the request to. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| async ValueTask< bool > Tgstation.Server.Client.ApiClient.RefreshToken | ( | CancellationToken | cancellationToken | ) |
Attempt to refresh the stored Bearer token in Headers.
| cancellationToken | The CancellationToken for the operation. |
true if the refresh was successful, false if a refresh is unable to be performed.Definition at line 336 of file ApiClient.cs.
References Tgstation.Server.Api.Routes.ApiRoot, Tgstation.Server.Client.ApiClient.headers, Tgstation.Server.Client.ApiClient.semaphoreSlim, Tgstation.Server.Api.ApiHeaders.Token, Tgstation.Server.Client.ApiClient.tokenRefreshHeaders, and Tgstation.Server.Api.ApiHeaders.UserAgent.
Referenced by Tgstation.Server.Client.ApiClientTokenRefreshRetryPolicy.AttemptTokenRefresh().

|
private |
Main request method.
| route | The route to run. |
| method | The method of the request. |
| instanceId | The optional instance EntityId.Id for the request. |
| tokenRefresh | If this is a token refresh operation. |
| cancellationToken | The CancellationToken for the operation. |
|
private |
Main request method.
| TBody | The body Type. |
| TResult | The resulting POCO type. |
| route | The route to run. |
| body | The body of the request. |
| method | The method of the request. |
| instanceId | The optional instance EntityId.Id for the request. |
| tokenRefresh | If this is a token refresh operation. |
| cancellationToken | The CancellationToken for the operation. |
| TBody | : | class |
Definition at line 620 of file ApiClient.cs.
References Tgstation.Server.Api.ApiHeaders.ApplicationJsonMime.
|
protectedvirtual |
Main request method.
| TResult | The resulting POCO type. |
| route | The route to run. |
| content | The HttpContent of the request if any. |
| method | The method of the request. |
| instanceId | The optional instance EntityId.Id for the request. |
| tokenRefresh | If this is a token refresh operation. |
| cancellationToken | The CancellationToken for the operation. |
Definition at line 472 of file ApiClient.cs.
References Tgstation.Server.Common.Http.CachedResponseStream.Create(), Tgstation.Server.Api.ApiHeaders.SetRequestHeaders(), and Tgstation.Server.Common.Extensions.ValueTaskExtensions.WhenAll().

|
private |
Main request method.
| TBody | The body Type. |
| route | The route to run. |
| body | The body of the request. |
| method | The method of the request. |
| instanceId | The optional instance EntityId.Id for the request. |
| tokenRefresh | If this is a token refresh operation. |
| cancellationToken | The CancellationToken for the operation. |
| TBody | : | class | |
| TBody | : | await | |
| TBody | : | RunRequest | |
| TBody | : | TBody | |
| TBody | : | object | |
| TBody | : | route | |
| TBody | : | body | |
| TBody | : | method | |
| TBody | : | instanceId | |
| TBody | : | tokenRefresh | |
| TBody | : | cancellationToken |
|
private |
|
private |
|
private |
|
private |
|
private |
| ValueTask Tgstation.Server.Client.ApiClient.Update< TBody > | ( | string | route, |
| TBody | body, | ||
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP POST request.
| TBody | The type to of the request body. |
| route | The server route to make the request to. |
| body | The request body. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| TBody | : | class | |
| TBody | : | RunResultlessRequest | |
| TBody | : | route | |
| TBody | : | body | |
| TBody | : | HttpMethod.Post | |
| TBody | : | null | |
| TBody | : | false | |
| TBody | : | cancellationToken |
| ValueTask< TResult > Tgstation.Server.Client.ApiClient.Update< TBody, TResult > | ( | string | route, |
| TBody | body, | ||
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP POST request.
| TBody | The type to of the request body. |
| TResult | The type of the response body. |
| route | The server route to make the request to. |
| body | The request body. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| TBody | : | class | |
| TBody | : | RunRequest | |
| TBody | : | TBody | |
| TBody | : | TResult | |
| TBody | : | route | |
| TBody | : | body | |
| TBody | : | HttpMethod.Post | |
| TBody | : | null | |
| TBody | : | false | |
| TBody | : | cancellationToken |
| ValueTask< TResult > Tgstation.Server.Client.ApiClient.Update< TBody, TResult > | ( | string | route, |
| TBody | body, | ||
| long | instanceId, | ||
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP POST request.
| TBody | The type to of the request body. |
| TResult | The type of the response body. |
| route | The server route to make the request to. |
| body | The request body. |
| instanceId | The instance EntityId.Id to make the request to. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| TBody | : | class | |
| TBody | : | RunRequest | |
| TBody | : | TBody | |
| TBody | : | TResult | |
| TBody | : | route | |
| TBody | : | body | |
| TBody | : | HttpMethod.Post | |
| TBody | : | instanceId | |
| TBody | : | false | |
| TBody | : | cancellationToken |
| ValueTask< TResult > Tgstation.Server.Client.ApiClient.Update< TResult > | ( | string | route, |
| CancellationToken | cancellationToken | ||
| ) |
Run an HTTP POST request.
| TResult | The type of the response body. |
| route | The server route to make the request to. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.IApiClient.
| async ValueTask Tgstation.Server.Client.ApiClient.Upload | ( | FileTicketResponse | ticket, |
| Stream? | uploadStream, | ||
| CancellationToken | cancellationToken | ||
| ) |
Uploads a given uploadStream for a given ticket .
| ticket | The FileTicketResponse to download. |
| uploadStream | The Stream to upload. null represents an empty file. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Client.ITransferClient.
Definition at line 300 of file ApiClient.cs.
Referenced by Tgstation.Server.Client.Components.EngineClient.SetActiveVersion(), Tgstation.Server.Client.AdministrationClient.Update(), and Tgstation.Server.Client.Components.ConfigurationClient.Write().

|
private |
Wrap a hub connection attempt via a connectFunc with proper token refreshing.
| connectFunc | The HubConnection Func<TResult>. |
| cancellationToken | The CancellationToken for the operation. |
Definition at line 585 of file ApiClient.cs.
|
private |
If the authentication header should be stripped from requests.
Definition at line 99 of file ApiClient.cs.
Referenced by Tgstation.Server.Client.ApiClient.ApiClient().
|
private |
If the ApiClient is disposed.
Definition at line 109 of file ApiClient.cs.
Referenced by Tgstation.Server.Client.ApiClient.DisposeAsync().
|
private |
Backing field for Headers.
Definition at line 104 of file ApiClient.cs.
Referenced by Tgstation.Server.Client.ApiClient.ApiClient(), and Tgstation.Server.Client.ApiClient.RefreshToken().
|
private |
The HttpClient for the ApiClient.
Definition at line 74 of file ApiClient.cs.
Referenced by Tgstation.Server.Client.ApiClient.ApiClient(), and Tgstation.Server.Client.ApiClient.DisposeAsync().
|
staticprivate |
PATCH HttpMethod.
HOW IS THIS NOT INCLUDED IN THE FRAMEWORK??!?!?
Definition at line 40 of file ApiClient.cs.
|
private |
List of HubConnections created by the ApiClient.
Definition at line 84 of file ApiClient.cs.
Referenced by Tgstation.Server.Client.ApiClient.ApiClient(), and Tgstation.Server.Client.ApiClient.DisposeAsync().
|
private |
The IRequestLoggers used by the ApiClient.
Definition at line 79 of file ApiClient.cs.
Referenced by Tgstation.Server.Client.ApiClient.ApiClient().
|
private |
The SemaphoreSlim for TokenResponse refreshes.
Definition at line 94 of file ApiClient.cs.
Referenced by Tgstation.Server.Client.ApiClient.ApiClient(), Tgstation.Server.Client.ApiClient.DisposeAsync(), and Tgstation.Server.Client.ApiClient.RefreshToken().
|
staticprivate |
The JsonSerializerSettings to use.
Definition at line 62 of file ApiClient.cs.
Referenced by Tgstation.Server.Client.ApiClient.CreateHubConnection< THubImplementation >(), and Tgstation.Server.Client.ApiClient.HandleBadResponse().
|
private |
Backing field for Headers.
Definition at line 89 of file ApiClient.cs.
Referenced by Tgstation.Server.Client.ApiClient.ApiClient(), and Tgstation.Server.Client.ApiClient.RefreshToken().
|
getset |
The ApiHeaders the IApiClient uses.
Implements Tgstation.Server.Client.IApiClient.
Definition at line 46 of file ApiClient.cs.
Referenced by Tgstation.Server.Client.ApiClient.CreateHubConnection< THubImplementation >().
|
getset |
The request timeout.
Implements Tgstation.Server.Client.IApiClient.
Definition at line 53 of file ApiClient.cs.
Referenced by Tgstation.Server.Client.ApiClient.CreateHubConnection< THubImplementation >().
|
get |
The Uri pointing the tgstation-server.
Implements Tgstation.Server.Client.IApiClient.
Definition at line 43 of file ApiClient.cs.
Referenced by Tgstation.Server.Client.ApiClient.ApiClient(), and Tgstation.Server.Client.ApiClient.CreateHubConnection< THubImplementation >().