TriggeredCommandForm
public struct TriggeredCommandForm
Form of a command of a trigger.
This class contains data in order to create or modify Command in
Trigger with followings methods:
ThingIFAPI.postNewTrigger(_:predicate:options:completionHandler:)ThingIFAPI.patchTrigger(_:triggeredCommandForm:predicate:options:completionHandler:)
Mandatory data are followings:
- Array of actions
Optional data are followings:
- Target thing id
- Title of a triggered command
- Description of a triggered command
- Meta data of a triggered command
-
Array of AliasAction instances.
Declaration
Swift
public let aliasActions: [AliasAction] -
Target thing ID.
Declaration
Swift
public let targetID: TypedID? -
Title of a command.
Declaration
Swift
public let title: String? -
Description of a command.
Declaration
Swift
public let commandDescription: String? -
Meta data of ad command.
Declaration
Swift
public let metadata: [String : Any]?
-
Initializer of TriggeredCommandForm instance.
Declaration
Swift
public init(_ aliasActions: [AliasAction], targetID: TypedID? = nil, title: String? = nil, commandDescription: String? = nil, metadata: [String : Any]? = nil)Parameters
aliasActionsArray of AliasAction instances. Must not be empty.
targetIDtarget thing ID.
titleTitle of a command. This should be equal or less than 50 characters.
descriptionDescription of a comand. This should be equal or less than 200 characters.
metadataMeta data of a command.
View on GitHub
TriggeredCommandForm Struct Reference