diff options
-rw-r--r-- | docs/conf.py | 1 | ||||
-rw-r--r-- | docs/index.rst | 33 |
2 files changed, 22 insertions, 12 deletions
diff --git a/docs/conf.py b/docs/conf.py index c6f7b02..5fc673b 100644 --- a/docs/conf.py +++ b/docs/conf.py | |||
@@ -29,6 +29,7 @@ | |||
29 | import os | 29 | import os |
30 | import sys | 30 | import sys |
31 | sys.path.insert(0, os.path.abspath('../')) | 31 | sys.path.insert(0, os.path.abspath('../')) |
32 | autodoc_member_order = 'by_source' | ||
32 | #print(sys.path) | 33 | #print(sys.path) |
33 | 34 | ||
34 | # Add any Sphinx extension module names here, as strings. They can be | 35 | # Add any Sphinx extension module names here, as strings. They can be |
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: | ||