aboutsummaryrefslogtreecommitdiff
path: root/docs/api.rst
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-08-21 18:18:34 -0400
committerRapptz <[email protected]>2015-08-21 18:18:34 -0400
commit3e0f09d32c03de0916329c3b131ed1d46672bc02 (patch)
treea758fa3db70ecabc0e6e2e2435e5a9219a8876d7 /docs/api.rst
downloaddiscord.py-3e0f09d32c03de0916329c3b131ed1d46672bc02.tar.xz
discord.py-3e0f09d32c03de0916329c3b131ed1d46672bc02.zip
Initial commit
Diffstat (limited to 'docs/api.rst')
-rw-r--r--docs/api.rst62
1 files changed, 62 insertions, 0 deletions
diff --git a/docs/api.rst b/docs/api.rst
new file mode 100644
index 00000000..ad020d6e
--- /dev/null
+++ b/docs/api.rst
@@ -0,0 +1,62 @@
+.. currentmodule:: discord
+
+API Reference
+===============
+
+The following section outlines the API of pydiscord.
+
+
+Client
+-------
+
+.. autoclass:: Client
+ :members:
+
+.. _discord-api-events:
+
+Event Reference
+~~~~~~~~~~~~~~~~
+
+This page outlines the different types of events listened to by :meth:`Client.event`.
+
+
+.. function:: on_ready()
+
+ Called when the client is done preparing the data received from Discord. Usually after login is successful
+ and the :attr:`Client.servers` and co. are filled up.
+
+.. function:: on_message(message)
+
+ Called when a message is created and sent to a server.
+
+ :param message: A :class:`Message` of the current message.
+
+.. function:: on_response(response)
+
+ Called whenever a message is received from the websocket. Used mainly for debugging purposes.
+ The parameter passed is raw data that was parsed via ``json.loads``.
+
+ :param response: The received message response after gone through ``json.loads``.
+
+
+Data Classes
+--------------
+
+Some classes are just there to be data containers, this lists them. It should be assumed that *all* classes in this category are immutable and should not be modified.
+
+.. autoclass:: User
+ :members:
+
+.. autoclass:: Message
+ :members:
+
+.. autoclass:: Server
+ :members:
+
+.. autoclass:: Channel
+ :members:
+
+.. autoclass:: PrivateChannel
+ :members:
+
+