Class ChannelClient
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Syntax
[GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
public class ChannelClient : ClientBase, IChannelClient
Constructors
ChannelClient(IPictureparkServiceSettings, HttpClient)
Declaration
public ChannelClient(IPictureparkServiceSettings configuration, HttpClient httpClient)
Parameters
IPictureparkServiceSettings configuration |
HttpClient httpClient |
Properties
JsonSerializerSettings
Declaration
protected JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
JsonSerializerSettings |
ReadResponseAsString
Methods
CreateAsync(ChannelCreateRequest, CancellationToken)
Create channel
Declaration
public virtual Task<Channel> CreateAsync(ChannelCreateRequest request, CancellationToken cancellationToken = default)
Parameters
ChannelCreateRequest
request
The request containing information needed to create new channel. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<Channel>
Created channel |
Implements
Remarks
Creates new channel based on supplied request.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
DeleteAsync(string, CancellationToken)
Delete channel
Declaration
public virtual Task DeleteAsync(string id, CancellationToken cancellationToken = default)
Parameters
string
id
ID of the channel that should be deleted. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task
OK |
Implements
Remarks
Deletes the channel specified by the ID.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetAggregationFieldsAsync(CancellationToken)
Retrieve the fields that can be used in an aggregator on any channel.
Declaration
public virtual Task<ICollection<FieldInfo>> GetAggregationFieldsAsync(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<FieldInfo>>
The list of fields |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetAllAsync(CancellationToken)
Get all channels
Declaration
public virtual Task<ICollection<Channel>> GetAllAsync(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<Channel>>
List of channel |
Implements
Remarks
Get all channels available for the current user.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetAsync(string, CancellationToken)
Get channel
Declaration
public virtual Task<Channel> GetAsync(string id, CancellationToken cancellationToken = default)
Parameters
string
id
The channel ID. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<Channel>
Requested channel |
Implements
Remarks
Gets the channel information by the channel ID.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetChannelsAsync(CancellationToken)
Declaration
[Obsolete("Please use GetAllAsync method instead.")]
public Task<ICollection<Channel>> GetChannelsAsync(CancellationToken cancellationToken = default)
Parameters
CancellationToken cancellationToken |
Returns
Task<ICollection<Channel>> |
Implements
GetFilterFieldsAsync(CancellationToken)
Retrieve the fields that can be used as filter fields on any channel.
Declaration
public virtual Task<ICollection<FieldInfo>> GetFilterFieldsAsync(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<FieldInfo>>
The list of fields |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetSortFieldsAsync(CancellationToken)
Retrieve the fields that can be used as sort fields on any channel.
Declaration
public virtual Task<ICollection<SortFieldInfo>> GetSortFieldsAsync(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<SortFieldInfo>>
The list of fields |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
Declaration
protected virtual Task<ChannelClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
HttpResponseMessage response |
IReadOnlyDictionary<string, IEnumerable<string>> headers |
CancellationToken cancellationToken |
Returns
Task<ChannelClient.ObjectResponseResult<T>> |
Type Parameters
T |
UpdateAsync(string, ChannelUpdateRequest, CancellationToken)
Update channel
Declaration
public virtual Task<Channel> UpdateAsync(string id, ChannelUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
string
id
ID of channel to update |
ChannelUpdateRequest
request
The request containing information needed to update the channel. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<Channel>
Updated channel |
Implements
Remarks
Updates the channel specified by the ID and based on supplied request.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |