Class ChannelClient
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Syntax
public class ChannelClient : ClientBase
Constructors
ChannelClient(Contract.IPictureparkServiceSettings, Http.HttpClient)
Declaration
public ChannelClient(Contract.IPictureparkServiceSettings configuration, Http.HttpClient httpClient)
Parameters
Picturepark.SDK.V1.Contract.IPictureparkServiceSettings
configuration
|
System.Net.Http.HttpClient
httpClient
|
Properties
JsonSerializerSettings
Declaration
protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
Newtonsoft.Json.JsonSerializerSettings
|
ReadResponseAsString
Declaration
public bool ReadResponseAsString { get; set; }
Property Value
System.Boolean
|
Methods
CreateAsync(ChannelCreateRequest, CancellationToken)
Create channel
Declaration
public virtual async Task<Channel> CreateAsync(ChannelCreateRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ChannelCreateRequest
request
The request containing information needed to create new channel. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<Channel>
Created channel |
Remarks
Creates new channel based on supplied request.
DeleteAsync(String, CancellationToken)
Delete channel
Declaration
public virtual async Task DeleteAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
ID of the channel that should be deleted. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
OK |
Remarks
Deletes the channel specified by the ID.
GetAggregationFieldsAsync(CancellationToken)
Retrieve the fields that can be used in an aggregator on any channel.
Declaration
public virtual async Task<ICollection<FieldInfo>> GetAggregationFieldsAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<FieldInfo>>
The list of fields |
GetAllAsync(CancellationToken)
Get all channels
Declaration
public virtual async Task<ICollection<Channel>> GetAllAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<Channel>>
List of channel |
Remarks
Get all channels available for the current user.
GetAsync(String, CancellationToken)
Get channel
Declaration
public virtual async Task<Channel> GetAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The channel ID. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<Channel>
Requested channel |
Remarks
Gets the channel information by the channel ID.
GetChannelsAsync(CancellationToken)
Declaration
public async Task<ICollection<Channel>> GetChannelsAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<ICollection<Channel>>
|
GetFilterFieldsAsync(CancellationToken)
Retrieve the fields that can be used as filter fields on any channel.
Declaration
public virtual async Task<ICollection<FieldInfo>> GetFilterFieldsAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<FieldInfo>>
The list of fields |
GetSortFieldsAsync(CancellationToken)
Retrieve the fields that can be used as sort fields on any channel.
Declaration
public virtual async Task<ICollection<SortFieldInfo>> GetSortFieldsAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<SortFieldInfo>>
The list of fields |
ReadObjectResponseAsync<T>(Http.HttpResponseMessage, IReadOnlyDictionary<String, IEnumerable<String>>, CancellationToken)
Declaration
protected virtual async Task<ChannelClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(Http.HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
System.Net.Http.HttpResponseMessage
response
|
System.Collections.Generic.IReadOnlyDictionary<System.String, System.Collections.Generic.IEnumerable<System.String>>
headers
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<ChannelClient.ObjectResponseResult<T>>
|
Type Parameters
T
|
UpdateAsync(String, ChannelUpdateRequest, CancellationToken)
Update channel
Declaration
public virtual async Task<Channel> UpdateAsync(string id, ChannelUpdateRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
ID of channel to update |
ChannelUpdateRequest
request
The request containing information needed to update the channel. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<Channel>
Updated channel |
Remarks
Updates the channel specified by the ID and based on supplied request.