aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst30
1 files changed, 16 insertions, 14 deletions
diff --git a/README.rst b/README.rst
index 52cd064..40eb0cf 100644
--- a/README.rst
+++ b/README.rst
@@ -7,30 +7,35 @@ Mastodon.py
7 # Register app - only once! 7 # Register app - only once!
8 ''' 8 '''
9 Mastodon.create_app( 9 Mastodon.create_app(
10 'pytooterapp', 10 'pytooterapp',
11 to_file = 'pytooter_clientcred.txt' 11 api_base_url = 'https://mastodon.social',
12 to_file = 'pytooter_clientcred.secret'
12 ) 13 )
13 ''' 14 '''
14 15
15 # Log in - either every time, or use persisted 16 # Log in - either every time, or use persisted
16 ''' 17 '''
17 mastodon = Mastodon(client_id = 'pytooter_clientcred.txt') 18 mastodon = Mastodon(
19 client_id = 'pytooter_clientcred.secret',
20 api_base_url = 'https://mastodon.social'
21 )
18 mastodon.log_in( 22 mastodon.log_in(
19 '[email protected]', 23 '[email protected]',
20 'incrediblygoodpassword', 24 'incrediblygoodpassword',
21 to_file = 'pytooter_usercred.txt' 25 to_file = 'pytooter_usercred.secret'
22 ) 26 )
23 ''' 27 '''
24 28
25 # Create actual instance 29 # Create actual API instance
26 mastodon = Mastodon( 30 mastodon = Mastodon(
27 client_id = 'pytooter_clientcred.txt', 31 client_id = 'pytooter_clientcred.secret',
28 access_token = 'pytooter_usercred.txt' 32 access_token = 'pytooter_usercred.secret',
33 api_base_url = 'https://mastodon.social'
29 ) 34 )
30 mastodon.toot('Tooting from python!') 35 mastodon.toot('Tooting from python using #mastodonpy !')
31 36
32Python wrapper for the Mastodon ( https://github.com/tootsuite/mastodon/ ) API. 37Python wrapper for the Mastodon ( https://github.com/tootsuite/mastodon/ ) API.
33Feature complete for public API version v1 and easy to get started with. 38Feature complete for public API as of version v1.4 and easy to get started with.
34 39
35You can install Mastodon.py via pypi: 40You can install Mastodon.py via pypi:
36 41
@@ -42,8 +47,5 @@ You can install Mastodon.py via pypi:
42 # Python 3 47 # Python 3
43 pip3 install Mastodon.py 48 pip3 install Mastodon.py
44 49
45Full documentation and basic "how to post a toot" usage example can be found 50Full documentation and basic usage examples can be found
46at http://mastodonpy.readthedocs.io/en/latest/ . 51at http://mastodonpy.readthedocs.io/en/latest/ .
47
48Full "real life" example of how to use this library to write a Mastodon bot
49will be linked here shortly.
Powered by cgit v1.2.3 (git 2.41.0)