PCloudAPICallTaskBuilder
public struct PCloudAPICallTaskBuilder
Utility struct containing logic for building CallTask instances for PCloudAPIMethods.
-
Undocumented
Declaration
Swift
public init(hostProvider: HostProvider, authenticator: Authenticator, defaultTimeoutInterval: TimeInterval? = nil, operationBuilder: @escaping (Call.Request) -> CallOperation) -
Creates a
CallTaskinstance executing a specific API method.Declaration
Swift
public func createTask<T: PCloudAPIMethod>(for method: T, hostNameOverride: String? = nil, timeoutInterval: TimeInterval? = nil) -> CallTask<T>Parameters
methodA method for the task to execute.
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
CallTaskin suspended state.
View on GitHub
PCloudAPICallTaskBuilder Structure Reference