Class SurveysSamplingPointsInterviewerAssignmentsClient
public class SurveysSamplingPointsInterviewerAssignmentsClient
- Inheritance
-
SurveysSamplingPointsInterviewerAssignmentsClient
- Inherited Members
Constructors
SurveysSamplingPointsInterviewerAssignmentsClient(string, HttpClient)
public SurveysSamplingPointsInterviewerAssignmentsClient(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
DeleteAsync(string, string, string, CancellationToken)
Unassign an interviewer from a sampling point.
public virtual Task DeleteAsync(string surveyId, string samplingPointId, string interviewerId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe survey id that the sampling point belongs to
samplingPointIdstringThe id of the sampling point to unassign
interviewerIdstringThe id of the interviewer to unassign
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task
No content
Exceptions
- NfieldSdkException
A server side error occurred.
DeleteBatchV2Async(string, SamplingPointInterviewerAssignmentsModel, CancellationToken)
Unassign many interviewers from many sampling points.
public virtual Task DeleteBatchV2Async(string surveyId, SamplingPointInterviewerAssignmentsModel model, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe survey id that the sampling point belongs to
modelSamplingPointInterviewerAssignmentsModelThe id's of the sampling points and the interviewers to unassign
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task
No content
Exceptions
- NfieldSdkException
A server side error occurred.
GetAsync(string, string, CancellationToken)
Get the interviewers assigned to a sampling point.
public virtual Task<ICollection<InterviewerSamplingPointAssignmentModel>> GetAsync(string surveyId, string samplingPointId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe survey id that the sampling point belongs to
samplingPointIdstringThe sampling point to get assignments for
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<ICollection<InterviewerSamplingPointAssignmentModel>>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
PostAsync(string, string, string, CancellationToken)
Assign an interviewer to a sampling point.
public virtual Task<SamplingPointInterviewerAssignmentsModel> PostAsync(string surveyId, string samplingPointId, string interviewerId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe survey id that the sampling point belongs to
samplingPointIdstringThe id of the sampling point to assign
interviewerIdstringThe id of the interviewer to assign
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SamplingPointInterviewerAssignmentsModel>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
PostBatchV2Async(string, SamplingPointInterviewerAssignmentsModel, CancellationToken)
Assign many interviewers to many sampling points.
public virtual Task<SamplingPointInterviewerAssignmentsModel> PostBatchV2Async(string surveyId, SamplingPointInterviewerAssignmentsModel model, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe survey id that the sampling point belongs to
modelSamplingPointInterviewerAssignmentsModelThe id's of the sampling points and the interviewers to assign
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SamplingPointInterviewerAssignmentsModel>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
protected virtual Task<SurveysSamplingPointsInterviewerAssignmentsClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T