aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhalcy <halcy@ARARAGI-KUN>2022-11-19 01:29:14 +0200
committerhalcy <halcy@ARARAGI-KUN>2022-11-19 01:29:14 +0200
commitd992b9bb8c687c4ae6bff545edd303c6b58d4124 (patch)
tree1c3730c0900bc13a99ffdf0e573d9ae91c7fe5bc /mastodon
parentf2282790cc7e980bba96cdadde2ab8b6af3e6095 (diff)
downloadmastodon.py-d992b9bb8c687c4ae6bff545edd303c6b58d4124.tar.gz
Add account lookup API
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 629a4b2..6e5bc29 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -1261,6 +1261,19 @@ class Mastodon:
1261 url = '/api/v1/accounts/{0}/lists'.format(str(id)) 1261 url = '/api/v1/accounts/{0}/lists'.format(str(id))
1262 return self.__api_request('GET', url, params) 1262 return self.__api_request('GET', url, params)
1263 1263
1264 @api_version("3.4.0", "3.4.0", __DICT_VERSION_ACCOUNT)
1265 def account_lookup(self, acct):
1266 """
1267 Look up an account from user@instance form (@instance allowed but not required for
1268 local accounts). Will only return accounts that the instance already knows about,
1269 and not do any webfinger requests. Use `account_search` if you need to resolve users
1270 through webfinger from remote.
1271
1272 Returns an `account dict`_.
1273 """
1274 return self.__api_request('GET', '/api/v1/accounts/lookup', self.__generate_params(locals()))
1275
1276
1264 ### 1277 ###
1265 # Reading data: Featured hashtags 1278 # Reading data: Featured hashtags
1266 ### 1279 ###
Powered by cgit v1.2.3 (git 2.41.0)