CommandContents
public protocol CommandContents
Minimum properties making up a Command
-
The body of a Command, consisting of any name/value pairs needed for this Command
Declaration
Swift
var body: [String : Any]
-
An optional list of target document ids related to this Command.
Declaration
Swift
var targetDocuments: [String]
-
The command-processor route to which this command will be delivered.
Declaration
Swift
var uri: String
-
HTTP method which will be used to deliver this command to a command-processor.
Declaration
Swift
var method: Http.Method
-
An optional tag that can be used to group or identify commands.
Declaration
Swift
var tag: String?
-
Retrieves and returns the documents associated with the
targetDocuments
list of document idsDeclaration
Swift
func retrieveTargetedDocuments(completionHandler: @escaping (_ documents: [[AnyHashable: Any]]) -> Void)
Parameters
completionHandler
closure to call with the retrieved documents
documents
Array containing content of the retrieved documents