Class DomainThemesClient
public class DomainThemesClient
- Inheritance
-
DomainThemesClient
- Inherited Members
Constructors
DomainThemesClient(string, HttpClient)
public DomainThemesClient(string baseUrl, HttpClient httpClient)
Parameters
baseUrlstringhttpClientHttpClient
Properties
BaseUrl
public string BaseUrl { get; set; }
Property Value
JsonSerializerSettings
protected JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
- JsonSerializerSettings
ReadResponseAsString
public bool ReadResponseAsString { get; set; }
Property Value
Methods
DeleteAsync(string, CancellationToken)
Deletes the requested theme
public virtual Task DeleteAsync(string themeId, CancellationToken cancellationToken = default)
Parameters
themeIdstringThe requested theme to delete
cancellationTokenCancellationTokenA 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
themeIdstringThe requested theme download Url
cancellationTokenCancellationTokenA 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
templateIdstringThe template id
themeNamestringThe theme name
fileFileParametercancellationTokenCancellationTokenA 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
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T