PCloudAPIUploadTaskBuilder
public struct PCloudAPIUploadTaskBuilder
Utility struct containing logic for building UploadTask instances for PCloudAPIMethods.
-
Undocumented
Declaration
Swift
public init(hostProvider: HostProvider, authenticator: Authenticator, defaultTimeoutInterval: TimeInterval? = nil, operationBuilder: @escaping (Upload.Request) -> UploadOperation) -
Creates an
UploadTaskinstance executing a specific API method.Declaration
Swift
public func createTask<T: PCloudAPIMethod>(for method: T, with body: Upload.Request.Body, hostNameOverride: String? = nil, timeoutInterval: TimeInterval? = nil) -> UploadTask<T>Parameters
methodA method for the task to execute.
bodyThe data to upload.
hostNameOverrideIf non-
nil, this will override the default host name from the host provider.timeoutIntervalThe timeout interval for this call task. If
nil, the default timeout interval will be used.Return Value
An instance of
UploadTaskin suspended state.
View on GitHub
PCloudAPIUploadTaskBuilder Structure Reference