diff options
author | Aljoscha Rittner <[email protected]> | 2022-06-28 13:27:40 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-06-28 13:27:40 +0200 |
commit | 7f234664f7c03126c31b9bb8d028727ca3c808c5 (patch) | |
tree | 4efcdc053937ab2a236db1af27d38f1bdd198f1d /mastodon | |
parent | bd04a0f886305c8db438644d712517621c53a49e (diff) | |
parent | 61e1a8e4508c95eaede19560a4479b2357ae2594 (diff) | |
download | mastodon.py-7f234664f7c03126c31b9bb8d028727ca3c808c5.tar.gz |
Merge pull request #241 from arittner/pr230
Support tagged, exclude_reblogs parameter on account_statuses and includes PR 230
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 1645225..d37d437 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -1062,8 +1062,8 @@ class Mastodon: | |||
1062 | """ | 1062 | """ |
1063 | return self.account_verify_credentials() | 1063 | return self.account_verify_credentials() |
1064 | 1064 | ||
1065 | @api_version("1.0.0", "2.7.0", __DICT_VERSION_STATUS) | 1065 | @api_version("1.0.0", "2.8.0", __DICT_VERSION_STATUS) |
1066 | def account_statuses(self, id, only_media=False, pinned=False, exclude_replies=False, max_id=None, min_id=None, since_id=None, limit=None): | 1066 | def account_statuses(self, id, only_media=False, pinned=False, exclude_replies=False, exclude_reblogs=False, tagged=None, max_id=None, min_id=None, since_id=None, limit=None): |
1067 | """ | 1067 | """ |
1068 | Fetch statuses by user `id`. Same options as `timeline()`_ are permitted. | 1068 | Fetch statuses by user `id`. Same options as `timeline()`_ are permitted. |
1069 | Returned toots are from the perspective of the logged-in user, i.e. | 1069 | Returned toots are from the perspective of the logged-in user, i.e. |
@@ -1074,6 +1074,8 @@ class Mastodon: | |||
1074 | If `pinned` is set, return only statuses that have been pinned. Note that | 1074 | If `pinned` is set, return only statuses that have been pinned. Note that |
1075 | as of Mastodon 2.1.0, this only works properly for instance-local users. | 1075 | as of Mastodon 2.1.0, this only works properly for instance-local users. |
1076 | If `exclude_replies` is set, filter out all statuses that are replies. | 1076 | If `exclude_replies` is set, filter out all statuses that are replies. |
1077 | If `exclude_reblogs` is set, filter out all statuses that are reblogs. | ||
1078 | If `tagged` is set, return only statuses that are tagged with `tagged`. Only a single tag without a '#' is valid. | ||
1077 | 1079 | ||
1078 | Does not require authentication for Mastodon versions after 2.7.0 (returns | 1080 | Does not require authentication for Mastodon versions after 2.7.0 (returns |
1079 | publicly visible statuses in that case), for publicly visible accounts. | 1081 | publicly visible statuses in that case), for publicly visible accounts. |
@@ -1097,7 +1099,9 @@ class Mastodon: | |||
1097 | del params["only_media"] | 1099 | del params["only_media"] |
1098 | if exclude_replies == False: | 1100 | if exclude_replies == False: |
1099 | del params["exclude_replies"] | 1101 | del params["exclude_replies"] |
1100 | 1102 | if exclude_reblogs == False: | |
1103 | del params["exclude_reblogs"] | ||
1104 | |||
1101 | url = '/api/v1/accounts/{0}/statuses'.format(str(id)) | 1105 | url = '/api/v1/accounts/{0}/statuses'.format(str(id)) |
1102 | return self.__api_request('GET', url, params) | 1106 | return self.__api_request('GET', url, params) |
1103 | 1107 | ||