Table of Contents

Class SurveysInterviewersInstructionsClient

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

Constructors

SurveysInterviewersInstructionsClient(string, HttpClient)

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

Method used to delete the interviewer instruction file.

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

Parameters

surveyId string

The id of the survey

cancellationToken CancellationToken

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

Returns

Task

Interviewer instructions deleted

Exceptions

NfieldSdkException

A server side error occurred.

GetAsync(string, CancellationToken)

Method used to download interviewer instruction file.

public virtual Task<FileResponse> GetAsync(string surveyId, CancellationToken cancellationToken = default)

Parameters

surveyId string

The id of the survey

cancellationToken CancellationToken

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

Returns

Task<FileResponse>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PostAsync(string, string, FileParameter, CancellationToken)

Method used to upload interviewer instruction file.
The re-upload of a new pdf file for the same survey it will replace the existing one.

public virtual Task<BackgroundActivityStatus> PostAsync(string surveyId, string fileName, FileParameter file = null, CancellationToken cancellationToken = default)

Parameters

surveyId string

The id of the survey

fileName string

The name of the file

file FileParameter
cancellationToken CancellationToken

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

Returns

Task<BackgroundActivityStatus>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

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

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

Type Parameters

T