diff --git a/specs/lichess-api.yaml b/specs/lichess-api.yaml index 55073dd..85fddf1 100644 --- a/specs/lichess-api.yaml +++ b/specs/lichess-api.yaml @@ -1,6 +1,6 @@ openapi: "3.1.0" info: - version: 2.0.138 + version: 2.0.139 title: Lichess.org API reference contact: name: "Lichess.org API" diff --git a/specs/tags/broadcasts/api-broadcasts-official.yaml b/specs/tags/broadcasts/api-broadcasts-official.yaml index f6f3567..2511477 100644 --- a/specs/tags/broadcasts/api-broadcasts-official.yaml +++ b/specs/tags/broadcasts/api-broadcasts-official.yaml @@ -2,7 +2,7 @@ get: operationId: broadcastsOfficial summary: Get official broadcasts description: | - Returns ongoing official broadcasts sorted by tier. + Returns active (a round is scheduled or ongoing) official broadcasts sorted by tier. After that, returns finished broadcasts sorted by most recent sync time. Broadcasts are streamed as [ndjson](#description/streaming-with-nd-json). tags: @@ -23,6 +23,13 @@ get: schema: type: boolean example: true + - in: query + name: live + description: "[Filter] only broadcasts where a round is ongoing, i.e. started + and not finished" + schema: + type: boolean + example: true responses: "200": description: The list of official broadcasts. diff --git a/src/client/index.ts b/src/client/index.ts index cb6b6ee..2549276 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -2010,7 +2010,11 @@ export class Lichess { /** * Get official broadcasts */ - async broadcastsOfficial(params: { nb?: number; html?: boolean }) { + async broadcastsOfficial(params: { + nb?: number; + html?: boolean; + live?: boolean; + }) { const path = "/api/broadcast" as const; return await this.requestor.get( { path, query: params },