Table of Contents

Class SurveysInterviewersClient

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

Constructors

SurveysInterviewersClient(string, HttpClient)

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

Retrieves list of interviewers for the survey.

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

Parameters

surveyId string

The survey ID.

cancellationToken CancellationToken

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

Returns

Task<ICollection<SurveyInterviewerModel>>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

GetQuotaTargetsAsync(string, string, CancellationToken)

Gets a list of levelIds with Target, Successful and SurveySuccessful assigned to an interviewer

public virtual Task<ICollection<SurveyInterviewerQuotaLevelTargetResponseModel>> GetQuotaTargetsAsync(string surveyId, string interviewerId, CancellationToken cancellationToken = default)

Parameters

surveyId string

Survey Id

interviewerId string

InterviewerId Id

cancellationToken CancellationToken

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

Returns

Task<ICollection<SurveyInterviewerQuotaLevelTargetResponseModel>>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PostDistributeWorkpackageTargetAsync(string, SurveyInterviewerQuotaLevelDistributeRequestModel, CancellationToken)

Distributes a workpackage Target for survey.

public virtual Task<ICollection<SurveysQuotaFrameResponseModel>> PostDistributeWorkpackageTargetAsync(string surveyId, SurveyInterviewerQuotaLevelDistributeRequestModel model, CancellationToken cancellationToken = default)

Parameters

surveyId string

The survey ID.

model SurveyInterviewerQuotaLevelDistributeRequestModel

The survey interviewer distribution model.

cancellationToken CancellationToken

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

Returns

Task<ICollection<SurveysQuotaFrameResponseModel>>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PostV1Async(string, SurveyInterviewerAddRequestModel, CancellationToken)

DEPRECATED, USE Assign to Add+Assign directly. Adds interviewer to the survey.

[Obsolete]
public virtual Task PostV1Async(string surveyId, SurveyInterviewerAddRequestModel model, CancellationToken cancellationToken = default)

Parameters

surveyId string

The survey ID.

model SurveyInterviewerAddRequestModel

The model that contains the interviewer ID.

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.

PostV1DistributeAsync(string, SurveyInterviewerQuotaLevelDistributeRequestModel, CancellationToken)

DEPRECATED, USE DistributeWorkpackageTarget, Distributes workpackage for survey.

[Obsolete]
public virtual Task<SurveysQuotaFrameResponseModel> PostV1DistributeAsync(string surveyId, SurveyInterviewerQuotaLevelDistributeRequestModel model, CancellationToken cancellationToken = default)

Parameters

surveyId string

The survey ID.

model SurveyInterviewerQuotaLevelDistributeRequestModel

The survey interviewer distribution model.

cancellationToken CancellationToken

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

Returns

Task<SurveysQuotaFrameResponseModel>

Successful

Exceptions

NfieldSdkException

A server side error occurred.

PutAssignAsync(string, string, SurveyInterviewerAssignmentRequestModel, CancellationToken)

This method Add+Assign an interviewer assignment with parameters
The interviewer must to be assigned to the survey first

public virtual Task PutAssignAsync(string surveyId, string interviewerId, SurveyInterviewerAssignmentRequestModel model, CancellationToken cancellationToken = default)

Parameters

surveyId string

The id of the survey

interviewerId string

The id of the interviewer

model SurveyInterviewerAssignmentRequestModel

Activation parameters

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.

PutQuotaTargetsAsync(string, string, IEnumerable<SurveyInterviewerQuotaLevelTargetRequestModel>, CancellationToken)

Updates an interviewer's a set of work package quota level targets for a survey.
It doesn't validate if all the level Ids exist.

public virtual Task PutQuotaTargetsAsync(string surveyId, string interviewerId, IEnumerable<SurveyInterviewerQuotaLevelTargetRequestModel> updatedTargets, CancellationToken cancellationToken = default)

Parameters

surveyId string

The survey id that the interviewer assignment belongs to

interviewerId string

The id of the interviewer to edit

updatedTargets IEnumerable<SurveyInterviewerQuotaLevelTargetRequestModel>

Collection of new quota level targets to set.

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.

PutUnassingAsync(string, string, CancellationToken)

Unassigns the interviewer to the survey.

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

Parameters

surveyId string

The survey ID.

interviewerId string

The Interviewer ID to unassign

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.

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

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

Type Parameters

T