CommandForm
public class CommandForm: NSObject, NSCoding
Form of a command.
This class contains data in order to create Command with
ThingIFAPI.postNewCommand(commandForm:completionHandler:).
Mandatory data are followings:
- Schema name
- Schema version
- List of actions
Optional data are followings:
- Title of a schema
- Description of a schema
- Meta data of a schema
-
Schema name.
Declaration
Swift
public let schemaName: String -
Schema version.
Declaration
Swift
public let schemaVersion: Int -
List of actions.
Declaration
Swift
public let actions: [Dictionary<String, AnyObject>] -
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: Dictionary<String, AnyObject>?
-
Initializer of CommandForm instance.
Parameter
Parameter schemaName: Schema name.Parameter
Parameter schemaVersion: Schema version.Parameter
Parameter actions: List of actions. Must not be empty.Parameter
Parameter title: Title of a command. This should be equal or less than 50 characters.Parameter
Parameter description: Description of a comand. This should be equal or less than 200 characters.Parameter
Parameter metadata: Meta data of a command.Declaration
Swift
public init(schemaName: String, schemaVersion: Int, actions: [Dictionary<String, AnyObject>], title: String? = nil, commandDescription: String? = nil, metadata: Dictionary<String, AnyObject>? = nil)Parameters
schemaNameSchema name.
schemaVersionSchema version.
actionsList of actions. Must not be empty.
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.
-
Undocumented
Declaration
Swift
public class CommandForm: NSObject, NSCoding -
Undocumented
Declaration
Swift
public class CommandForm: NSObject, NSCoding
View on GitHub
CommandForm Class Reference