LUSID C# SDK
Public Member Functions | Properties | List of all members
Lusid.Sdk.Client.ApiClient Class Reference

Provides a default implementation of an Api client (both synchronous and asynchronous implementations), encapsulating general REST accessor use cases. More...

Inheritance diagram for Lusid.Sdk.Client.ApiClient:
Inheritance graph
[legend]

Public Member Functions

 ApiClient ()
 Initializes a new instance of the ApiClient, defaulting to the global configurations' base url. More...
 
 ApiClient (string basePath, Func< RestClientOptions, HttpMessageHandler >? CreateHttpMessageHandler=null, bool disposeHandler=true)
 Initializes a new instance of the ApiClient More...
 
Task< ApiResponse< T > > GetAsync< T > (string path, RequestOptions options, IReadableConfiguration configuration=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken))
 Make a HTTP GET request (async). More...
 
Task< ApiResponse< T > > PostAsync< T > (string path, RequestOptions options, IReadableConfiguration configuration=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken))
 Make a HTTP POST request (async). More...
 
Task< ApiResponse< T > > PutAsync< T > (string path, RequestOptions options, IReadableConfiguration configuration=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken))
 Make a HTTP PUT request (async). More...
 
Task< ApiResponse< T > > DeleteAsync< T > (string path, RequestOptions options, IReadableConfiguration configuration=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken))
 Make a HTTP DELETE request (async). More...
 
Task< ApiResponse< T > > HeadAsync< T > (string path, RequestOptions options, IReadableConfiguration configuration=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken))
 Make a HTTP HEAD request (async). More...
 
Task< ApiResponse< T > > OptionsAsync< T > (string path, RequestOptions options, IReadableConfiguration configuration=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken))
 Make a HTTP OPTION request (async). More...
 
Task< ApiResponse< T > > PatchAsync< T > (string path, RequestOptions options, IReadableConfiguration configuration=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken))
 Make a HTTP PATCH request (async). More...
 
ApiResponse< T > Get< T > (string path, RequestOptions options, IReadableConfiguration configuration=null)
 Make a HTTP GET request (synchronous). More...
 
ApiResponse< T > Post< T > (string path, RequestOptions options, IReadableConfiguration configuration=null)
 Make a HTTP POST request (synchronous). More...
 
ApiResponse< T > Put< T > (string path, RequestOptions options, IReadableConfiguration configuration=null)
 Make a HTTP PUT request (synchronous). More...
 
ApiResponse< T > Delete< T > (string path, RequestOptions options, IReadableConfiguration configuration=null)
 Make a HTTP DELETE request (synchronous). More...
 
ApiResponse< T > Head< T > (string path, RequestOptions options, IReadableConfiguration configuration=null)
 Make a HTTP HEAD request (synchronous). More...
 
ApiResponse< T > Options< T > (string path, RequestOptions options, IReadableConfiguration configuration=null)
 Make a HTTP OPTION request (synchronous). More...
 
ApiResponse< T > Patch< T > (string path, RequestOptions options, IReadableConfiguration configuration=null)
 Make a HTTP PATCH request (synchronous). More...
 

Properties

JsonSerializerSettings SerializerSettings [get, set]
 Specifies the settings on a JsonSerializer object. These settings can be adjusted to accommodate custom serialization rules. More...
 

Detailed Description

Provides a default implementation of an Api client (both synchronous and asynchronous implementations), encapsulating general REST accessor use cases.

Constructor & Destructor Documentation

◆ ApiClient() [1/2]

Lusid.Sdk.Client.ApiClient.ApiClient ( )
inline

Initializes a new instance of the ApiClient, defaulting to the global configurations' base url.

◆ ApiClient() [2/2]

Lusid.Sdk.Client.ApiClient.ApiClient ( string  basePath,
Func< RestClientOptions, HttpMessageHandler >?  CreateHttpMessageHandler = null,
bool  disposeHandler = true 
)
inline

Initializes a new instance of the ApiClient

Parameters
basePathThe target service's base path in URL format.
CreateHttpMessageHandlerA function to create a HttpMessageHandler for each REST request
disposeHandlerShould the HttpMessageHandler be disposed of after each request
Exceptions
ArgumentException

