diff options
author | Lorenz Diener <[email protected]> | 2017-12-14 00:27:34 +0100 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2017-12-14 00:27:34 +0100 |
commit | e9d7a3e24a0564bee307f1fdfd00f1dcafbe080c (patch) | |
tree | 8cb8df799c7415bd1f0f47b42bd4b62ad2598800 /docs | |
parent | 6089d30cc277a8ba6ede89f90b1babcd89344200 (diff) | |
download | mastodon.py-e9d7a3e24a0564bee307f1fdfd00f1dcafbe080c.tar.gz |
Add last-changed versioning
Diffstat (limited to 'docs')
-rw-r--r-- | docs/index.rst | 19 |
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 | |||
56 | the constructor, "throw", "wait" and "pace", "wait" being the default. | 56 | the constructor, "throw", "wait" and "pace", "wait" being the default. |
57 | 57 | ||
58 | In "throw" mode, Mastodon.py makes no attempt to stick to rate limits. When | 58 | In "throw" mode, Mastodon.py makes no attempt to stick to rate limits. When |
59 | a request hits the rate limit, it simply throws a MastodonRateLimitError. This is | 59 | a request hits the rate limit, it simply throws a `MastodonRateLimitError`. This is |
60 | for applications that need to handle all rate limiting themselves (i.e. interactive apps), | 60 | for applications that need to handle all rate limiting themselves (i.e. interactive apps), |
61 | or applications wanting to use Mastodon.py in a multi-threaded context ("wait" and "pace" | 61 | or applications wanting to use Mastodon.py in a multi-threaded context ("wait" and "pace" |
62 | modes are not thread safe). | 62 | modes 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 |
149 | again after a while (see the rate limiting section above). | 149 | again 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 | |||
151 | Return values | 153 | Return values |
152 | ------------- | 154 | ------------- |
153 | Unless otherwise specified, all data is returned as python dictionaries, matching | 155 | Unless otherwise specified, all data is returned as python dictionaries, matching |
@@ -451,13 +453,14 @@ Versioning | |||
451 | ---------- | 453 | ---------- |
452 | Mastodon.py will check if a certain endpoint is available before doing API | 454 | Mastodon.py will check if a certain endpoint is available before doing API |
453 | calls. By default, it checks against the version of Mastodon retrieved on | 455 | calls. By default, it checks against the version of Mastodon retrieved on |
454 | init(), or the version you specified. With these functions, you can make | 456 | init(), or the version you specified. Mastodon.py can be set (in the |
455 | Mastodon.py re-check the server version or explicitly determine if a | 457 | constructor) to either check if an endpoint is available at all or to check |
456 | specific minimum Version is available. | 458 | if 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. | |
458 | Note that the automatic version checks check for the version in which the | 460 | If a version check fails, Mastodon.py throws a `MastodonVersionError`. |
459 | endpoint was first added, not the version in which it was last changed. The | 461 | |
460 | latter check may be added to Mastodon.py at a later date. | 462 | With the following functions, you can make Mastodon.py re-check the server |
463 | version 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 |