Skip to content

Commit b0fc7de

Browse files
Update API version
1 parent 79a4d22 commit b0fc7de

3 files changed

Lines changed: 66 additions & 2 deletions

File tree

doc/specs/lichess-api.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
openapi: "3.1.0"
22
info:
3-
version: 2.0.147
3+
version: 2.0.148
44
title: Lichess.org API reference
55
contact:
66
name: "Lichess.org API"

types/lichess-api.d.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1959,6 +1959,31 @@ export interface paths {
19591959
patch?: never;
19601960
trace?: never;
19611961
};
1962+
"/api/stream/broadcast/group/{broadcastGroupId}.pgn": {
1963+
parameters: {
1964+
query?: never;
1965+
header?: never;
1966+
path?: never;
1967+
cookie?: never;
1968+
};
1969+
/**
1970+
* Stream ongoing broadcast rounds of a group as PGN
1971+
* @description For a given broadcast group ([example](https://lichess.org/broadcast/fide-world-cadets-cup-2026/albQx5zq)),
1972+
* selects all the ongoing and recently finished rounds, and sends all games of these rounds in PGN format.
1973+
* Then, it waits for new moves to be played. As soon as it happens, the entire PGN of the game is sent to the stream.
1974+
* The stream will also send PGNs when games are added to the rounds.
1975+
* This is the best way to get updates about an ongoing broadcast with multiple concurrent rounds.
1976+
* To stream a single round, use [this endpoint instead](#tag/broadcasts/GET/api/stream/broadcast/round/{broadcastRoundId}.pgn).
1977+
*/
1978+
get: operations["broadcastStreamRoundPgn"];
1979+
put?: never;
1980+
post?: never;
1981+
delete?: never;
1982+
options?: never;
1983+
head?: never;
1984+
patch?: never;
1985+
trace?: never;
1986+
};
19621987
"/api/broadcast/round/{broadcastRoundId}.pgn": {
19631988
parameters: {
19641989
query?: never;
@@ -11943,6 +11968,45 @@ export interface operations {
1194311968
};
1194411969
};
1194511970
};
11971+
broadcastStreamRoundPgn: {
11972+
parameters: {
11973+
query?: {
11974+
/**
11975+
* @description Include clock comments in the PGN moves, when available.
11976+
* Example: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`
11977+
*/
11978+
clocks?: boolean;
11979+
/**
11980+
* @description Include analysis comments in the PGN moves, when available.
11981+
* Example: `12. Bxf6 { [%eval 0.23] }`
11982+
*/
11983+
comments?: boolean;
11984+
};
11985+
header?: never;
11986+
path: {
11987+
/**
11988+
* @description The broadcast group ID. It's the last past of the group URL, which can be found on the broadcast page overview section.
11989+
* [Example](https://lichess.org/broadcast/fide-world-cadets-cup-2026-o12/round-9/FUQFT39K) the group URL is
11990+
* https://lichess.org/broadcast/fide-world-cadets-cup-2026/albQx5zq and therefore the group ID is `albQx5zq`.
11991+
*/
11992+
broadcastGroupId: string;
11993+
};
11994+
cookie?: never;
11995+
};
11996+
requestBody?: never;
11997+
responses: {
11998+
/** @description The PGN representation of the rounds games, then the PGNs of games as they are updated. */
11999+
200: {
12000+
headers: {
12001+
"Access-Control-Allow-Origin"?: string;
12002+
[name: string]: unknown;
12003+
};
12004+
content: {
12005+
"application/x-chess-pgn": components["schemas"]["StudyPgn"];
12006+
};
12007+
};
12008+
};
12009+
};
1194612010
broadcastRoundPgn: {
1194712011
parameters: {
1194812012
query?: {

types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lichess-org/types",
3-
"version": "2.0.147",
3+
"version": "2.0.148",
44
"description": "Lichess.org API types",
55
"homepage": "https://github.com/lichess-org/api",
66
"license": "AGPL-3.0-or-later",

0 commit comments

Comments
 (0)