Table of Contents

Class SurveysInterviewSimulationsClient

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

Constructors

SurveysInterviewSimulationsClient(string, HttpClient)

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

GetHintsAsync(string, CancellationToken)

Gets hints for the survey simulation.

public virtual Task<GetHintsResponseModel> GetHintsAsync(string surveyId, CancellationToken cancellationToken = default)

Parameters

surveyId string

Id of the simulated survey

cancellationToken CancellationToken

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

Returns

Task<GetHintsResponseModel>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

GetInterviewSimulationsAsync(CancellationToken)

Retrieve all simulations

public virtual Task<ICollection<SurveyInterviewSimulationModel>> GetInterviewSimulationsAsync(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<SurveyInterviewSimulationModel>>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

GetSurveyInterviewSimulationAsync(string, CancellationToken)

Retrieve the simulation of a survey

public virtual Task<SurveyInterviewSimulationModel> GetSurveyInterviewSimulationAsync(string surveyId, CancellationToken cancellationToken = default)

Parameters

surveyId string

The surveyId of the survey

cancellationToken CancellationToken

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

Returns

Task<SurveyInterviewSimulationModel>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PostStartInterviewSimulationsAsync(string, int?, bool?, bool?, FileParameter, FileParameter, CancellationToken)

Method used to start an interview simulation

public virtual Task<BackgroundActivityStatus> PostStartInterviewSimulationsAsync(string surveyId, int? interviewsCount = null, bool? enableReporting = null, bool? useOriginalSample = null, FileParameter hintsFile = null, FileParameter sampleDataFile = null, CancellationToken cancellationToken = default)

Parameters

surveyId string

The surveyId of the survey

interviewsCount int?
enableReporting bool?
useOriginalSample bool?
hintsFile FileParameter
sampleDataFile 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<SurveysInterviewSimulationsClient.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<SurveysInterviewSimulationsClient.ObjectResponseResult<T>>

Type Parameters

T