To create new wiki account, please join us on #znc at Libera.Chat and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.
Api: Difference between revisions
Jump to navigation
Jump to search
Start API documentation draft |
m Add table styling |
||
Line 1: | Line 1: | ||
== Commands == | == Commands == | ||
{| | {| class="wikitable" | ||
| <code>PING</code> | | <code>PING</code> | ||
| Unconditionally returns PONG. Exists primarily for testing things, or may be used to probe for API availability without making any calls. | | Unconditionally returns PONG. Exists primarily for testing things, or may be used to probe for API availability without making any calls. |
Revision as of 10:58, 5 August 2021
Commands
PING
|
Unconditionally returns PONG. Exists primarily for testing things, or may be used to probe for API availability without making any calls. |
HELP
|
Returns informational text about the API's self-documentation. |
COMMANDS
|
Returns a list of available commands. |
QUERYSCOPES
|
Returns a list of available QUERY scopes. See below. |
QUERY
|
Used to query information. See below. |
QUERY command
Types
Scalar types are returned without any special syntax.
Lists of scalar types are returned one element per IRC message, preceded by the string LIST
and ended by the string LISTEND
.
Lists of n-tuples are returned one tuple element per IRC message and in order, preceded by the string TUPLELIST <n>
and ended by the string TUPLELISTEND
where <n>
is the arity of the tuples in the list.
For example, here is a list of the numbers 1, 2, and 3:
LIST 1 2 3 LISTEND
And here is a list of the 2-tuples (A, 1)
, (B, 2)
, and (C, 3)
:
TUPLELIST 2 A 1 B 2 C 3 TUPLELISTEND