merge #5516: [mastodon] send canonical 'true'/'false' boolean values

instead of '1'/'0' to be compatible with Mitra instances or others that
do not fully implement Mastodon's boolean value semantics.
This commit is contained in:
Mike Fährmann
2024-04-27 01:34:56 +02:00

View File

@@ -227,8 +227,8 @@ class MastodonAPI():
exclude_replies=False): exclude_replies=False):
"""Fetch an account's statuses""" """Fetch an account's statuses"""
endpoint = "/v1/accounts/{}/statuses".format(account_id) endpoint = "/v1/accounts/{}/statuses".format(account_id)
params = {"only_media" : "1" if only_media else "0", params = {"only_media" : "true" if only_media else "false",
"exclude_replies": "1" if exclude_replies else "0"} "exclude_replies": "true" if exclude_replies else "false"}
return self._pagination(endpoint, params) return self._pagination(endpoint, params)
def status(self, status_id): def status(self, status_id):