Skip to content

Commit

Permalink
Merge pull request #9 from trevorbayless/multi_game_export
Browse files Browse the repository at this point in the history
Update endpoint paths to use api/ prefix
  • Loading branch information
kraktus authored May 12, 2023
2 parents e2336c6 + b497c07 commit 91a0e36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions berserk/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def export_multi(
:param opening: whether to include the opening name
:return: iterator over the exported games, as JSON or PGN
"""
path = "games/export/_ids"
path = "api/games/export/_ids"
params = {
"moves": moves,
"tags": tags,
Expand Down Expand Up @@ -1606,15 +1606,15 @@ def export_chapter(self, study_id: str, chapter_id: str) -> str:
:return: chapter PGN
"""
path = f"/study/{study_id}/{chapter_id}.pgn"
path = f"api/study/{study_id}/{chapter_id}.pgn"
return self._r.get(path, fmt=PGN)

def export(self, study_id: str) -> Iterator[str]:
"""Export all chapters of a study.
:return: iterator over all chapters as PGN
"""
path = f"/study/{study_id}.pgn"
path = f"api/study/{study_id}.pgn"
return self._r.get(path, fmt=PGN, stream=True)


Expand Down

0 comments on commit 91a0e36

Please sign in to comment.