Table of Contents

Class CRUDClient<TSelf>

REST API client for performing CRUD operations.

public abstract class CRUDClient<TSelf> : RESTClient where TSelf : CRUDClient<TSelf>

Type Parameters

TSelf
Inheritance
CRUDClient<TSelf>
Derived
Inherited Members
Extension Methods

Constructors

CRUDClient(CRUDClientSettings)

protected CRUDClient(CRUDClientSettings clientSettings)

Parameters

clientSettings CRUDClientSettings

Properties

BaseUrl

public string BaseUrl { get; }

Property Value

string

BetaVersion

The beta version of the API if available.

public string BetaVersion { get; }

Property Value

string

CRUDLogger

Special logger for logging CRUD operations.

public CRUDLogger CRUDLogger { get; }

Property Value

CRUDLogger

Name

The name of the API.

public string Name { get; }

Property Value

string

OnException

Event invoked when an error occurs during an API request.

public CRUDClient<TSelf>.ExceptionHandler OnException { get; set; }

Property Value

CRUDClient<TSelf>.ExceptionHandler

Version

The version of the API.

public string Version { get; }

Property Value

string

Methods

FormatErrorMessage(string)

Parses the error res from the API. Override this method to customize the error message parsing logic.

protected abstract string FormatErrorMessage(string errorJson)

Parameters

errorJson string

Returns

string

The error message.

GetApiKey()

public string GetApiKey()

Returns

string

HandleException(Exception)

public void HandleException(Exception exception)

Parameters

exception Exception

IsDeletedPredicate(RESTResponse)

Override this method to handle the status of a Delete operation.

protected abstract bool IsDeletedPredicate(RESTResponse res)

Parameters

res RESTResponse

Returns

bool