Class SurveysGeneralSettingsClient
public class SurveysGeneralSettingsClient
- Inheritance
-
SurveysGeneralSettingsClient
- Inherited Members
Constructors
SurveysGeneralSettingsClient(string, HttpClient)
public SurveysGeneralSettingsClient(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
GetSettingsAsync(string, CancellationToken)
Retrieve details of a specific survey general settings.
public virtual Task<SurveyGeneralSettingsResponseModel> GetSettingsAsync(string surveyId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe id of the survey general setting
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SurveyGeneralSettingsResponseModel>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
PostAsync(string, SurveyGeneralSettingsRequestV1Model, CancellationToken)
Update a survey general settings.
public virtual Task<SurveyGeneralSettingsResponseModel> PostAsync(string surveyId, SurveyGeneralSettingsRequestV1Model surveyGeneralSettings, CancellationToken cancellationToken = default)
Parameters
surveyIdstringThe id of the survey general settings to update
surveyGeneralSettingsSurveyGeneralSettingsRequestV1ModelClient, Description, Name and Owner of the survey general setting
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<SurveyGeneralSettingsResponseModel>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
protected virtual Task<SurveysGeneralSettingsClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T