From 5ae6db86894568e43098289ce3d217b73fa7f943 Mon Sep 17 00:00:00 2001 From: Daniel Schwarz Date: Thu, 2 Feb 2023 20:37:12 -0500 Subject: [PATCH] Added 'whois' API method to retrieve account by ID More reliable and faster than retrieving by account name tbd: is "whois" the right name for this method? --- toot/api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/toot/api.py b/toot/api.py index 1140955..baa4c28 100644 --- a/toot/api.py +++ b/toot/api.py @@ -357,6 +357,10 @@ def followed_tags(app, user): return _get_response_list(app, user, path) +def whois(app, user, account): + return http.get(app, user, f'/api/v1/accounts/{account}').json() + + def mute(app, user, account): return _account_action(app, user, account, 'mute')