Class SurveysInterviewSimulationsClient
public class SurveysInterviewSimulationsClient
- Inheritance
-
SurveysInterviewSimulationsClient
- Inherited Members
Constructors
SurveysInterviewSimulationsClient(string, HttpClient)
public SurveysInterviewSimulationsClient(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
GetHintsAsync(string, CancellationToken)
Gets hints for the survey simulation.
public virtual Task<GetHintsResponseModel> GetHintsAsync(string surveyId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringId of the simulated survey
cancellationTokenCancellationTokenA 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
cancellationTokenCancellationTokenA 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
surveyIdstringThe surveyId of the survey
cancellationTokenCancellationTokenA 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
surveyIdstringThe surveyId of the survey
interviewsCountint?enableReportingbool?useOriginalSamplebool?hintsFileFileParametersampleDataFileFileParametercancellationTokenCancellationTokenA 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
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T