Interface ITransferClient
Namespace: System.Dynamic.ExpandoObject
Syntax
public interface ITransferClient
Methods
CancelAsync(String, CancellationToken)
Cancel transfer
Declaration
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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
CancelTransferAsync(String, CancellationToken)
Cancel transfer
Declaration
Task CancelTransferAsync(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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
CreateAndWaitForCompletionAsync(CreateTransferRequest, Nullable<TimeSpan>, CancellationToken)
Creates a transfer and waits for its completion.
Declaration
Task<CreateTransferResult> CreateAndWaitForCompletionAsync(CreateTransferRequest request, TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
CreateTransferRequest
request
The create request. |
System.Nullable<TimeSpan>
timeout
The timeout to wait for completion. |
System.Threading.CancellationToken
cancellationToken
The cancellation token. |
Returns
System.Threading.Tasks.Task<CreateTransferResult>
The transfer. |
CreateAndWaitForCompletionAsync(String, IEnumerable<FileLocations>, Nullable<TimeSpan>, CancellationToken, UploadOptions)
Creates a transfer and waits for its completion.
Declaration
Task<CreateTransferResult> CreateAndWaitForCompletionAsync(string transferName, IEnumerable<FileLocations> files, TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken), UploadOptions uploadOptions = null)
Parameters
System.String
transferName
The name of the transfer. |
IEnumerable<FileLocations>
files
The file names of the transfer. |
System.Nullable<TimeSpan>
timeout
The timeout to wait for completion. |
System.Threading.CancellationToken
cancellationToken
The cancellation token. |
UploadOptions
uploadOptions
The upload options. |
Returns
System.Threading.Tasks.Task<CreateTransferResult>
The transfer. |
CreateAsync(CreateTransferRequest, CancellationToken)
Create transfer
Declaration
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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
PictureparkValidationException
Validation exception |
MaximumTransferSizeException
A server side error occurred. |
DeleteAsync(String, CancellationToken)
Delete transfer
Declaration
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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
DeleteFilesAsync(FileTransferDeleteRequest, CancellationToken)
Delete files
Declaration
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
|
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
GetAsync(String, CancellationToken)
Get transfer details
Declaration
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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
GetBlacklistAsync(CancellationToken)
Get blacklist
Declaration
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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
GetFileAsync(String, CancellationToken)
Get file
Declaration
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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
ImportAndWaitForCompletionAsync(Transfer, ImportTransferRequest, Nullable<TimeSpan>, CancellationToken)
Transfers the uploaded files and waits for its completions.
Declaration
Task ImportAndWaitForCompletionAsync(Transfer transfer, ImportTransferRequest createRequest, TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Transfer
transfer
The transfer. |
ImportTransferRequest
createRequest
The create request. |
System.Nullable<TimeSpan>
timeout
The timeout to wait for completion. |
System.Threading.CancellationToken
cancellationToken
The cancellcation token. |
Returns
System.Threading.Tasks.Task
The task. |
ImportAsync(String, ImportTransferRequest, CancellationToken)
Import transfer
Declaration
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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
ImportTransferAsync(String, ImportTransferRequest, CancellationToken)
Import transfer
Declaration
Task<Transfer> ImportTransferAsync(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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
PartialImportAsync(String, ImportTransferPartialRequest, CancellationToken)
Import transfer partially
Declaration
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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
SearchAsync(TransferSearchRequest, CancellationToken)
Search
Declaration
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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
SearchFilesAsync(FileTransferSearchRequest, CancellationToken)
Search for files
Declaration
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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
SearchFilesByTransferIdAsync(String, Nullable<Int32>)
Searches files of a given transfer ID.
Declaration
Task<IReadOnlyCollection<FileTransfer>> SearchFilesByTransferIdAsync(string transferId, int? limit = null)
Parameters
System.String
transferId
The transfer ID. |
System.Nullable<System.Int32>
limit
The maximum number of search results. |
Returns
System.Threading.Tasks.Task<IReadOnlyCollection<FileTransfer>>
The result. |
UploadFileAsync(FileParameter, Int64, Int64, Int64, Int64, String, String, CancellationToken)
Upload file
Declaration
Task UploadFileAsync(FileParameter formFile, long chunkNumber, long currentChunkSize, long totalSize, long totalChunks, string transferId, string requestId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
FileParameter
formFile
Information about chunk. |
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.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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
UploadFileAsync(Int64, Int64, Int64, Int64, String, String, FileParameter, CancellationToken)
Upload file
Declaration
Task UploadFileAsync(long chunkNumber, long currentChunkSize, long totalSize, long totalChunks, string transferId, string requestId, FileParameter formFile = 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. |
FileParameter
formFile
Information about chunk. |
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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
UploadFileAsync(Int64, Int64, Int64, Int64, String, String, Stream, CancellationToken)
Upload file
Declaration
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 |
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkException
Internal server error |
UploadFilesAsync(Transfer, IEnumerable<FileLocations>, UploadOptions, Nullable<TimeSpan>, CancellationToken)
Uploads multiple files from the filesystem.
Declaration
Task UploadFilesAsync(Transfer transfer, IEnumerable<FileLocations> files, UploadOptions uploadOptions, TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Transfer
transfer
The existing transfer object. |
IEnumerable<FileLocations>
files
The file paths on the filesystem with optional overrides. |
UploadOptions
uploadOptions
The file upload options. |
System.Nullable<TimeSpan>
timeout
The timeout to wait for completion. |
System.Threading.CancellationToken
cancellationToken
The cancellation token. |
Returns
System.Threading.Tasks.Task
The created transfer object. |
UploadFilesAsync(String, IEnumerable<FileLocations>, UploadOptions, Nullable<TimeSpan>, CancellationToken)
Uploads multiple files from the filesystem.
Declaration
Task<CreateTransferResult> UploadFilesAsync(string transferName, IEnumerable<FileLocations> files, UploadOptions uploadOptions, TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
transferName
The name of the created transfer. |
IEnumerable<FileLocations>
files
The file paths on the filesystem with optional overrides. |
UploadOptions
uploadOptions
The file upload options. |
System.Nullable<TimeSpan>
timeout
The timeout to wait for completion. |
System.Threading.CancellationToken
cancellationToken
The cancellation token. |
Returns
System.Threading.Tasks.Task<CreateTransferResult>
The created transfer object. |