diff options
author | Laurent Peuch <[email protected]> | 2017-04-01 15:08:13 +0200 |
---|---|---|
committer | Laurent Peuch <[email protected]> | 2017-04-01 15:08:13 +0200 |
commit | 969e5dff1416b9f4a63f6bdb0cd58089860d49d8 (patch) | |
tree | 5556610e92c48c4fd6fdd08ec2cc65b52a69837d | |
parent | 239d9104e63d5c421911d0a3d4a308304c60ee17 (diff) | |
download | mastodon.py-969e5dff1416b9f4a63f6bdb0cd58089860d49d8.tar.gz |
[mod] sync README.rst and doc index to avoid confusion
-rw-r--r-- | README.rst | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -2,8 +2,29 @@ Mastodon.py | |||
2 | =========== | 2 | =========== |
3 | .. code-block:: python | 3 | .. code-block:: python |
4 | 4 | ||
5 | from mastodon import Mastodon | ||
6 | |||
7 | # Register app - only once! | ||
8 | ''' | ||
9 | Mastodon.create_app( | ||
10 | 'pytooterapp', | ||
11 | to_file = 'pytooter_clientcred.txt' | ||
12 | ) | ||
13 | ''' | ||
14 | |||
15 | # Log in - either every time, or use persisted | ||
16 | ''' | ||
17 | mastodon = Mastodon(client_id = 'pytooter_clientcred.txt') | ||
18 | mastodon.log_in( | ||
19 | '[email protected]', | ||
20 | 'incrediblygoodpassword', | ||
21 | to_file = 'pytooter_usercred.txt' | ||
22 | ) | ||
23 | ''' | ||
24 | |||
25 | # Create actual instance | ||
5 | mastodon = Mastodon( | 26 | mastodon = Mastodon( |
6 | client_id = 'pytooter_clientcred.txt', | 27 | client_id = 'pytooter_clientcred.txt', |
7 | access_token = 'pytooter_usercred.txt' | 28 | access_token = 'pytooter_usercred.txt' |
8 | ) | 29 | ) |
9 | mastodon.toot('Tooting from python!') | 30 | mastodon.toot('Tooting from python!') |