Member Function Documentation

◆ Delete< T >()

ApiResponse<T> Lusid.Sdk.Client.ApiClient.Delete< T > ( string  path,
RequestOptions  options,
IReadableConfiguration  configuration = null 
)
inline

Make a HTTP DELETE request (synchronous).

Parameters
pathThe target path (or resource).
optionsThe additional request options.
configurationA per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method.
Returns
A Task containing ApiResponse

Implements Lusid.Sdk.Client.ISynchronousClient.

◆ DeleteAsync< T >()

Task<ApiResponse<T> > Lusid.Sdk.Client.ApiClient.DeleteAsync< T > ( string  path,
RequestOptions  options,
IReadableConfiguration  configuration = null,
System.Threading.CancellationToken  cancellationToken = default(System.Threading.CancellationToken) 
)
inline

Make a HTTP DELETE request (async).

Parameters
pathThe target path (or resource).
optionsThe additional request options.
configurationA per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method.
cancellationTokenToken that enables callers to cancel the request.
Returns
A Task containing ApiResponse

Implements Lusid.Sdk.Client.IAsynchronousClient.

◆ Get< T >()

ApiResponse<T> Lusid.Sdk.Client.ApiClient.Get< T > ( string  path,
RequestOptions  options,
IReadableConfiguration  configuration = null 
)
inline

Make a HTTP GET request (synchronous).

Parameters
pathThe target path (or resource).
optionsThe additional request options.
configurationA per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method.
Returns
A Task containing ApiResponse

Implements Lusid.Sdk.Client.ISynchronousClient.

◆ GetAsync< T >()

Task<ApiResponse<T> > Lusid.Sdk.Client.ApiClient.GetAsync< T > ( string  path,
RequestOptions  options,
IReadableConfiguration  configuration = null,
System.Threading.CancellationToken  cancellationToken = default(System.Threading.CancellationToken) 
)
inline

Make a HTTP GET request (async).

Parameters
pathThe target path (or resource).
optionsThe additional request options.
configurationA per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method.
cancellationTokenToken that enables callers to cancel the request.
Returns
A Task containing ApiResponse

Implements Lusid.Sdk.Client.IAsynchronousClient.

◆ Head< T >()

ApiResponse<T> Lusid.Sdk.Client.ApiClient.Head< T > ( string  path,
RequestOptions  options,
IReadableConfiguration  configuration = null 
)
inline

Make a HTTP HEAD request (synchronous).

Parameters
pathThe target path (or resource).
optionsThe additional request options.
configurationA per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method.
Returns
A Task containing ApiResponse

Implements Lusid.Sdk.Client.ISynchronousClient.

◆ HeadAsync< T >()

Task<ApiResponse<T> > Lusid.Sdk.Client.ApiClient.HeadAsync< T > ( string  path,
RequestOptions  options,
IReadableConfiguration  configuration = null,
System.Threading.CancellationToken  cancellationToken = default(System.Threading.CancellationToken) 
)
inline

Make a HTTP HEAD request (async).

Parameters
pathThe target path (or resource).
optionsThe additional request options.
configurationA per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method.
cancellationTokenToken that enables callers to cancel the request.
Returns
A Task containing ApiResponse

Implements Lusid.Sdk.Client.IAsynchronousClient.

◆ Options< T >()

ApiResponse<T> Lusid.Sdk.Client.ApiClient.Options< T > ( string  path,
RequestOptions  options,
IReadableConfiguration  configuration = null 
)
inline

Make a HTTP OPTION request (synchronous).

Parameters
pathThe target path (or resource).
optionsThe additional request options.
configurationA per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method.
Returns
A Task containing ApiResponse

Implements Lusid.Sdk.Client.ISynchronousClient.

◆ OptionsAsync< T >()

Task<ApiResponse<T> > Lusid.Sdk.Client.ApiClient.OptionsAsync< T > ( string  path,
RequestOptions  options,
IReadableConfiguration  configuration = null,
System.Threading.CancellationToken  cancellationToken = default(System.Threading.CancellationToken) 
)
inline

Make a HTTP OPTION request (async).

