V8 Javascript API

Command Class Reference

[Commands]

Description

Interface for a command implementation. This interface describes the format of a command implementation, that is the required and optional properties that must be implemented on module.exports.command for a module to be implement a command.

Inner Classes

class 
Interface that describes a command argument. More...
class 
Information about what is returned by a command. More...

Required properties

Function  execute
The function to call to actually execute the command. More...
String  name
The name of the command.

Argument properties

Object  arguments
An object whose keys are the argument names supported by the command and values describe the arguments via the Argument interface. More...

Documentation properties

String  description
The command description.
String[]  groups
Array of strings listing which documentation groups this command belongs to.
Object  metadata
String key/value pairs describing the command metadata.
Return_type returns
Information about what the command returns.

Other properties

String  namespace
The command namespace. More...

Properties

Object Command.arguments

An object whose keys are the argument names supported by the command and values describe the arguments via the Argument interface. Specifying arguments is not strictly required however if arguments is provided then any argument that does not have a default value is required when calling the command.

String Command.namespace

The command namespace. Rarely used but if set allows a commands to be isolated within a namespace to distinguish them from core RealityServer commands

String Command.description

The command description.

Function Command.execute

The function to call to actually execute the command. The function takes a single argument which is an object containing the parameters passed to the command.

String[] Command.groups

Array of strings listing which documentation groups this command belongs to.

Object Command.metadata

String key/value pairs describing the command metadata.

String Command.name

The name of the command.

Return_type Command.returns

Information about what the command returns.