Class SurveysInvitationRespondentsClient
public class SurveysInvitationRespondentsClient
- Inheritance
-
SurveysInvitationRespondentsClient
- Inherited Members
Constructors
SurveysInvitationRespondentsClient(string, HttpClient)
public SurveysInvitationRespondentsClient(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
GetInvitationStatusAsync(string, string, CancellationToken)
Retrieves the invitation status for the wanted batch of the specified survey.
public virtual Task<ICollection<InvitationBatchStatus>> GetInvitationStatusAsync(string surveyId, string batchName, CancellationToken cancellationToken = default)
Parameters
surveyIdstringId of the survey
batchNamestringThe name of the batch to get the status of
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<ICollection<InvitationBatchStatus>>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
GetSurveyBatchesStatusAsync(string, CancellationToken)
Gets the invitation status of all batches for the specified survey.
public virtual Task<ICollection<InvitationMonitorBatchStatus>> GetSurveyBatchesStatusAsync(string surveyId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe survey for which to get the batches status
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<ICollection<InvitationMonitorBatchStatus>>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
GetSurveysInvitationStatusAsync(CancellationToken)
Gets the status of all surveys' invitation.
public virtual Task<ICollection<InvitationMonitorSurveyStatus>> GetSurveysInvitationStatusAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<ICollection<InvitationMonitorSurveyStatus>>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
PostAsync(string, InvitationBatch, CancellationToken)
Posts a request to create a batch for sending out invitations.
public virtual Task<InviteRespondentsStatus> PostAsync(string surveyId, InvitationBatch invitationBatch, CancellationToken cancellationToken = default)
Parameters
surveyIdstringid of the survey
invitationBatchInvitationBatchinvitation batch parameters InvitationBatch
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<InviteRespondentsStatus>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
protected virtual Task<SurveysInvitationRespondentsClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T