-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
.. Mastodon.py documentation master file, created by | ||
sphinx-quickstart on Thu Nov 24 01:25:38 2016. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
.. py:currentmodule:: mastodon | ||
.. py:class:: Mastodon | ||
Welcome to Mastodon.py's documentation! | ||
======================================= | ||
Mastodon.py | ||
=========== | ||
|
||
Contents: | ||
App creation and auth | ||
--------------------- | ||
|
||
Before you can use the mastodon API, you have to register your application (which gets you a client key and client secret) | ||
and then log in (which gets you an access token). These functions allow you to do those things. | ||
For convenience, once you have a client id, secret and access token, you can simply pass them to the constructor of the class, too! | ||
|
||
Note that while it is perfectly reasonable to log back in whenever your app starts, registering a new application on every | ||
startup is not, so don't do that - instead, register an application once, and then persist your client id and secret. Convenience | ||
methods for this are provided. | ||
|
||
.. autofunction:: create_app | ||
.. automethod:: __init__ | ||
.. automethod:: log_in | ||
|
||
Reading timelines | ||
----------------- | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
.. py:currentmodule:: mastodon | ||
.. autoclass:: Mastodon | ||
:members: |