Table of Contents

Class DomainSurveyGroupsClient

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

Constructors

DomainSurveyGroupsClient(string, HttpClient)

public DomainSurveyGroupsClient(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 a survey group
Survey groups have to be 'empty' before they can be deleted. An empty survey group has no surveys associated to it.

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

Parameters

surveyGroupId int
cancellationToken CancellationToken

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

Returns

Task

Successful

Exceptions

NfieldSdkException

A server side error occurred.

GetAllAsync(CancellationToken)

Returns the details of all survey groups in the domain.

public virtual Task<ICollection<SurveyGroupModel>> GetAllAsync(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<SurveyGroupModel>>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

GetAsync(int, CancellationToken)

Retrieve a specific survey group

public virtual Task<SurveyGroupModel> GetAsync(int surveyGroupId, CancellationToken cancellationToken = default)

Parameters

surveyGroupId int

id of the survey group

cancellationToken CancellationToken

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

Returns

Task<SurveyGroupModel>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PatchAsync(int, UpdateSurveyGroupModel, CancellationToken)

Update a survey group

public virtual Task<SurveyGroupModel> PatchAsync(int surveyGroupId, UpdateSurveyGroupModel model, CancellationToken cancellationToken = default)

Parameters

surveyGroupId int
model UpdateSurveyGroupModel
cancellationToken CancellationToken

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

Returns

Task<SurveyGroupModel>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PostAsync(CreateSurveyGroupModel, CancellationToken)

Create a survey group. An id is automatically generated.

public virtual Task<SurveyGroupModel> PostAsync(CreateSurveyGroupModel model, CancellationToken cancellationToken = default)

Parameters

model CreateSurveyGroupModel
cancellationToken CancellationToken

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

Returns

Task<SurveyGroupModel>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

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

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

Type Parameters

T