[tumblr] fix 401 Unauthorized for likes when using api-key (#5994)
fixes regression introduced in 540eaa5a
This commit is contained in:
@@ -400,6 +400,9 @@ class TumblrAPI(oauth.OAuth1API):
|
||||
"""Retrieve liked posts"""
|
||||
endpoint = "/v2/blog/{}/likes".format(blog)
|
||||
params = {"limit": "50", "before": self.before}
|
||||
if self.api_key:
|
||||
params["api_key"] = self.api_key
|
||||
|
||||
while True:
|
||||
posts = self._call(endpoint, params)["liked_posts"]
|
||||
if not posts:
|
||||
|
||||
Reference in New Issue
Block a user