Table of Contents

Class DomainDeliveryRepositoriesSurveysClient

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

Constructors

DomainDeliveryRepositoriesSurveysClient(string, HttpClient)

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

Removes a Survey from the repository's added surveys.

public virtual Task DeleteAsync(long repositoryId, string surveyId, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The identifier for the repository.

surveyId string

The Id of the Survey that will be removed.

cancellationToken CancellationToken

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

Returns

Task

Removes the selected survey from the repository's added surveys

Exceptions

NfieldSdkException

A server side error occurred.

GetAsync(long, CancellationToken)

Returns the surveys of the given repository.
Returns first 100. The list can be filtered, sorted and supports paging using standard OData syntax.

public virtual Task<ICollection<RepositorySurveyModel>> GetAsync(long repositoryId, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The repository id.

cancellationToken CancellationToken

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

Returns

Task<ICollection<RepositorySurveyModel>>

Returns the repository surveys

Exceptions

NfieldSdkException

A server side error occurred.

PostAsync(long, IEnumerable<string>, CancellationToken)

Adds the selected surveys to the repository.

public virtual Task PostAsync(long repositoryId, IEnumerable<string> nfieldSurveyIds, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The repository id.

nfieldSurveyIds IEnumerable<string>

The nfieldSurveyIds of the surveys to add to the repository.

cancellationToken CancellationToken

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

Returns

Task

The selected surveys have been added to the repository

Exceptions

NfieldSdkException

A server side error occurred.

PutAsync(long, string, CancellationToken)

Re-initiates a paused Survey in the selected Repository.

public virtual Task PutAsync(long repositoryId, string surveyId, CancellationToken cancellationToken = default)

Parameters

repositoryId long

The identifier for the repository.

surveyId string

The Id of the Survey that will be reinitialized.

cancellationToken CancellationToken

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

Returns

Task

Reinitiates a paused Survey in the selected Repository

Exceptions

NfieldSdkException

A server side error occurred.

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

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

Type Parameters

T