diff --git a/berserk/clients/studies.py b/berserk/clients/studies.py index 305ecde..d92cec4 100644 --- a/berserk/clients/studies.py +++ b/berserk/clients/studies.py @@ -23,6 +23,13 @@ def export_chapter( ) -> str: """Export one chapter of a study. + :param study_id: study id + :param chapter_id: chapter id + :param clocks: include any clock comments in the PGN moves + :param comments: include any analysis and annotator comments in the PGN moves + :param variations: include any variations in the PGN moves + :param source: include a `Source` PGN tag containing the chapter URL + :param orientation: include an `Orientation` PGN tag containing the chapter's board orientation :return: chapter PGN """ path = f"/api/study/{study_id}/{chapter_id}.pgn" @@ -46,7 +53,13 @@ def export( ) -> Iterator[str]: """Export all chapters of a study. - :return: iterator over all chapters as PGN + :param study_id: study id + :param clocks: include any clock comments in the PGN moves + :param comments: include any analysis and annotator comments in the PGN moves + :param variations: include any variations in the PGN moves + :param source: for each chapter, include a `Source` PGN tag containing the chapter URL + :param orientation: for each chapter, include an `Orientation` PGN tag containing the chapter's board orientation + :return: iterator over all chapters as PGNs """ path = f"/api/study/{study_id}.pgn" params = { @@ -73,7 +86,14 @@ def export_by_username( If not, only public (non-unlisted) studies are included. - return:iterator over all chapters as PGN""" + :param username: the user whose studies will be exported + :param clocks: include any clock comments in the PGN moves + :param comments: include any analysis and annotator comments in the PGN moves + :param variations: include any variations in the PGN moves + :param source: for each chapter, include a `Source` PGN tag containing the chapter URL + :param orientation: for each chapter, include an `Orientation` PGN tag containing the chapter's board orientation + :return: iterator over all chapters as PGNs + """ path = f"/study/by/{username}/export.pgn" params = { "clocks": clocks, @@ -92,7 +112,7 @@ def import_pgn( orientation: Color = "white", variant: Variant = "standard", ) -> List[ChapterIdName]: - """Imports arbitrary PGN into an existing study. + """Imports an arbitrary PGN into an existing study. Creates a new chapter in the study. If the PGN contains multiple games (separated by 2 or more newlines) then multiple chapters will be created within the study.