From Ape Wiki

Jump to: navigation, search

Commands

The APE Server is controllable via Commands sent by an external client (for example the APE JavaScript Framework. The Commands are sent via an HTTP request to the Server via GET or POST methods.

Command Formatting

A command is a JSON Object like the following.

[{"cmd":"COMMAND_NAME","chl":1,"sessid":"xxxxxx","params":{"foo":"bar}},{"cmd":"COMMAND...."}]

You can send several commands at once by putting them into a JSON Array ([])

Command Examples

APE is shipped out of the box with a large pannel of predefined Commands, allowing lots of different actions such as :

  • Join a channel (JOIN)
  • Send a message to a user, a channel or anything else (SEND)
  • Connect to an external server (PROXY_CONNECT)
  • And many more...

The APE Server API allows to a C or JavaScript (server-side) Plugin to easily add Commands (see server API register_cmd())