Class SurveysInterviewersInstructionsClient
public class SurveysInterviewersInstructionsClient
- Inheritance
-
SurveysInterviewersInstructionsClient
- Inherited Members
Constructors
SurveysInterviewersInstructionsClient(string, HttpClient)
public SurveysInterviewersInstructionsClient(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, CancellationToken)
Method used to delete the interviewer instruction file.
public virtual Task DeleteAsync(string surveyId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe id of the survey
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task
Interviewer instructions deleted
Exceptions
- NfieldSdkException
A server side error occurred.
GetAsync(string, CancellationToken)
Method used to download interviewer instruction file.
public virtual Task<FileResponse> GetAsync(string surveyId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe id of the survey
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<FileResponse>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
PostAsync(string, string, FileParameter, CancellationToken)
Method used to upload interviewer instruction file.
The re-upload of a new pdf file for the same survey it will replace the existing one.
public virtual Task<BackgroundActivityStatus> PostAsync(string surveyId, string fileName, FileParameter file = null, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe id of the survey
fileNamestringThe name of the file
fileFileParametercancellationTokenCancellationTokenA 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<SurveysInterviewersInstructionsClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T