aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkEEaton <[email protected]>2018-08-14 13:04:21 -0400
committerGitHub <[email protected]>2018-08-14 13:04:21 -0400
commitcf4987d601a4ccfedbf10f05f25a9365fc46f9b9 (patch)
tree993fdece651f338d510f5251d0fa095f129ac18a
parent191ad84cef0b37e8d8a708812336858d447304c5 (diff)
downloadmastodon.py-cf4987d601a4ccfedbf10f05f25a9365fc46f9b9.tar.gz
Revise README.rst for clarity
-rw-r--r--README.rst21
1 files changed, 14 insertions, 7 deletions
diff --git a/README.rst b/README.rst
index 97919e0..779af96 100644
--- a/README.rst
+++ b/README.rst
@@ -1,20 +1,23 @@
1Mastodon.py 1Mastodon.py
2=========== 2===========
3Register your app! This only needs to be done once.
4
3.. code-block:: python 5.. code-block:: python
4 6
5 from mastodon import Mastodon 7 from mastodon import Mastodon
6 8
7 # Register app - only once!
8 '''
9 Mastodon.create_app( 9 Mastodon.create_app(
10 'pytooterapp', 10 'pytooterapp',
11 api_base_url = 'https://mastodon.social', 11 api_base_url = 'https://mastodon.social',
12 to_file = 'pytooter_clientcred.secret' 12 to_file = 'pytooter_clientcred.secret'
13 ) 13 )
14 '''
15 14
16 # Log in - either every time, or use persisted 15Then login. This can be done every time, or use persisted.
17 ''' 16
17.. code-block:: python
18
19 from mastodon import Mastodon
20
18 mastodon = Mastodon( 21 mastodon = Mastodon(
19 client_id = 'pytooter_clientcred.secret', 22 client_id = 'pytooter_clientcred.secret',
20 api_base_url = 'https://mastodon.social' 23 api_base_url = 'https://mastodon.social'
@@ -24,9 +27,13 @@ Mastodon.py
24 'incrediblygoodpassword', 27 'incrediblygoodpassword',
25 to_file = 'pytooter_usercred.secret' 28 to_file = 'pytooter_usercred.secret'
26 ) 29 )
27 '''
28 30
29 # Create actual API instance 31To post, create an actual API instance.
32
33.. code-block:: python
34
35 from mastodon import Mastodon
36
30 mastodon = Mastodon( 37 mastodon = Mastodon(
31 access_token = 'pytooter_usercred.secret', 38 access_token = 'pytooter_usercred.secret',
32 api_base_url = 'https://mastodon.social' 39 api_base_url = 'https://mastodon.social'
Powered by cgit v1.2.3 (git 2.41.0)