Class SurveysManualTestClient
public class SurveysManualTestClient
- Inheritance
-
SurveysManualTestClient
- Inherited Members
Constructors
SurveysManualTestClient(string, HttpClient)
public SurveysManualTestClient(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
GetManualTestsAsync(CancellationToken)
Retrieve all manual test surveys of the domain
public virtual Task<ICollection<SurveyManualTestModel>> GetManualTestsAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<ICollection<SurveyManualTestModel>>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
GetSurveyManualTestsAsync(string, CancellationToken)
Retrieve all the manual test surveys of a survey (normally just one)
public virtual Task<ICollection<SurveyManualTestModel>> GetSurveyManualTestsAsync(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<ICollection<SurveyManualTestModel>>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
PostAsync(string, bool?, bool?, FileParameter, CancellationToken)
Method used to start the creation of a manual test survey
public virtual Task<BackgroundActivityStatus> PostAsync(string surveyId, bool? enableReporting = null, bool? useOriginalSample = null, FileParameter sampleDataFile = null, CancellationToken cancellationToken = default)
Parameters
surveyIdstringenableReportingbool?useOriginalSamplebool?sampleDataFileFileParametercancellationTokenCancellationTokenA 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<SurveysManualTestClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T