Table of Contents

Class SurveysPackageClient

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

Constructors

SurveysPackageClient(string, HttpClient)

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

GetAsync(string, InterviewPackageType?, CancellationToken)

Get the specified type of package for the specified survey.

public virtual Task<SurveyPackageV1Model> GetAsync(string surveyId, InterviewPackageType? type = null, CancellationToken cancellationToken = default)

Parameters

surveyId string

is of the survey

type InterviewPackageType?

type of package to get

cancellationToken CancellationToken

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

Returns

Task<SurveyPackageV1Model>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

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

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

Type Parameters

T