Class DomainSurveyGroupsClient
public class DomainSurveyGroupsClient
- Inheritance
-
DomainSurveyGroupsClient
- Inherited Members
Constructors
DomainSurveyGroupsClient(string, HttpClient)
public DomainSurveyGroupsClient(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(int, CancellationToken)
Delete a survey group
Survey groups have to be 'empty' before they can be deleted. An empty survey group has no surveys associated to it.
public virtual Task DeleteAsync(int surveyGroupId, CancellationToken cancellationToken = default)
Parameters
surveyGroupIdintcancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
GetAllAsync(CancellationToken)
Returns the details of all survey groups in the domain.
public virtual Task<ICollection<SurveyGroupModel>> GetAllAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<ICollection<SurveyGroupModel>>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
GetAsync(int, CancellationToken)
Retrieve a specific survey group
public virtual Task<SurveyGroupModel> GetAsync(int surveyGroupId, CancellationToken cancellationToken = default)
Parameters
surveyGroupIdintid of the survey group
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SurveyGroupModel>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
PatchAsync(int, UpdateSurveyGroupModel, CancellationToken)
Update a survey group
public virtual Task<SurveyGroupModel> PatchAsync(int surveyGroupId, UpdateSurveyGroupModel model, CancellationToken cancellationToken = default)
Parameters
surveyGroupIdintmodelUpdateSurveyGroupModelcancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SurveyGroupModel>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
PostAsync(CreateSurveyGroupModel, CancellationToken)
Create a survey group. An id is automatically generated.
public virtual Task<SurveyGroupModel> PostAsync(CreateSurveyGroupModel model, CancellationToken cancellationToken = default)
Parameters
modelCreateSurveyGroupModelcancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SurveyGroupModel>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
protected virtual Task<DomainSurveyGroupsClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T