Skip to content

Commit

Permalink
solved request error as mentioned in API Error parsing is broken (as …
Browse files Browse the repository at this point in the history
…is specifying translatedLanguage) #30
  • Loading branch information
EMACC99 committed May 12, 2023
1 parent 9a20fa6 commit 89a2bc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mangadex/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __parse_manga_params(params: dict) -> dict:
params["artists[]"] = temp
if "translatedLanguage" in params:
temp = params.pop("translatedLanguage")
params["translatedLanguage[]"] = temp
params["availableTranslatedLanguage[]"] = temp
if "status" in params:
params["status[]"] = params.pop("status")
if "contentRating" in params:
Expand Down
4 changes: 3 additions & 1 deletion test/test_unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def test_SerachMangaWithLotOfArgs(self):
includedTagsMode="AND",
)

def test_GetTranslatedManga(self):
self.api.get_manga_list(translatedLanguage=["en"], limit=1)[0]

def test_GetMangaFeed(self):
resp = self.api.get_manga_list(title="iris zero", limit=1)[0]
self.api.manga_feed(resp.manga_id)
Expand Down Expand Up @@ -95,7 +98,6 @@ def test_FetchChapterImages(self):
resp.fetch_chapter_images()

def test_GetAuthor(self):

author_id = "df765fdc-ea9f-45d0-9191-d95615662d49"

resp = self.api.get_author_by_id(author_id=author_id)
Expand Down

0 comments on commit 89a2bc9

Please sign in to comment.