From 95473fcd6edef17e62b61ae52a9aaef4ba2a8729 Mon Sep 17 00:00:00 2001 From: Daniel Schwarz Date: Fri, 3 Feb 2023 21:28:18 -0500 Subject: [PATCH] Add get_relationship method to api --- toot/api.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/toot/api.py b/toot/api.py index 564746f..a608609 100644 --- a/toot/api.py +++ b/toot/api.py @@ -369,6 +369,11 @@ def vote(app, user, poll_id, choices: List[int]): return http.post(app, user, url, json=json).json() +def get_relationship(app, user, account): + params = {"id[]": account} + return http.get(app, user, '/api/v1/accounts/relationships', params).json()[0] + + def mute(app, user, account): return _account_action(app, user, account, 'mute')