From fc9c46d1a201016baf95f7587843299d07222441 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sat, 26 Sep 2015 13:45:22 +0100 Subject: [PATCH] updated docs --- docs/docs_client.rst | 33 +++++++++++++++++++++++++++++++++ docs/index.rst | 1 + 2 files changed, 34 insertions(+) create mode 100644 docs/docs_client.rst diff --git a/docs/docs_client.rst b/docs/docs_client.rst new file mode 100644 index 000000000..69d9bcda2 --- /dev/null +++ b/docs/docs_client.rst @@ -0,0 +1,33 @@ +Client Documentation +==================== + +Attributes +---------- + +``options`` +~~~~~~~~~~~ +An `Object` containing a configuration for the Client. Currently can only be configured like so: + +.. code-block:: js + + { + queue : false // whether messages should be sent one after the other or + // just send straight away. + } + +``token`` +~~~~~~~~~ +A `String` that is the token received after logging in. It is used to authorise the Client when joining WebSockets or making HTTP requests. + +``state`` +~~~~~~~~~ +An `Integer` representing what state of connection the Client is in. + +- **0** is idle, meaning the Client has been created but no login attempts have been made. +- **1** is logging in, meaning the Client is in the process of logging in. +- **2** is logged in, meaning the Client is logged in but not necessarily ready. +- **3** is ready, meaning the Client is ready to begin listening. +- **4** is disconnected, meaning the Client was disconnected due to any reason. + +Functions +--------- \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index af0d5dcf0..70b5f1698 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,6 +17,7 @@ Contents: get_started troubleshooting create_simple_bot + docs_client