Class SurveysInterviewersClient
public class SurveysInterviewersClient
- Inheritance
-
SurveysInterviewersClient
- Inherited Members
Constructors
SurveysInterviewersClient(string, HttpClient)
public SurveysInterviewersClient(string baseUrl, HttpClient httpClient)
Parameters
baseUrlstringhttpClientHttpClient
Properties
BaseUrl
public string BaseUrl { get; set; }
Property Value
JsonSerializerSettings
protected JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
- JsonSerializerSettings
ReadResponseAsString
public bool ReadResponseAsString { get; set; }
Property Value
Methods
GetAsync(string, CancellationToken)
Retrieves list of interviewers for the survey.
public virtual Task<ICollection<SurveyInterviewerModel>> GetAsync(string surveyId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe survey ID.
cancellationTokenCancellationTokenA 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
surveyIdstringSurvey Id
interviewerIdstringInterviewerId Id
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
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
surveyIdstringThe survey ID.
modelSurveyInterviewerQuotaLevelDistributeRequestModelThe survey interviewer distribution model.
cancellationTokenCancellationTokenA 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
surveyIdstringThe survey ID.
modelSurveyInterviewerAddRequestModelThe model that contains the interviewer ID.
cancellationTokenCancellationTokenA 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
surveyIdstringThe survey ID.
modelSurveyInterviewerQuotaLevelDistributeRequestModelThe survey interviewer distribution model.
cancellationTokenCancellationTokenA 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
surveyIdstringThe id of the survey
interviewerIdstringThe id of the interviewer
modelSurveyInterviewerAssignmentRequestModelActivation parameters
cancellationTokenCancellationTokenA 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
surveyIdstringThe survey id that the interviewer assignment belongs to
interviewerIdstringThe id of the interviewer to edit
updatedTargetsIEnumerable<SurveyInterviewerQuotaLevelTargetRequestModel>Collection of new quota level targets to set.
cancellationTokenCancellationTokenA 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
surveyIdstringThe survey ID.
interviewerIdstringThe Interviewer ID to unassign
cancellationTokenCancellationTokenA 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
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T