Command

public class Command: CommandContents

Command class encapsulating a minimum Command

  • Declaration

    Swift

    public var body: [String : Any]
  • Declaration

    Swift

    public var targetDocuments: [String] = []
  • uri

    Declaration

    Swift

    public var uri: String
  • Declaration

    Swift

    public var method: Http.Method
  • tag

    Declaration

    Swift

    public var tag: String?
  • Declaration

    Swift

    public func retrieveTargetedDocuments(completionHandler: @escaping ([[AnyHashable: Any]]) -> Void)
  • Initialization with a provided Body and TargetDocuments

    Declaration

    Swift

    public init?(body: [String : Any], targetDocuments: [String]?, uri: String, method: Http.Method, tag: String? = nil)

    Parameters

    body

    The body for the Command

    targetDocuments

    List of target document ids for the Command

    uri

    Command Processor route to which this command will be delivered.

    method

    HTTP method which will be used to deliver this command.

    tag

    String tag that can be used to group or identify commands.

  • Initialization with a provided Body.

    With this initializer the TargetDocuments will be an empty String array.

    Declaration

    Swift

    public init?(body: [String : Any], uri: String, method: Http.Method)

    Parameters

    body

    The body for the Command

    uri

    Command Processor route to which this command will be delivered.

    method

    HTTP method which will be used to deliver this command.