Table of Contents

Class DomainThemesClient

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

Constructors

DomainThemesClient(string, HttpClient)

public DomainThemesClient(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(string, CancellationToken)

Deletes the requested theme

public virtual Task DeleteAsync(string themeId, CancellationToken cancellationToken = default)

Parameters

themeId string

The requested theme to delete

cancellationToken CancellationToken

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

Returns

Task

Theme Deleted

Exceptions

NfieldSdkException

A server side error occurred.

GetAsync(string, CancellationToken)

Gets the requested theme download URL

public virtual Task<ThemeUrlResponseModel> GetAsync(string themeId = null, CancellationToken cancellationToken = default)

Parameters

themeId string

The requested theme download Url

cancellationToken CancellationToken

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

Returns

Task<ThemeUrlResponseModel>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PutAsync(string, string, FileParameter, CancellationToken)

Creates or updates the theme file using the Template Id and Theme name.

public virtual Task<BackgroundActivityResponseModel> PutAsync(string templateId = null, string themeName = null, FileParameter file = null, CancellationToken cancellationToken = default)

Parameters

templateId string

The template id

themeName string

The theme name

file FileParameter
cancellationToken CancellationToken

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

Returns

Task<BackgroundActivityResponseModel>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

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

protected virtual Task<DomainThemesClient.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<DomainThemesClient.ObjectResponseResult<T>>

Type Parameters

T