Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion specs/lichess-api.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
9 changes: 8 additions & 1 deletion specs/tags/broadcasts/api-broadcasts-official.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down