diff options
author | halcy <halcy@ARARAGI-KUN> | 2022-11-27 23:07:08 +0200 |
---|---|---|
committer | halcy <halcy@ARARAGI-KUN> | 2022-11-27 23:07:08 +0200 |
commit | ee9a3c9c5e954453f493c8173c54ec3834ccb18d (patch) | |
tree | 325700bdffe9a2000a6a7f1211ad71320d59131a | |
parent | 396a2d442fb8afc3a1e694970f7e57dd3c89db54 (diff) | |
download | mastodon.py-ee9a3c9c5e954453f493c8173c54ec3834ccb18d.tar.gz |
Clean docs up a bit more
-rw-r--r-- | docs/index.rst | 25 |
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 | ||
36 | To post, create an actual API instance: | 29 | To 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 |
49 | network node. It has an API that allows you to interact with its | 39 | network node. It has an API that allows you to interact with its |
50 | every aspect. This is a simple Python wrapper for that API, provided | 40 | every aspect. This is a simple Python wrapper for that API, provided |
51 | as a single Python module. By default, it talks to the | 41 | as a single Python module. |
52 | `Mastodon flagship instance`_, but it can be set to talk to any | ||
53 | node running Mastodon by setting `api_base_url` when creating the | ||
54 | API object (or creating an app). | ||
55 | 42 | ||
56 | Mastodon.py aims to implement the complete public Mastodon API. As | 43 | Mastodon.py aims to implement the complete public Mastodon API. As |
57 | of this time, it is feature complete for Mastodon version 3.5.0. The | 44 | of this time, it is feature complete for Mastodon version 3.5.0. The |
@@ -1030,6 +1017,7 @@ Reading data: Instances | |||
1030 | These functions allow you to fetch information associated with the | 1017 | These functions allow you to fetch information associated with the |
1031 | current instance. | 1018 | current 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 | |||
1159 | Reading data: Trends | 1147 | Reading 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 | ||