Table of Contents

Class DomainLanguageTranslationsClient

Namespace
Nfield.SDK
Assembly
Nfield.Public.SDK.dll
public class DomainLanguageTranslationsClient
Inheritance
DomainLanguageTranslationsClient
Inherited Members

Constructors

DomainLanguageTranslationsClient(string, HttpClient)

public DomainLanguageTranslationsClient(string baseUrl, HttpClient httpClient)

Parameters

baseUrl string
httpClient HttpClient

Properties

BaseUrl

public string BaseUrl { get; set; }

Property Value

string

JsonSerializerSettings

protected JsonSerializerSettings JsonSerializerSettings { get; }

Property Value

JsonSerializerSettings

ReadResponseAsString

public bool ReadResponseAsString { get; set; }

Property Value

bool

Methods

DeleteAsync(int, CancellationToken)

Delete the domain language by id.

public virtual Task DeleteAsync(int languageId, CancellationToken cancellationToken = default)

Parameters

languageId int

The id of the language to delete

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task

Language deleted

Exceptions

NfieldSdkException

A server side error occurred.

GetAsync(CancellationToken)

Gets all domain languages for the domain.

public virtual Task<ICollection<DomainLanguageTranslationsResponseModel>> GetAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<ICollection<DomainLanguageTranslationsResponseModel>>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PatchAsync(int, DomainLanguageTranslationsRequestModel, CancellationToken)

Patch the domain language.

public virtual Task<DomainLanguageTranslationsResponseModel> PatchAsync(int languageId, DomainLanguageTranslationsRequestModel domainLanguage, CancellationToken cancellationToken = default)

Parameters

languageId int

The id of the language to update

domainLanguage DomainLanguageTranslationsRequestModel

domain language parameters

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<DomainLanguageTranslationsResponseModel>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PostAsync(DomainLanguageTranslationsRequestModel, CancellationToken)

Create a new domain language

public virtual Task<DomainLanguageTranslationsResponseModel> PostAsync(DomainLanguageTranslationsRequestModel domainLanguage, CancellationToken cancellationToken = default)

Parameters

domainLanguage DomainLanguageTranslationsRequestModel

domain language parameters

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task<DomainLanguageTranslationsResponseModel>

Language Created

Exceptions

NfieldSdkException

A server side error occurred.

ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)

protected virtual Task<DomainLanguageTranslationsClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)

Parameters

response HttpResponseMessage
headers IReadOnlyDictionary<string, IEnumerable<string>>
cancellationToken CancellationToken

Returns

Task<DomainLanguageTranslationsClient.ObjectResponseResult<T>>

Type Parameters

T