diff options
author | Lorenz Diener <[email protected]> | 2017-06-15 20:48:59 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2017-06-15 20:48:59 +0200 |
commit | 03e19e3655c04e467fce863fb9bdc75243f578b4 (patch) | |
tree | 756c82822e05528e1940974054bcabbc22330c6f | |
parent | 5ed78fbe8372bc9e87968a2f42031859190df8db (diff) | |
download | mastodon.py-03e19e3655c04e467fce863fb9bdc75243f578b4.tar.gz |
Small documentation adjustments
-rw-r--r-- | docs/index.rst | 15 | ||||
-rw-r--r-- | mastodon/Mastodon.py | 4 |
2 files changed, 9 insertions, 10 deletions
diff --git a/docs/index.rst b/docs/index.rst index 531c2db..03f4b29 100644 --- a/docs/index.rst +++ b/docs/index.rst | |||
@@ -10,8 +10,9 @@ Mastodon.py | |||
10 | # Register app - only once! | 10 | # Register app - only once! |
11 | ''' | 11 | ''' |
12 | Mastodon.create_app( | 12 | Mastodon.create_app( |
13 | 'pytooterapp', | 13 | 'pytooterapp', |
14 | to_file = 'pytooter_clientcred.secret' | 14 | api_base_url = 'https://mastodon.social', |
15 | to_file = 'pytooter_clientcred.secret' | ||
15 | ) | 16 | ) |
16 | ''' | 17 | ''' |
17 | 18 | ||
@@ -20,17 +21,19 @@ Mastodon.py | |||
20 | mastodon = Mastodon(client_id = 'pytooter_clientcred.secret') | 21 | mastodon = Mastodon(client_id = 'pytooter_clientcred.secret') |
21 | mastodon.log_in( | 22 | mastodon.log_in( |
22 | '[email protected]', | 23 | '[email protected]', |
23 | 'incrediblygoodpassword', | 24 | 'incrediblygoodpassword', |
25 | api_base_url = 'https://mastodon.social', | ||
24 | to_file = 'pytooter_usercred.secret' | 26 | to_file = 'pytooter_usercred.secret' |
25 | ) | 27 | ) |
26 | ''' | 28 | ''' |
27 | 29 | ||
28 | # Create actual instance | 30 | # Create actual API instance |
29 | mastodon = Mastodon( | 31 | mastodon = Mastodon( |
30 | client_id = 'pytooter_clientcred.secret', | 32 | client_id = 'pytooter_clientcred.secret', |
31 | access_token = 'pytooter_usercred.secret' | 33 | access_token = 'pytooter_usercred.secret', |
34 | api_base_url = 'https://mastodon.social' | ||
32 | ) | 35 | ) |
33 | mastodon.toot('Tooting from python!') | 36 | mastodon.toot('Tooting from python using #mastodonpy !') |
34 | 37 | ||
35 | `Mastodon`_ is an ostatus based twitter-like federated social | 38 | `Mastodon`_ is an ostatus based twitter-like federated social |
36 | network node. It has an API that allows you to interact with its | 39 | network node. It has an API that allows you to interact with its |
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index ce7e1d0..8eed5cd 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -22,10 +22,6 @@ class Mastodon: | |||
22 | 22 | ||
23 | If anything is unclear, check the official API docs at | 23 | If anything is unclear, check the official API docs at |
24 | https://github.com/Gargron/mastodon/wiki/API | 24 | https://github.com/Gargron/mastodon/wiki/API |
25 | |||
26 | Supported: | ||
27 | Username-Password Login | ||
28 | OAuth2 | ||
29 | """ | 25 | """ |
30 | __DEFAULT_BASE_URL = 'https://mastodon.social' | 26 | __DEFAULT_BASE_URL = 'https://mastodon.social' |
31 | __DEFAULT_TIMEOUT = 300 | 27 | __DEFAULT_TIMEOUT = 300 |