Table of Contents

Class SurveysParentSurveysClient

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

Constructors

SurveysParentSurveysClient(string, HttpClient)

public SurveysParentSurveysClient(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

GetParentSurveysAsync(CancellationToken)

Retrieve all parent surveys. This list can be filtered and sorted
using standard OData syntax.
Parent surveys is a logical organization for surveys
A Parent survey can't be used to perform interviews, it need children (Waves), each wave works as a survey and can be managed like a regular survey through the Surveys Endpoints

public virtual Task<ICollection<SurveyModel>> GetParentSurveysAsync(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<SurveyModel>>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PostAsync(ParentSurveyCreateRequestModel, CancellationToken)

Create new ONLINE parent survey.
Parent surveys is a logical organization for surveys that allow create waves

public virtual Task<SurveyModel> PostAsync(ParentSurveyCreateRequestModel newSurvey, CancellationToken cancellationToken = default)

Parameters

newSurvey ParentSurveyCreateRequestModel

An object describing the details for the new parent survey

cancellationToken CancellationToken

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

Returns

Task<SurveyModel>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

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

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

Type Parameters

T