Class SurveysSamplingPointAddressesClient
public class SurveysSamplingPointAddressesClient
- Inheritance
-
SurveysSamplingPointAddressesClient
- Inherited Members
Constructors
SurveysSamplingPointAddressesClient(string, HttpClient)
public SurveysSamplingPointAddressesClient(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, string, string, CancellationToken)
This method deletes a specific address.
public virtual Task DeleteAsync(string surveyId, string samplingPointId, string addressId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringsamplingPointIdstringaddressIdstringcancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task
Address deleted
Exceptions
- NfieldSdkException
A server side error occurred.
GetAllAsync(string, string, CancellationToken)
This method retrieves a list of Addresses. This list can be filtered and sorted
using standard OData syntax.
public virtual Task<ICollection<AddressModel>> GetAllAsync(string surveyId, string samplingPointId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringsamplingPointIdstringcancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<ICollection<AddressModel>>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
GetAsync(string, string, string, CancellationToken)
Retrieve the details of a single address.
public virtual Task<AddressModel> GetAsync(string surveyId, string samplingPointId, string addressId, CancellationToken cancellationToken = default)
Parameters
surveyIdstringsamplingPointIdstringaddressIdstringcancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<AddressModel>
Successful
Exceptions
- NfieldSdkException
A server side error occurred.
PostAsync(string, string, AddressModel, CancellationToken)
Add a new address to the specified sampling point.
public virtual Task<AddressModel> PostAsync(string surveyId, string samplingPointId, AddressModel address, CancellationToken cancellationToken = default)
Parameters
surveyIdstringsamplingPointIdstringaddressAddressModelcancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<AddressModel>
Address created
Exceptions
- NfieldSdkException
A server side error occurred.
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
protected virtual Task<SurveysSamplingPointAddressesClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T