Class ApiClient
Implements
Inherited Members
Namespace: Unity.Services.Apis
Assembly: Unity.Services.Apis.dll
Syntax
public class ApiClient : IApiClient
Constructors
ApiClient(IRetryPolicy)
Creates an api client responsible for network operations
Declaration
public ApiClient(IRetryPolicy retryPolicy = null)
Parameters
Type | Name | Description |
---|---|---|
IRetry |
retryPolicy | The retry policy |
Methods
Delete(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the DELETE http verb.
Declaration
public ApiOperation Delete(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
Api |
options | The request parameters to pass along to the client. |
IApi |
configuration | Per-request configurable settings. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
Delete<T>(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the DELETE http verb.
Declaration
public ApiOperation<T> Delete<T>(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
Api |
options | The request parameters to pass along to the client. |
IApi |
configuration | Per-request configurable settings. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
Type Parameters
Name | Description |
---|---|
T | The return type. |
Get(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the GET http verb.
Declaration
public ApiOperation Get(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
Api |
options | The request parameters to pass along to the client. |
IApi |
configuration | Per-request configurable settings. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
Get<T>(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the GET http verb.
Declaration
public ApiOperation<T> Get<T>(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
Api |
options | The request parameters to pass along to the client. |
IApi |
configuration | Per-request configurable settings. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
Type Parameters
Name | Description |
---|---|
T | The return type. |
Head(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the HEAD http verb.
Declaration
public ApiOperation Head(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
Api |
options | The request parameters to pass along to the client. |
IApi |
configuration | Per-request configurable settings. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
Head<T>(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the HEAD http verb.
Declaration
public ApiOperation<T> Head<T>(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
Api |
options | The request parameters to pass along to the client. |
IApi |
configuration | Per-request configurable settings. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
Type Parameters
Name | Description |
---|---|
T | The return type. |
Options(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the OPTIONS http verb.
Declaration
public ApiOperation Options(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
Api |
options | The request parameters to pass along to the client. |
IApi |
configuration | Per-request configurable settings. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
Options<T>(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the OPTIONS http verb.
Declaration
public ApiOperation<T> Options<T>(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
Api |
options | The request parameters to pass along to the client. |
IApi |
configuration | Per-request configurable settings. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
Type Parameters
Name | Description |
---|---|
T | The return type. |
Patch(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the PATCH http verb.
Declaration
public ApiOperation Patch(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
Api |
options | The request parameters to pass along to the client. |
IApi |
configuration | Per-request configurable settings. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
Patch<T>(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the PATCH http verb.
Declaration
public ApiOperation<T> Patch<T>(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
Api |
options | The request parameters to pass along to the client. |
IApi |
configuration | Per-request configurable settings. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
Type Parameters
Name | Description |
---|---|
T | The return type. |
Post(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the POST http verb.
Declaration
public ApiOperation Post(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
Api |
options | The request parameters to pass along to the client. |
IApi |
configuration | Per-request configurable settings. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
Post<T>(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the POST http verb.
Declaration
public ApiOperation<T> Post<T>(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
Api |
options | The request parameters to pass along to the client. |
IApi |
configuration | Per-request configurable settings. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
Type Parameters
Name | Description |
---|---|
T | The return type. |
Put(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the PUT http verb.
Declaration
public ApiOperation Put(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
Api |
options | The request parameters to pass along to the client. |
IApi |
configuration | Per-request configurable settings. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
Put<T>(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the PUT http verb.
Declaration
public ApiOperation<T> Put<T>(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | path | The relative path to invoke. |
Api |
options | The request parameters to pass along to the client. |
IApi |
configuration | Per-request configurable settings. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
Type Parameters
Name | Description |
---|---|
T | The return type. |