aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2017-12-14 00:27:34 +0100
committerLorenz Diener <[email protected]>2017-12-14 00:27:34 +0100
commite9d7a3e24a0564bee307f1fdfd00f1dcafbe080c (patch)
tree8cb8df799c7415bd1f0f47b42bd4b62ad2598800 /docs
parent6089d30cc277a8ba6ede89f90b1babcd89344200 (diff)
downloadmastodon.py-e9d7a3e24a0564bee307f1fdfd00f1dcafbe080c.tar.gz
Add last-changed versioning
Diffstat (limited to 'docs')
-rw-r--r--docs/index.rst19
1 files changed, 11 insertions, 8 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 4dd6403..3e6682e 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -56,7 +56,7 @@ Mastodon.py has three modes for dealing with rate limiting that you can pass to
56the constructor, "throw", "wait" and "pace", "wait" being the default. 56the constructor, "throw", "wait" and "pace", "wait" being the default.
57 57
58In "throw" mode, Mastodon.py makes no attempt to stick to rate limits. When 58In "throw" mode, Mastodon.py makes no attempt to stick to rate limits. When
59a request hits the rate limit, it simply throws a MastodonRateLimitError. This is 59a request hits the rate limit, it simply throws a `MastodonRateLimitError`. This is
60for applications that need to handle all rate limiting themselves (i.e. interactive apps), 60for applications that need to handle all rate limiting themselves (i.e. interactive apps),
61or applications wanting to use Mastodon.py in a multi-threaded context ("wait" and "pace" 61or applications wanting to use Mastodon.py in a multi-threaded context ("wait" and "pace"
62modes are not thread safe). 62modes are not thread safe).
@@ -148,6 +148,8 @@ does not exist).
148`MastodonRatelimitError` is raised when you hit an API rate limit. You should try 148`MastodonRatelimitError` is raised when you hit an API rate limit. You should try
149again after a while (see the rate limiting section above). 149again after a while (see the rate limiting section above).
150 150
151`MastodonVersionError` is raised when a version check for an API call fails.
152
151Return values 153Return values
152------------- 154-------------
153Unless otherwise specified, all data is returned as python dictionaries, matching 155Unless otherwise specified, all data is returned as python dictionaries, matching
@@ -451,13 +453,14 @@ Versioning
451---------- 453----------
452Mastodon.py will check if a certain endpoint is available before doing API 454Mastodon.py will check if a certain endpoint is available before doing API
453calls. By default, it checks against the version of Mastodon retrieved on 455calls. By default, it checks against the version of Mastodon retrieved on
454init(), or the version you specified. With these functions, you can make 456init(), or the version you specified. Mastodon.py can be set (in the
455Mastodon.py re-check the server version or explicitly determine if a 457constructor) to either check if an endpoint is available at all or to check
456specific minimum Version is available. 458if the endpoint is available and behaves as in the newest Mastodon version
457 459(this is the default). Version checking can also be disabled altogether.
458Note that the automatic version checks check for the version in which the 460If a version check fails, Mastodon.py throws a `MastodonVersionError`.
459endpoint was first added, not the version in which it was last changed. The 461
460latter check may be added to Mastodon.py at a later date. 462With the following functions, you can make Mastodon.py re-check the server
463version or explicitly determine if a specific minimum Version is available.
461 464
462.. automethod:: Mastodon.retrieve_mastodon_version 465.. automethod:: Mastodon.retrieve_mastodon_version
463.. automethod:: Mastodon.verify_minimum_version 466.. automethod:: Mastodon.verify_minimum_version
Powered by cgit v1.2.3 (git 2.41.0)