aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/index.rst25
1 files changed, 8 insertions, 17 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 61aa916..0a6c43b 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -23,15 +23,8 @@ Then login. This can be done every time, or you can use the persisted informatio
23 23
24 from mastodon import Mastodon 24 from mastodon import Mastodon
25 25
26 mastodon = Mastodon( 26 mastodon = Mastodon(client_id = 'pytooter_clientcred.secret',)
27 client_id = 'pytooter_clientcred.secret', 27 mastodon.log_in('[email protected]', 'incrediblygoodpassword', to_file = 'pytooter_usercred.secret')
28 api_base_url = 'https://mastodon.social'
29 )
30 mastodon.log_in(
31 '[email protected]',
32 'incrediblygoodpassword',
33 to_file = 'pytooter_usercred.secret'
34 )
35 28
36To post, create an actual API instance: 29To post, create an actual API instance:
37 30
@@ -39,19 +32,13 @@ To post, create an actual API instance:
39 32
40 from mastodon import Mastodon 33 from mastodon import Mastodon
41 34
42 mastodon = Mastodon( 35 mastodon = Mastodon(access_token = 'pytooter_usercred.secret')
43 access_token = 'pytooter_usercred.secret',
44 api_base_url = 'https://mastodon.social'
45 )
46 mastodon.toot('Tooting from Python using #mastodonpy !') 36 mastodon.toot('Tooting from Python using #mastodonpy !')
47 37
48`Mastodon`_ is an ActivityPub-based Twitter-like federated social 38`Mastodon`_ is an ActivityPub-based Twitter-like federated social
49network node. It has an API that allows you to interact with its 39network node. It has an API that allows you to interact with its
50every aspect. This is a simple Python wrapper for that API, provided 40every aspect. This is a simple Python wrapper for that API, provided
51as a single Python module. By default, it talks to the 41as a single Python module.
52`Mastodon flagship instance`_, but it can be set to talk to any
53node running Mastodon by setting `api_base_url` when creating the
54API object (or creating an app).
55 42
56Mastodon.py aims to implement the complete public Mastodon API. As 43Mastodon.py aims to implement the complete public Mastodon API. As
57of this time, it is feature complete for Mastodon version 3.5.0. The 44of this time, it is feature complete for Mastodon version 3.5.0. The
@@ -1030,6 +1017,7 @@ Reading data: Instances
1030These functions allow you to fetch information associated with the 1017These functions allow you to fetch information associated with the
1031current instance. 1018current instance.
1032 1019
1020.. _instance():
1033.. automethod:: Mastodon.instance 1021.. automethod:: Mastodon.instance
1034.. automethod:: Mastodon.instance_activity 1022.. automethod:: Mastodon.instance_activity
1035.. automethod:: Mastodon.instance_peers 1023.. automethod:: Mastodon.instance_peers
@@ -1159,8 +1147,11 @@ Reading data: Searching
1159Reading data: Trends 1147Reading data: Trends
1160-------------------- 1148--------------------
1161 1149
1150.. _trending_tags():
1162.. automethod:: Mastodon.trending_tags 1151.. automethod:: Mastodon.trending_tags
1152.. _trending_statuses():
1163.. automethod:: Mastodon.trending_statuses 1153.. automethod:: Mastodon.trending_statuses
1154.. _trending_links():
1164.. automethod:: Mastodon.trending_links 1155.. automethod:: Mastodon.trending_links
1165.. automethod:: Mastodon.trends 1156.. automethod:: Mastodon.trends
1166 1157
Powered by cgit v1.2.3 (git 2.41.0)