Skip to content

Commit

Permalink
Some more doc split tests
Browse files Browse the repository at this point in the history
  • Loading branch information
halcy authored and halcy committed Nov 27, 2022
1 parent 13d6ff6 commit c49364f
Show file tree
Hide file tree
Showing 5 changed files with 855 additions and 2 deletions.
31 changes: 31 additions & 0 deletions docs/01_general.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
General information
===================

Rate limiting
-------------
Mastodon's API rate limits per user account. By default, the limit is 300 requests
Expand Down Expand Up @@ -117,6 +120,34 @@ you can also just write
and everything will work as intended.

Versioning
----------
Mastodon.py will check if a certain endpoint is available before doing API
calls. By default, it checks against the version of Mastodon retrieved on
init(), or the version you specified. Mastodon.py can be set (in the
constructor) to either check if an endpoint is available at all (this is the
default) or to check if the endpoint is available and behaves as in the newest
Mastodon version (with regards to parameters as well as return values).
Version checking can also be disabled altogether. If a version check fails,
Mastodon.py throws a `MastodonVersionError`.

Some functions need to check what version of Mastodon they are talking to.
These will generally use a cached version to avoid sending a lot of pointless
requests.

Many non-mainline forks have various different formats for their versions and
they have different, incompatible ideas about how to report version. Mastodon.py
tries its best to figure out what is going on, but success is not guaranteed.

With the following functions, you can make Mastodon.py re-check the server
version or explicitly determine if a specific minimum Version is available.
Long-running applications that aim to support multiple Mastodon versions
should do this from time to time in case a server they are running against
updated.

.. automethod:: Mastodon.retrieve_mastodon_version
.. automethod:: Mastodon.verify_minimum_version

A brief note on block lists
---------------------------
Mastodon.py used to block three instances because these were particularly notorious for
Expand Down

0 comments on commit c49364f

Please sign in to comment.