diff options
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 4462253..14cf174 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -774,8 +774,7 @@ class Mastodon: | |||
774 | """ | 774 | """ |
775 | Basic health check. Returns True if healthy, False if not. | 775 | Basic health check. Returns True if healthy, False if not. |
776 | """ | 776 | """ |
777 | status = self.__api_request( | 777 | status = self.__api_request('GET', '/health', parse=False).decode("utf-8") |
778 | 'GET', '/health', parse=False).decode("utf-8") | ||
779 | return status in ["OK", "success"] | 778 | return status in ["OK", "success"] |
780 | 779 | ||
781 | @api_version("3.0.0", "3.0.0", "3.0.0") | 780 | @api_version("3.0.0", "3.0.0", "3.0.0") |
@@ -807,6 +806,15 @@ class Mastodon: | |||
807 | parse = urlparse(schema_url) | 806 | parse = urlparse(schema_url) |
808 | return self.__api_request('GET', parse.path + parse.params + parse.query + parse.fragment) | 807 | return self.__api_request('GET', parse.path + parse.params + parse.query + parse.fragment) |
809 | 808 | ||
809 | @api_version("3.4.0", "3.4.0", __DICT_VERSION_INSTANCE) | ||
810 | def instance_rules(self): | ||
811 | """ | ||
812 | Retrieve instance rules. | ||
813 | |||
814 | Returns a list of `id` + `text` dicts, same as the `rules` field in the `instance dicts`_. | ||
815 | """ | ||
816 | return self.__api_request('GET', '/api/v1/instance/rules') | ||
817 | |||
810 | ### | 818 | ### |
811 | # Reading data: Timelines | 819 | # Reading data: Timelines |
812 | ## | 820 | ## |