diff options
author | Lorenz Diener <[email protected]> | 2017-06-16 01:29:12 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2017-06-16 01:29:12 +0200 |
commit | 721da30d7a26ca3eba2ca12648604f1feb680e39 (patch) | |
tree | dcee4bcd34f220b737e7719d2f0fda9a9774dc83 /README.rst | |
parent | d4b37995fea40320c1971ea8bd747fc9ece9c368 (diff) | |
download | mastodon.py-721da30d7a26ca3eba2ca12648604f1feb680e39.tar.gz |
Some changes in preparation for 1.0.8
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 30 |
1 files changed, 16 insertions, 14 deletions
@@ -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 | ||
32 | Python wrapper for the Mastodon ( https://github.com/tootsuite/mastodon/ ) API. | 37 | Python wrapper for the Mastodon ( https://github.com/tootsuite/mastodon/ ) API. |
33 | Feature complete for public API version v1 and easy to get started with. | 38 | Feature complete for public API as of version v1.4 and easy to get started with. |
34 | 39 | ||
35 | You can install Mastodon.py via pypi: | 40 | You 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 | ||
45 | Full documentation and basic "how to post a toot" usage example can be found | 50 | Full documentation and basic usage examples can be found |
46 | at http://mastodonpy.readthedocs.io/en/latest/ . | 51 | at http://mastodonpy.readthedocs.io/en/latest/ . |
47 | |||
48 | Full "real life" example of how to use this library to write a Mastodon bot | ||
49 | will be linked here shortly. | ||