CommandForm

public struct CommandForm

Form of a command.

This class contains data in order to create Command with ThingIFAPI.postNewCommand(_:completionHandler:).

Mandatory data are followings:

  • Array of actions

Optional data are followings:

  • Title of a command
  • Description of a command
  • Meta data of a command
  • Array of AliasAction instances.

    Declaration

    Swift

    public let aliasActions: [AliasAction]
  • 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 CommandForm instance.

    Declaration

    Swift

    public init(_ aliasActions: [AliasAction],
                    title: String? = nil,
                    commandDescription: String? = nil,
                    metadata: [String : Any]? = nil)

    Parameters

    actions

    Array of AliasAction instances. Must not be empty.

    title

    Title of a command. This should be equal or less than 50 characters.

    description

    Description of a comand. This should be equal or less than 200 characters.

    metadata

    Meta data of a command.