Class ShareClient
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Syntax
public class ShareClient : ClientBase
Constructors
ShareClient(Contract.IPictureparkServiceSettings, Http.HttpClient)
Declaration
public ShareClient(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
AggregateAsync(ShareAggregationRequest, CancellationToken)
Aggregate
Declaration
public virtual async Task<ObjectAggregationResult> AggregateAsync(ShareAggregationRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ShareAggregationRequest
request
Aggregation request |
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<ObjectAggregationResult>
Share aggregation result |
Remarks
Aggregates shares either created by or sent to current user.
CreateAsync(ShareBaseCreateRequest, CancellationToken)
Create
Declaration
public virtual async Task<BusinessProcess> CreateAsync(ShareBaseCreateRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ShareBaseCreateRequest
request
Polymorphic create contract. Use either ShareBasicCreateRequest or ShareEmbedCreateRequest |
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<BusinessProcess>
BusinessProcess |
Remarks
Create a new share (basic or embed). The operation is executed asynchronously and is not awaited. Call WaitForCompletion to wait for the process to finish.
CreateShareSelectionDownloadLinkAsync(String, ShareDownloadRequest, CancellationToken)
Download selection of a share
Declaration
public virtual async Task<DownloadLink> CreateShareSelectionDownloadLinkAsync(string token, ShareDownloadRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
token
Share token |
ShareDownloadRequest
request
Share download request |
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<DownloadLink>
DownloadLink |
DeleteManyAsync(ShareDeleteManyRequest, CancellationToken)
Delete multiple shares
Declaration
public virtual async Task<BusinessProcess> DeleteManyAsync(ShareDeleteManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ShareDeleteManyRequest
request
A delete many request containing the ids of the shares to delete. |
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<BusinessProcess>
BusinessProcess |
Remarks
Deletes multiple shares. Returns a business process which will hold a batch response detail containing information about successful and failed rows. The operation is executed asynchronously and is not awaited. Call WaitForCompletion to wait for the process to finish.
DownloadAsync(String, Nullable<Int32>, Nullable<Int32>, String, CancellationToken)
Download shared outputs
Declaration
public virtual async Task<FileResponse> DownloadAsync(string token, int? width = null, int? height = null, string range = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
token
Share token |
System.Nullable<System.Int32>
width
Optional width in pixels to resize image |
System.Nullable<System.Int32>
height
Optional height in pixels to resize image |
System.String
range
The range of bytes to download (http range header): bytes={from}-{to} (e.g. bytes=0-100000) |
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<FileResponse>
|
DownloadDisplayContentOutputsAsync(String, String, String, CancellationToken)
Download shared display content outputs
Declaration
public virtual async Task<FileResponse> DownloadDisplayContentOutputsAsync(string token, string contentId, string outputFormatId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
token
Share token |
System.String
contentId
The content id |
System.String
outputFormatId
Id of the output format |
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<FileResponse>
|
DownloadSingleContentAsync(String, String, String, Nullable<Int32>, Nullable<Int32>, String, CancellationToken)
Download shared output
Declaration
public virtual async Task<FileResponse> DownloadSingleContentAsync(string token, string contentId, string outputFormatId, int? width = null, int? height = null, string range = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
token
Share token |
System.String
contentId
The content id |
System.String
outputFormatId
The output format id |
System.Nullable<System.Int32>
width
Optional width in pixels to resize image |
System.Nullable<System.Int32>
height
Optional height in pixels to resize image |
System.String
range
The range of bytes to download (http range header): bytes={from}-{to} (e.g. bytes=0-100000) |
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<FileResponse>
|
Remarks
Download single content in a specific output format (or automatically determined format if none is specified). To resize images on download specify target width & height. To download only a portion of the file, specify the range parameter.
DownloadWithConversionPresetAsync(String, String, String, CancellationToken)
Download shared outputs
Declaration
public virtual async Task<FileResponse> DownloadWithConversionPresetAsync(string token, string conversionPreset, string range = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
token
Share token |
System.String
conversionPreset
Image editing specification |
System.String
range
The range of bytes to download (http range header): bytes={from}-{to} (e.g. bytes=0-100000) |
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<FileResponse>
|
GetAsync(String, IEnumerable<ShareResolveBehavior>, Nullable<Int32>, CancellationToken)
Get
Declaration
public virtual async Task<ShareDetail> GetAsync(string id, IEnumerable<ShareResolveBehavior> resolveBehaviors = null, int? contentResolveLimit = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
Share Id (not token, use GetShareJson to get share by token) |
System.Collections.Generic.IEnumerable<ShareResolveBehavior>
resolveBehaviors
List of enums that control which parts of the share are resolved and returned. |
System.Nullable<System.Int32>
contentResolveLimit
Optional limit the number of contents to resolve. Use a lower value for higher performance. If nothing is specified, everything is resolved. |
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<ShareDetail>
Share detail |
Remarks
Get share by id (basic or embed).
GetContentsInShareAsync(String, Nullable<Int32>, String, CancellationToken)
Get contents in share
Declaration
public virtual async Task<ShareContentDetailResult> GetContentsInShareAsync(string id, int? limit = null, string pageToken = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
Share Id |
System.Nullable<System.Int32>
limit
Number of contents to return |
System.String
pageToken
PageToken to page over contents |
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<ShareContentDetailResult>
ShareContentDetailResult |
GetOutputsInShareAsync(String, CancellationToken)
Get shared outputs
Declaration
public virtual async Task<ShareOutputsResult> GetOutputsInShareAsync(string token, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
token
Share token |
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<ShareOutputsResult>
List of OutputResolveResult |
GetShareContentsAsync(String, String, Nullable<Int32>, String, CancellationToken)
Get share contents
Declaration
public virtual async Task<ShareContentDetailResult> GetShareContentsAsync(string token, string lang = null, int? limit = null, string pageToken = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
token
Share token |
System.String
lang
Language code |
System.Nullable<System.Int32>
limit
Number of contents to return |
System.String
pageToken
PageToken to page over contents |
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<ShareContentDetailResult>
ShareContentDetailResult |
GetShareJsonAsync(String, String, IEnumerable<ShareResolveBehavior>, Nullable<Int32>, CancellationToken)
Get share json
Declaration
public virtual async Task<ShareDetail> GetShareJsonAsync(string token, string lang = null, IEnumerable<ShareResolveBehavior> resolveBehaviors = null, int? contentResolveLimit = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
token
Share token |
System.String
lang
Language code |
System.Collections.Generic.IEnumerable<ShareResolveBehavior>
resolveBehaviors
List of enums that control which parts of the share are resolved and returned. |
System.Nullable<System.Int32>
contentResolveLimit
Optional limit the number of contents to resolve. Use a lower value for higher performance. If nothing is specified, everything is resolved. |
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<ShareDetail>
ShareDetail |
ReadObjectResponseAsync<T>(Http.HttpResponseMessage, IReadOnlyDictionary<String, IEnumerable<String>>, CancellationToken)
Declaration
protected virtual async Task<ShareClient.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<ShareClient.ObjectResponseResult<T>>
|
Type Parameters
T
|
RevokeAsync(ShareRevokeManyRequest, CancellationToken)
Revokes multiple shares
Declaration
public virtual async Task<BusinessProcess> RevokeAsync(ShareRevokeManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ShareRevokeManyRequest
request
A revoke many request containing the ids of the shares to revoke. |
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<BusinessProcess>
BusinessProcess |
SearchAsync(ShareSearchRequest, CancellationToken)
Search
Declaration
public virtual async Task<ShareSearchResult> SearchAsync(ShareSearchRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
ShareSearchRequest
request
Search request |
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<ShareSearchResult>
Share search result |
Remarks
Search shares either created by or sent to current user.
UpdateAsync(String, ShareBaseUpdateRequest, CancellationToken)
Update
Declaration
public virtual async Task<BusinessProcess> UpdateAsync(string id, ShareBaseUpdateRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The share id. |
ShareBaseUpdateRequest
request
The share update request. |
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<BusinessProcess>
BusinessProcess |
Remarks
Updates a single share. The operation is executed asynchronously and is not awaited. Call WaitForCompletion to wait for the process to finish.