aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhalcy <halcy@ARARAGI-KUN>2022-12-01 01:51:49 +0200
committerhalcy <halcy@ARARAGI-KUN>2022-12-01 01:51:49 +0200
commitf44fbdc5f25847dfbda7b84adec629d196cc0530 (patch)
treeacfa6cd0ba64dfc08a6617577cff861b11f94b42
parente483d160145b1086629c1ba5a2964c5550c5c126 (diff)
downloadmastodon.py-f44fbdc5f25847dfbda7b84adec629d196cc0530.tar.gz
Clean up some docs stuff
-rw-r--r--README.rst37
-rw-r--r--docs/index.rst4
2 files changed, 19 insertions, 22 deletions
diff --git a/README.rst b/README.rst
index 59414d8..df3b6d8 100644
--- a/README.rst
+++ b/README.rst
@@ -1,37 +1,35 @@
1Mastodon.py 1Mastodon.py
2=========== 2===========
3Python wrapper for the Mastodon ( https://github.com/mastodon/mastodon/ ) API. 3Python wrapper for the Mastodon ( https://github.com/mastodon/mastodon/ ) API.
4Feature complete for public API as of Mastodon version 3.4.0 and easy to get started with: 4Feature complete for public API as of Mastodon version 3.5.5 and easy to get started with:
5 5
6.. code-block:: python 6.. code-block:: python
7 7
8 # Register your app! This only needs to be done once. Uncomment the code and substitute in your information.
9
10 from mastodon import Mastodon 8 from mastodon import Mastodon
11 9
10 # Register your app! This only needs to be done once (per server, or when
11 # distributing rather than hosting an application, most likely per device and server).
12 # Uncomment the code and substitute in your information:
13
12 ''' 14 '''
13 Mastodon.create_app( 15 Mastodon.create_app(
14 'pytooterapp', 16 'pytooterapp',
15 api_base_url = 'https://mastodon.social', 17 api_base_url = 'https://mastodon.social',
16 to_file = 'pytooter_clientcred.secret' 18 to_file = 'pytooter_clientcred.secret'
17 ) 19 )
18 ''' 20 '''
19 21
20 # Then login. This can be done every time, or use persisted. 22 # Then, log in. This can be done every time your application starts (e.g. when writing a
21 23 # simple bot), or you can use the persisted information:
22 from mastodon import Mastodon 24 mastodon = Mastodon(client_id = 'pytooter_clientcred.secret',)
23
24 mastodon = Mastodon(client_id = 'pytooter_clientcred.secret')
25 mastodon.log_in( 25 mastodon.log_in(
26 '[email protected]', 26 '[email protected]',
27 'incrediblygoodpassword', 27 'incrediblygoodpassword',
28 to_file = 'pytooter_usercred.secret' 28 to_file = 'pytooter_usercred.secret'
29 ) 29 )
30 30
31 # To post, create an actual API instance. 31 # Note that this won't work when using 2FA - you'll have to use OAuth, in that case.
32 32 # To post, create an actual API instance:
33 from mastodon import Mastodon
34
35 mastodon = Mastodon(access_token = 'pytooter_usercred.secret') 33 mastodon = Mastodon(access_token = 'pytooter_usercred.secret')
36 mastodon.toot('Tooting from Python using #mastodonpy !') 34 mastodon.toot('Tooting from Python using #mastodonpy !')
37 35
@@ -42,9 +40,8 @@ You can install Mastodon.py via pypi:
42 # Python 3 40 # Python 3
43 pip3 install Mastodon.py 41 pip3 install Mastodon.py
44 42
45Note that Python 2.7 is now no longer officially supported. It will still 43We currently try to support Python 3.7 and above, and try to at least not break Python 3 versions
46work for a while, and we will fix issues as they come up, but we will not 44below that. Python 2 support is no longer a goal.
47be testing specifically for Python 2.7 any longer.
48 45
49Full documentation and basic usage examples can be found 46Full documentation and basic usage examples can be found
50at https://mastodonpy.readthedocs.io/en/stable/ 47at https://mastodonpy.readthedocs.io/en/stable/
diff --git a/docs/index.rst b/docs/index.rst
index 6141557..5b1fe3a 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -32,7 +32,7 @@ Then, log in. This can be done every time your application starts (e.g. when wri
32 to_file = 'pytooter_usercred.secret' 32 to_file = 'pytooter_usercred.secret'
33 ) 33 )
34 34
35To post, create an actual API instance: 35Note that this won't work when using 2FA - you'll have to use OAuth, in that case. To post, create an actual API instance:
36 36
37.. code-block:: python 37.. code-block:: python
38 38
@@ -49,7 +49,7 @@ every aspect. This is a simple Python wrapper for that API, provided
49as a single Python module. 49as a single Python module.
50 50
51Mastodon.py aims to implement the complete public Mastodon API. As 51Mastodon.py aims to implement the complete public Mastodon API. As
52of this time, it is feature complete for Mastodon version 3.5.3. The 52of this time, it is feature complete for Mastodon version 3.5.5. The
53Mastodon compatible API layers of various other pieces of software as well 53Mastodon compatible API layers of various other pieces of software as well
54as forks, while not an official target, should also be basically 54as forks, while not an official target, should also be basically
55compatible, and Mastodon.py does make some allowances for behaviour that isn't 55compatible, and Mastodon.py does make some allowances for behaviour that isn't
Powered by cgit v1.2.3 (git 2.41.0)