aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'docs/01_general.rst')
-rw-r--r--docs/01_general.rst31
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/01_general.rst b/docs/01_general.rst
index 0ea3ac4..70c7e6e 100644
--- a/docs/01_general.rst
+++ b/docs/01_general.rst
@@ -1,3 +1,6 @@
1General information
2===================
3
1Rate limiting 4Rate limiting
2------------- 5-------------
3Mastodon's API rate limits per user account. By default, the limit is 300 requests 6Mastodon's API rate limits per user account. By default, the limit is 300 requests
@@ -117,6 +120,34 @@ you can also just write
117 120
118and everything will work as intended. 121and everything will work as intended.
119 122
123Versioning
124----------
125Mastodon.py will check if a certain endpoint is available before doing API
126calls. By default, it checks against the version of Mastodon retrieved on
127init(), or the version you specified. Mastodon.py can be set (in the
128constructor) to either check if an endpoint is available at all (this is the
129default) or to check if the endpoint is available and behaves as in the newest
130Mastodon version (with regards to parameters as well as return values).
131Version checking can also be disabled altogether. If a version check fails,
132Mastodon.py throws a `MastodonVersionError`.
133
134Some functions need to check what version of Mastodon they are talking to.
135These will generally use a cached version to avoid sending a lot of pointless
136requests.
137
138Many non-mainline forks have various different formats for their versions and
139they have different, incompatible ideas about how to report version. Mastodon.py
140tries its best to figure out what is going on, but success is not guaranteed.
141
142With the following functions, you can make Mastodon.py re-check the server
143version or explicitly determine if a specific minimum Version is available.
144Long-running applications that aim to support multiple Mastodon versions
145should do this from time to time in case a server they are running against
146updated.
147
148.. automethod:: Mastodon.retrieve_mastodon_version
149.. automethod:: Mastodon.verify_minimum_version
150
120A brief note on block lists 151A brief note on block lists
121--------------------------- 152---------------------------
122Mastodon.py used to block three instances because these were particularly notorious for 153Mastodon.py used to block three instances because these were particularly notorious for
Powered by cgit v1.2.3 (git 2.41.0)