diff options
author | halcy <halcy@ARARAGI-KUN> | 2022-11-13 14:22:43 +0200 |
---|---|---|
committer | halcy <halcy@ARARAGI-KUN> | 2022-11-13 14:22:43 +0200 |
commit | 750527416f4607b38415fa405e85876578dda05e (patch) | |
tree | 0ddabb48d125b56a1b17f9a76dbdc652216a9b8b /mastodon | |
parent | adcddefd59de91b6a2ca981c9bd923551ac38694 (diff) | |
download | mastodon.py-750527416f4607b38415fa405e85876578dda05e.tar.gz |
Add account notes
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 12 |
1 files changed, 11 insertions, 1 deletions
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: | |||
215 | __DICT_VERSION_INSTANCE = bigger_version("3.1.4", __DICT_VERSION_ACCOUNT) | 215 | __DICT_VERSION_INSTANCE = bigger_version("3.1.4", __DICT_VERSION_ACCOUNT) |
216 | __DICT_VERSION_HASHTAG = "2.3.4" | 216 | __DICT_VERSION_HASHTAG = "2.3.4" |
217 | __DICT_VERSION_EMOJI = "3.0.0" | 217 | __DICT_VERSION_EMOJI = "3.0.0" |
218 | __DICT_VERSION_RELATIONSHIP = "2.5.0" | 218 | __DICT_VERSION_RELATIONSHIP = "3.2.0" |
219 | __DICT_VERSION_NOTIFICATION = bigger_version(bigger_version("1.0.0", __DICT_VERSION_ACCOUNT), __DICT_VERSION_STATUS) | 219 | __DICT_VERSION_NOTIFICATION = bigger_version(bigger_version("1.0.0", __DICT_VERSION_ACCOUNT), __DICT_VERSION_STATUS) |
220 | __DICT_VERSION_CONTEXT = bigger_version("1.0.0", __DICT_VERSION_STATUS) | 220 | __DICT_VERSION_CONTEXT = bigger_version("1.0.0", __DICT_VERSION_STATUS) |
221 | __DICT_VERSION_LIST = "2.1.0" | 221 | __DICT_VERSION_LIST = "2.1.0" |
@@ -2260,6 +2260,16 @@ class Mastodon: | |||
2260 | url = '/api/v1/accounts/{0}/unpin'.format(str(id)) | 2260 | url = '/api/v1/accounts/{0}/unpin'.format(str(id)) |
2261 | return self.__api_request('POST', url) | 2261 | return self.__api_request('POST', url) |
2262 | 2262 | ||
2263 | def account_note_set(self, id, comment): | ||
2264 | """ | ||
2265 | Set a note (visible to the logged in user only) for the given account. | ||
2266 | |||
2267 | returns a `status dict`_ with the `note` updated. | ||
2268 | """ | ||
2269 | id = self.__unpack_id(id) | ||
2270 | params = self.__generate_params(locals(), ["id"]) | ||
2271 | return self.__api_request('POST', '/api/v1/accounts/{0}/note'.format(str(id)), params) | ||
2272 | |||
2263 | ### | 2273 | ### |
2264 | # Writing data: Featured hashtags | 2274 | # Writing data: Featured hashtags |
2265 | ### | 2275 | ### |