Interface IApiClient
Contract for Asynchronous RESTful API interactions.
This interface allows consumers to provide a custom API accessor client.
Namespace: Unity.Services.Apis
Assembly: Unity.Services.Apis.dll
Syntax
public interface IApiClient
Methods
Delete(string, ApiRequestOptions, IApiConfiguration, CancellationToken)
Executes a call to path
using the DELETE http verb.
Declaration
ApiOperation Delete(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken = default)
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
ApiOperation<T> Delete<T>(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken = default)
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
ApiOperation Get(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken = default)
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
ApiOperation<T> Get<T>(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken = default)
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
ApiOperation Head(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken = default)
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
ApiOperation<T> Head<T>(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken = default)
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
ApiOperation Options(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken = default)
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
ApiOperation<T> Options<T>(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken = default)
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
ApiOperation Patch(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken = default)
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
ApiOperation<T> Patch<T>(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken = default)
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
ApiOperation Post(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken = default)
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
ApiOperation<T> Post<T>(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken = default)
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
ApiOperation Put(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken = default)
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
ApiOperation<T> Put<T>(string path, ApiRequestOptions options, IApiConfiguration configuration, CancellationToken cancellationToken = default)
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. |