Parameters
pathThe target path (or resource).
optionsThe additional request options.
configurationA per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method.
cancellationTokenToken that enables callers to cancel the request.
Returns
A Task containing ApiResponse

Implements Lusid.Sdk.Client.IAsynchronousClient.

◆ Patch< T >()

ApiResponse<T> Lusid.Sdk.Client.ApiClient.Patch< T > ( string  path,
RequestOptions  options,
IReadableConfiguration  configuration = null 
)
inline

Make a HTTP PATCH request (synchronous).

Parameters
pathThe target path (or resource).
optionsThe additional request options.
configurationA per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method.
Returns
A Task containing ApiResponse

Implements Lusid.Sdk.Client.ISynchronousClient.

◆ PatchAsync< T >()

Task<ApiResponse<T> > Lusid.Sdk.Client.ApiClient.PatchAsync< T > ( string  path,
RequestOptions  options,
IReadableConfiguration  configuration = null,
System.Threading.CancellationToken  cancellationToken = default(System.Threading.CancellationToken) 
)
inline

Make a HTTP PATCH request (async).

Parameters
pathThe target path (or resource).
optionsThe additional request options.
configurationA per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method.
cancellationTokenToken that enables callers to cancel the request.
Returns
A Task containing ApiResponse

Implements Lusid.Sdk.Client.IAsynchronousClient.

◆ Post< T >()

ApiResponse<T> Lusid.Sdk.Client.ApiClient.Post< T > ( string  path,
RequestOptions  options,
IReadableConfiguration  configuration = null 
)
inline

Make a HTTP POST request (synchronous).

Parameters
pathThe target path (or resource).
optionsThe additional request options.
configurationA per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method.
Returns
A Task containing ApiResponse

Implements Lusid.Sdk.Client.ISynchronousClient.

◆ PostAsync< T >()

Task<ApiResponse<T> > Lusid.Sdk.Client.ApiClient.PostAsync< T > ( string  path,
RequestOptions  options,
IReadableConfiguration  configuration = null,
System.Threading.CancellationToken  cancellationToken = default(System.Threading.CancellationToken) 
)
inline

Make a HTTP POST request (async).

Parameters
pathThe target path (or resource).
optionsThe additional request options.
configurationA per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method.
cancellationTokenToken that enables callers to cancel the request.
Returns
A Task containing ApiResponse

Implements Lusid.Sdk.Client.IAsynchronousClient.

◆ Put< T >()

ApiResponse<T> Lusid.Sdk.Client.ApiClient.Put< T > ( string  path,
RequestOptions  options,
IReadableConfiguration  configuration = null 
)
inline

Make a HTTP PUT request (synchronous).

Parameters
pathThe target path (or resource).
optionsThe additional request options.
configurationA per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method.
Returns
A Task containing ApiResponse

Implements Lusid.Sdk.Client.ISynchronousClient.

◆ PutAsync< T >()

Task<ApiResponse<T> > Lusid.Sdk.Client.ApiClient.PutAsync< T > ( string  path,
RequestOptions  options,
IReadableConfiguration  configuration = null,
System.Threading.CancellationToken  cancellationToken = default(System.Threading.CancellationToken) 
)
inline

Make a HTTP PUT request (async).

Parameters
pathThe target path (or resource).
optionsThe additional request options.
configurationA per-request configuration object. It is assumed that any merge with GlobalConfiguration has been done before calling this method.
cancellationTokenToken that enables callers to cancel the request.
Returns
A Task containing ApiResponse

Implements Lusid.Sdk.Client.IAsynchronousClient.

Property Documentation

◆ SerializerSettings

JsonSerializerSettings Lusid.Sdk.Client.ApiClient.SerializerSettings
getset
Initial value:
= new JsonSerializerSettings
{
ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor,
ContractResolver = new DefaultContractResolver
{
NamingStrategy = new CamelCaseNamingStrategy
{
OverrideSpecifiedNames = false
}
},
DateTimeZoneHandling = DateTimeZoneHandling.Utc
}

Specifies the settings on a JsonSerializer object. These settings can be adjusted to accommodate custom serialization rules.


The documentation for this class was generated from the following file: