From 750527416f4607b38415fa405e85876578dda05e Mon Sep 17 00:00:00 2001 From: halcy Date: Sun, 13 Nov 2022 14:22:43 +0200 Subject: Add account notes --- mastodon/Mastodon.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'mastodon') diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index ff542ef..7d881a0 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -215,7 +215,7 @@ class Mastodon: __DICT_VERSION_INSTANCE = bigger_version("3.1.4", __DICT_VERSION_ACCOUNT) __DICT_VERSION_HASHTAG = "2.3.4" __DICT_VERSION_EMOJI = "3.0.0" - __DICT_VERSION_RELATIONSHIP = "2.5.0" + __DICT_VERSION_RELATIONSHIP = "3.2.0" __DICT_VERSION_NOTIFICATION = bigger_version(bigger_version("1.0.0", __DICT_VERSION_ACCOUNT), __DICT_VERSION_STATUS) __DICT_VERSION_CONTEXT = bigger_version("1.0.0", __DICT_VERSION_STATUS) __DICT_VERSION_LIST = "2.1.0" @@ -2260,6 +2260,16 @@ class Mastodon: url = '/api/v1/accounts/{0}/unpin'.format(str(id)) return self.__api_request('POST', url) + def account_note_set(self, id, comment): + """ + Set a note (visible to the logged in user only) for the given account. + + returns a `status dict`_ with the `note` updated. + """ + id = self.__unpack_id(id) + params = self.__generate_params(locals(), ["id"]) + return self.__api_request('POST', '/api/v1/accounts/{0}/note'.format(str(id)), params) + ### # Writing data: Featured hashtags ### -- cgit v1.2.3