UsherAPIRequest
public class UsherAPIRequest : APIRequestType
This class conforms to APIRequestType and provides some more functionality of its own
specific to Usher Server APIs. Use this along with UsherAPITask
to make calls to
Usher Server API endpoints.
-
The closure used by
responseJSON(_ completion:) -> APIRequestType
request completion callback.Declaration
Swift
public typealias UsherAPIRequestJSONCompletion = (_ json: JSON?, _ error: UsherErrorProtocol?) -> ()
-
Declaration
Swift
public var responseValidator: Alamofire.DataRequest.Validation? { get }
-
Declaration
Swift
public var dataCompletions: [(Data?, URLResponse?, UsherErrorProtocol?) -> ()]
-
Declaration
Swift
public var id: UUID
-
Declaration
Swift
public var executionBehavior: APIRequestExecutionBehavior
-
Declaration
Swift
public var completionQueue: DispatchQueue
-
Declaration
Swift
public var timeline: Timeline?
-
Declaration
Swift
public var error: UsherErrorProtocol?
-
The server to use for this request. Defaults to
ServerManager.defaultServer()
Declaration
Swift
public lazy var server: Server? { get set }
-
The device to use for this request. Defaults to
Device.deviceForServer(ServerManager.defaultServer())
Declaration
Swift
public lazy var device: Device? { get set }
-
Declaration
Swift
public var status: APIRequestStatus
-
Declaration
Swift
public var config: APIRequestConfigurationType
-
Convenience API to directly initialize for one of the predefined Usher server API endpoints.
See also
UsherAPITask
Declaration
Swift
public convenience init(for task: UsherAPITask)
-
Initialize with UsherAPIRequestConfiguration
See also
UsherAPIRequestConfiguration
Declaration
Swift
public required init(with config: UsherAPIRequestConfiguration)
-
A completion callback providing JSON object generated from the server response.
See also
UsherAPIRequestJSONCompletion
Declaration
Swift
@discardableResult public func responseJSON(_ completion: @escaping UsherAPIRequestJSONCompletion) -> APIRequestType