Table of Contents

Class SurveysInvitationRespondentsClient

Namespace
Nfield.SDK
Assembly
Nfield.Public.SDK.dll
public class SurveysInvitationRespondentsClient
Inheritance
SurveysInvitationRespondentsClient
Inherited Members

Constructors

SurveysInvitationRespondentsClient(string, HttpClient)

public SurveysInvitationRespondentsClient(string baseUrl, HttpClient httpClient)

Parameters

baseUrl string
httpClient HttpClient

Properties

BaseUrl

public string BaseUrl { get; set; }

Property Value

string

JsonSerializerSettings

protected JsonSerializerSettings JsonSerializerSettings { get; }

Property Value

JsonSerializerSettings

ReadResponseAsString

public bool ReadResponseAsString { get; set; }

Property Value

bool

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

surveyId string

Id of the survey

batchName string

The name of the batch to get the status of

cancellationToken CancellationToken

A 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

surveyId string

The survey for which to get the batches status

cancellationToken CancellationToken

A 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

cancellationToken CancellationToken

A 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

surveyId string

id of the survey

invitationBatch InvitationBatch

invitation batch parameters InvitationBatch

cancellationToken CancellationToken

A 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

response HttpResponseMessage
headers IReadOnlyDictionary<string, IEnumerable<string>>
cancellationToken CancellationToken

Returns

Task<SurveysInvitationRespondentsClient.ObjectResponseResult<T>>

Type Parameters

T