aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/conf.py1
-rw-r--r--docs/index.rst33
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 @@
29import os 29import os
30import sys 30import sys
31sys.path.insert(0, os.path.abspath('../')) 31sys.path.insert(0, os.path.abspath('../'))
32autodoc_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
6Welcome to Mastodon.py's documentation! 4Mastodon.py
7======================================= 5===========
8 6
9Contents: 7App creation and auth
8---------------------
9
10Before you can use the mastodon API, you have to register your application (which gets you a client key and client secret)
11and then log in (which gets you an access token). These functions allow you to do those things.
12For convenience, once you have a client id, secret and access token, you can simply pass them to the constructor of the class, too!
13
14Note that while it is perfectly reasonable to log back in whenever your app starts, registering a new application on every
15startup is not, so don't do that - instead, register an application once, and then persist your client id and secret. Convenience
16methods for this are provided.
17
18.. autofunction:: create_app
19.. automethod:: __init__
20.. automethod:: log_in
21
22Reading timelines
23-----------------
10 24
11.. toctree::
12 :maxdepth: 2
13 25
14.. py:currentmodule:: mastodon
15.. autoclass:: Mastodon
16 :members:
Powered by cgit v1.2.3 (git 2.41.0)