From 085d5860e897230fb7ba3b1847e43e576c74a792 Mon Sep 17 00:00:00 2001 From: Harmon Date: Tue, 27 Apr 2021 09:50:20 -0500 Subject: [PATCH] Improve clarity of Client.like --- tweepy/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tweepy/client.py b/tweepy/client.py index e8f2456..6c338f2 100644 --- a/tweepy/client.py +++ b/tweepy/client.py @@ -264,9 +264,10 @@ class Client: https://developer.twitter.com/en/docs/twitter-api/tweets/likes/api-reference/post-users-user_id-likes """ id = self.access_token.partition('-')[0] + route = f"/2/users/{id}/likes" + return self._make_request( - "POST", f"/2/users/{id}/likes", json={"tweet_id": str(tweet_id)}, - user_auth=True + "POST", route, json={"tweet_id": str(tweet_id)}, user_auth=True )[0]["liked"] # Search Tweets -- 2.25.1