Class TransferClient
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Syntax
public class TransferClient : ClientBase
Constructors
TransferClient(Contract.IPictureparkServiceSettings, Http.HttpClient)
Declaration
public TransferClient(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
CancelAsync(String, CancellationToken)
Cancel transfer
Declaration
[Obsolete]
public virtual async Task CancelAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
ID of transfer. |
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
Requests cancellation of transfer.
Note: Transfers can only be cancelled when state is UploadInProgress.
CreateAsync(CreateTransferRequest, CancellationToken)
Create transfer
Declaration
[Obsolete]
public virtual async Task<Transfer> CreateAsync(CreateTransferRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
CreateTransferRequest
request
The create transfer 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<Transfer>
Transfer |
Remarks
For transfers of type FileUpload or FileUploadAutoImport, after creating the transfer, wait for the returned BusinessProcess to hit the "Created" state before attempting to upload files.
DeleteAsync(String, CancellationToken)
Delete transfer
Declaration
[Obsolete]
public virtual async Task DeleteAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
ID of transfer. |
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
A transfer cannot be deleted if it's currently in the UploadInProgress or ImportInProgress state.
DeleteFilesAsync(FileTransferDeleteRequest, CancellationToken)
Delete files
Declaration
[Obsolete]
public virtual async Task DeleteFilesAsync(FileTransferDeleteRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
FileTransferDeleteRequest
request
The file transfer delete 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
|
GetAsync(String, CancellationToken)
Get transfer details
Declaration
[Obsolete]
public virtual async Task<TransferDetail> GetAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
ID of transfer. |
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<TransferDetail>
TransferDetail |
GetBlacklistAsync(CancellationToken)
Get blacklist
Declaration
[Obsolete]
public virtual async Task<Blacklist> GetBlacklistAsync(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<Blacklist>
Blacklist |
Remarks
The blacklist is a list of patterns that a filename must not match.
A filename matching an item on the blacklist will be skipped during uploading.
The client is responsibly for matching uploaded files against the blacklist
when creating the transfer. Otherwise, during transfer creation some items might get skipped
causing issues when uploading later on.
GetFileAsync(String, CancellationToken)
Get file
Declaration
[Obsolete]
public virtual async Task<FileTransferDetail> GetFileAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
ID of file transfer. |
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<FileTransferDetail>
FileTransferDetail |
ImportAsync(String, ImportTransferRequest, CancellationToken)
Import transfer
Declaration
[Obsolete]
public virtual async Task<Transfer> ImportAsync(string id, ImportTransferRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
ID of transfer. |
ImportTransferRequest
request
The ImportTransfer 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<Transfer>
Transfer |
Remarks
This triggers the import of a Transfer, creating Contents. All items in the Transfer will be enqueued for rendering.
Wait for completion on the Business process ID that is returned to wait for import completion.
Note: Before attempting to import a Transfer, the transfer has to be in the TransferReady state.
PartialImportAsync(String, ImportTransferPartialRequest, CancellationToken)
Import transfer partially
Declaration
[Obsolete]
public virtual async Task<Transfer> PartialImportAsync(string id, ImportTransferPartialRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
ID of transfer. |
ImportTransferPartialRequest
request
The ImportTransferPartial 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<Transfer>
Transfer |
Remarks
This triggers the import of selected items in a Transfer, creating contents. All imported items will be enqueued for rendering.
Wait for completion on the Business process ID that is returned to wait for import completion.
Transfer will transition to state ImportDone if no files of the transfer remain for import.
Transfer will transition to state TransferReady if any files of the transfer remain for import.
ReadObjectResponseAsync<T>(Http.HttpResponseMessage, IReadOnlyDictionary<String, IEnumerable<String>>, CancellationToken)
Declaration
protected virtual async Task<TransferClient.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<TransferClient.ObjectResponseResult<T>>
|
Type Parameters
T
|
SearchAsync(TransferSearchRequest, CancellationToken)
Search
Declaration
[Obsolete]
public virtual async Task<TransferSearchResult> SearchAsync(TransferSearchRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
TransferSearchRequest
request
The transfer 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<TransferSearchResult>
TransferSearchResult |
SearchFilesAsync(FileTransferSearchRequest, CancellationToken)
Search for files
Declaration
[Obsolete]
public virtual async Task<FileTransferSearchResult> SearchFilesAsync(FileTransferSearchRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
FileTransferSearchRequest
request
The file transfer 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<FileTransferSearchResult>
FileTransferSearchResult |
UploadFileAsync(Int64, Int64, Int64, Int64, String, String, Stream, CancellationToken)
Upload file
Declaration
[Obsolete]
public virtual async Task UploadFileAsync(long chunkNumber, long currentChunkSize, long totalSize, long totalChunks, string transferId, string requestId, Stream body = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.Int64
chunkNumber
Information about chunk. |
System.Int64
currentChunkSize
Information about chunk. |
System.Int64
totalSize
Information about chunk. |
System.Int64
totalChunks
Information about chunk. |
System.String
transferId
ID of transfer. |
System.String
requestId
Identifier of file. |
System.IO.Stream
body
Body |
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
Uploads the specified chunk data.
Use Content-Type: application/octet-stream
for uploading chunked data.
The chunk data should be contained in the body of your request.
To upload a file, it is recommended to use a single chunk that has the same size as the file. This is only possible if you're using
the octet-stream upload method. If you choose to use formdata upload or multiple chunks per file, the file must be chunked into
1MB-100MB chunks. The last chunk may be smaller than 1MB.