From 55f88b34ecba8a8d2a9d94a760db02a5a439be4f Mon Sep 17 00:00:00 2001 From: Looki2000 <89589699+Looki2000@users.noreply.github.com> Date: Fri, 28 Feb 2025 16:11:25 +0100 Subject: [PATCH 1/3] update old, not working URL in push_pgn_update --- berserk/clients/broadcasts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/berserk/clients/broadcasts.py b/berserk/clients/broadcasts.py index 8f0143d..5523e21 100644 --- a/berserk/clients/broadcasts.py +++ b/berserk/clients/broadcasts.py @@ -115,7 +115,7 @@ def push_pgn_update(self, broadcast_round_id: str, pgn_games: List[str]) -> None :param broadcast_round_id: ID of a broadcast round :param pgn_games: one or more games in PGN format """ - path = f"/broadcast/round/{broadcast_round_id}/push" + path = f"/api/broadcast/round/{broadcast_round_id}/push" games = "\n\n".join(g.strip() for g in pgn_games) self._r.post(path, data=games) From 7e397457a299eb0a3ce1f41f34d447b04d6f83b3 Mon Sep 17 00:00:00 2001 From: Looki2000 <89589699+Looki2000@users.noreply.github.com> Date: Fri, 28 Feb 2025 16:16:04 +0100 Subject: [PATCH 2/3] replace old, not working "finished" with "status" in update_round --- berserk/clients/broadcasts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/berserk/clients/broadcasts.py b/berserk/clients/broadcasts.py index 5523e21..e57e171 100644 --- a/berserk/clients/broadcasts.py +++ b/berserk/clients/broadcasts.py @@ -171,8 +171,8 @@ def update_round( syncUrlRound: str | None = None, startsAt: int | None = None, delay: int | None = None, + status: str | None = None, period: int | None = None, - finished: bool | None = None, ) -> Dict[str, Any]: """Update information about a broadcast round that you created. @@ -182,8 +182,8 @@ def update_round( :param syncUrlRound: required if syncUrl contains a LiveChessCloud link :param startsAt: Timestamp in milliseconds of broadcast round start :param delay: how long to delay moves coming from the source in seconds + :param status: manual broadcast round status "new", "started" or "finished" :param period: how long to wait between source requests in seconds - :param finished: set whether the round is completed :return: updated broadcast information """ path = f"/broadcast/round/{broadcast_id}/edit" @@ -193,8 +193,8 @@ def update_round( "syncUrlRound": syncUrlRound, "startsAt": startsAt, "delay": delay, + "status": status, "period": period, - "finished": finished, } return self._r.post(path, json=payload, converter=models.Broadcast.convert) From 48daa395c0ba42a0dab6eacbb3520692d1f69fd7 Mon Sep 17 00:00:00 2001 From: Looki2000 <89589699+Looki2000@users.noreply.github.com> Date: Fri, 28 Feb 2025 16:39:50 +0100 Subject: [PATCH 3/3] update changelog --- CHANGELOG.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b5b2936..534cb08 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,8 +8,10 @@ To be released * Added ``sheet`` optional parameter to ``Tournaments.stream_results``, and fix returned typed dict. * Added ``studies.import_pgn`` to import PGN to study * Added ``tv.stream_current_game_of_channel`` to stream the current TV game of a channel +* Fixed ``client.broadcasts.push_pgn_update`` endpoint URL. +* Updated ``finished`` patameter to ``status`` in ``client.broadcasts.update_round``. -Thanks to @nicvagn, @tors42, @fitztrev and @trevorbayless for their contributions to this release. +Thanks to @nicvagn, @tors42, @fitztrev, @trevorbayless and @Looki2000 for their contributions to this release. v0.13.2 (2023-12-04) --------------------