diff options
Diffstat (limited to 'docs/index.rst')
-rw-r--r-- | docs/index.rst | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/docs/index.rst b/docs/index.rst index 1334538..2780eaa 100644 --- a/docs/index.rst +++ b/docs/index.rst | |||
@@ -1,16 +1,25 @@ | |||
1 | .. Mastodon.py documentation master file, created by | 1 | .. py:currentmodule:: mastodon |
2 | sphinx-quickstart on Thu Nov 24 01:25:38 2016. | 2 | .. py:class:: Mastodon |
3 | You can adapt this file completely to your liking, but it should at least | ||
4 | contain the root `toctree` directive. | ||
5 | 3 | ||
6 | Welcome to Mastodon.py's documentation! | 4 | Mastodon.py |
7 | ======================================= | 5 | =========== |
8 | 6 | ||
9 | Contents: | 7 | App creation and auth |
8 | --------------------- | ||
9 | |||
10 | Before you can use the mastodon API, you have to register your application (which gets you a client key and client secret) | ||
11 | and then log in (which gets you an access token). These functions allow you to do those things. | ||
12 | For convenience, once you have a client id, secret and access token, you can simply pass them to the constructor of the class, too! | ||
13 | |||
14 | Note that while it is perfectly reasonable to log back in whenever your app starts, registering a new application on every | ||
15 | startup is not, so don't do that - instead, register an application once, and then persist your client id and secret. Convenience | ||
16 | methods for this are provided. | ||
17 | |||
18 | .. autofunction:: create_app | ||
19 | .. automethod:: __init__ | ||
20 | .. automethod:: log_in | ||
21 | |||
22 | Reading timelines | ||
23 | ----------------- | ||
10 | 24 | ||
11 | .. toctree:: | ||
12 | :maxdepth: 2 | ||
13 | 25 | ||
14 | .. py:currentmodule:: mastodon | ||
15 | .. autoclass:: Mastodon | ||
16 | :members: | ||