Skip to content

Commit

Permalink
Fix: add passing viewed parameter (upbit#247)
Browse files Browse the repository at this point in the history
Updated methods `illust_related()`, `illust_recommended()` in
`AppPixivAPI` class. Both of them have had `viewed` parameter in their
signatures but the parameter was unused.
  • Loading branch information
nautics889 committed Mar 17, 2023
1 parent 7b20c3b commit 419ea8e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pixivpy3/aapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ def illust_related(
params["seed_illust_ids[]"] = [seed_illust_ids]
elif isinstance(seed_illust_ids, list):
params["seed_illust_ids[]"] = seed_illust_ids
if isinstance(viewed, list):
params["viewed[]"] = viewed
r = self.no_auth_requests_call("GET", url, params=params, req_auth=req_auth)
return self.parse_result(r)

Expand Down Expand Up @@ -315,6 +317,8 @@ def illust_recommended(
params["include_ranking_illusts"] = self.format_bool(
include_ranking_illusts
)
if isinstance(viewed, list):
params["viewed[]"] = viewed

if not req_auth:
if isinstance(bookmark_illust_ids, str):
Expand Down

0 comments on commit 419ea8e

Please sign in to comment.