From e006b442cb25dba1ea693f67bd442cc56fc806c7 Mon Sep 17 00:00:00 2001 From: Trevor Fitzgerald Date: Sun, 2 Jun 2024 13:54:10 -0400 Subject: [PATCH] Update broadcast schemas (#346) --- doc/specs/lichess-api.yaml | 5 +- doc/specs/schemas/BroadcastForm.yaml | 1 - doc/specs/schemas/BroadcastMyRound.yaml | 33 +- doc/specs/schemas/BroadcastRound.yaml | 3 +- doc/specs/schemas/BroadcastRoundInfo.yaml | 1 + doc/specs/schemas/BroadcastRoundNew.yaml | 36 ++ .../schemas/BroadcastRoundTournamentInfo.yaml | 26 - doc/specs/schemas/BroadcastTour.yaml | 68 +-- doc/specs/schemas/BroadcastWithRounds.yaml | 9 + doc/specs/tags/broadcasts/api-broadcast.yaml | 32 -- .../broadcasts/api-broadcasts-by-user.yaml | 454 ++++++++++++++++++ .../broadcasts/api-broadcasts-official.yaml | 141 ++++++ .../broadcast-broadcastTournamentId-new.yaml | 2 +- .../broadcast-broadcastTournamentId.yaml | 2 +- doc/specs/tags/broadcasts/broadcast-new.yaml | 14 +- 15 files changed, 712 insertions(+), 115 deletions(-) create mode 100644 doc/specs/schemas/BroadcastRoundNew.yaml delete mode 100644 doc/specs/schemas/BroadcastRoundTournamentInfo.yaml create mode 100644 doc/specs/schemas/BroadcastWithRounds.yaml delete mode 100644 doc/specs/tags/broadcasts/api-broadcast.yaml create mode 100644 doc/specs/tags/broadcasts/api-broadcasts-by-user.yaml create mode 100644 doc/specs/tags/broadcasts/api-broadcasts-official.yaml diff --git a/doc/specs/lichess-api.yaml b/doc/specs/lichess-api.yaml index 305fb63..26f8676 100644 --- a/doc/specs/lichess-api.yaml +++ b/doc/specs/lichess-api.yaml @@ -435,7 +435,10 @@ paths: $ref: './tags/studies/api-study-studyId-chapterId.yaml' /api/broadcast: - $ref: './tags/broadcasts/api-broadcast.yaml' + $ref: './tags/broadcasts/api-broadcasts-official.yaml' + + /api/broadcast/by/{username}: + $ref: './tags/broadcasts/api-broadcasts-by-user.yaml' /broadcast/new: $ref: './tags/broadcasts/broadcast-new.yaml' diff --git a/doc/specs/schemas/BroadcastForm.yaml b/doc/specs/schemas/BroadcastForm.yaml index 6cc89bd..386b989 100644 --- a/doc/specs/schemas/BroadcastForm.yaml +++ b/doc/specs/schemas/BroadcastForm.yaml @@ -53,4 +53,3 @@ properties: required: - name - description - - autoLeaderboard diff --git a/doc/specs/schemas/BroadcastMyRound.yaml b/doc/specs/schemas/BroadcastMyRound.yaml index e64f58e..e295e84 100644 --- a/doc/specs/schemas/BroadcastMyRound.yaml +++ b/doc/specs/schemas/BroadcastMyRound.yaml @@ -4,7 +4,7 @@ properties: round: $ref: './BroadcastRoundInfo.yaml' tour: - $ref: './BroadcastRoundTournamentInfo.yaml' + $ref: './BroadcastTour.yaml' study: $ref: './BroadcastRoundStudyInfo.yaml' @@ -15,23 +15,20 @@ required: example: { - "round": - { - "id": "0gLwMpx8", - "name": "Round 1", - "slug": "round-1", - "createdAt": 1716048406676, - "startsAt": 1713456000000, - "url": "https://lichess.org/broadcast/moonway-chess-festival/round-1/0gLwMpx8", - "delay": 600, + "round": { + "id": "n8JeQIeY", + "name": "round 1", + "slug": "round-1", + "createdAt": 1717344905926, + "url": "https://lichess.org/broadcast/new-name/round-1/n8JeQIeY" }, - "tour": - { - "id": "noRt7b8A", - "name": "Moonway Chess Festival", - "slug": "moonway-chess-festival", - "description": "April 18th - 28th | 10-round Swiss | Classical time control", - "createdAt": 1716048385395, + "tour": { + "id": "HdRP6fce", + "name": "New Name", + "slug": "new-name", + "description": "test", + "createdAt": 1717342164861, + "url": "https://lichess.org/broadcast/new-name/HdRP6fce" }, - "study": { "writeable": true }, + "study": { "writeable": true } } diff --git a/doc/specs/schemas/BroadcastRound.yaml b/doc/specs/schemas/BroadcastRound.yaml index ec7960c..7cfefbb 100644 --- a/doc/specs/schemas/BroadcastRound.yaml +++ b/doc/specs/schemas/BroadcastRound.yaml @@ -3,7 +3,7 @@ properties: round: $ref: './BroadcastRoundInfo.yaml' tour: - $ref: './BroadcastRoundTournamentInfo.yaml' + $ref: './BroadcastTour.yaml' study: $ref: './BroadcastRoundStudyInfo.yaml' games: @@ -38,6 +38,7 @@ example: "createdAt": 1716014078747, "tier": 5, "image": "https://image.lichess1.org/display?h=400&op=thumbnail&path=loepare:relay:ZuOkdeXK:iq0feQJe.jpg&w=800&sig=36e58a1a648af5b9fe6d3f5725c7a2f52d853153", + "url": "https://lichess.org/broadcast/casablanca-chess-2024/ZuOkdeXK", }, "study": { "writeable": false }, "games": diff --git a/doc/specs/schemas/BroadcastRoundInfo.yaml b/doc/specs/schemas/BroadcastRoundInfo.yaml index 1c64855..84e8883 100644 --- a/doc/specs/schemas/BroadcastRoundInfo.yaml +++ b/doc/specs/schemas/BroadcastRoundInfo.yaml @@ -22,6 +22,7 @@ properties: delay: type: integer format: int64 + required: - id - name diff --git a/doc/specs/schemas/BroadcastRoundNew.yaml b/doc/specs/schemas/BroadcastRoundNew.yaml new file mode 100644 index 0000000..4441c18 --- /dev/null +++ b/doc/specs/schemas/BroadcastRoundNew.yaml @@ -0,0 +1,36 @@ +type: object + +properties: + round: + $ref: './BroadcastRoundInfo.yaml' + tour: + $ref: './BroadcastTour.yaml' + study: + $ref: './BroadcastRoundStudyInfo.yaml' + +required: + - round + - tour + - study + +example: + { + "round": { + "createdAt": 1717344905926, + "id": "n8JeQIeY", + "name": "round 1", + "slug": "round-1", + "url": "https://lichess.org/broadcast/new-name/round-1/n8JeQIeY" + }, + "study": { + "writeable": true + }, + "tour": { + "createdAt": 1717342164861, + "description": "test", + "id": "HdRP6fce", + "name": "New Name", + "slug": "new-name", + "url": "https://lichess.org/broadcast/new-name/HdRP6fce" + } + } diff --git a/doc/specs/schemas/BroadcastRoundTournamentInfo.yaml b/doc/specs/schemas/BroadcastRoundTournamentInfo.yaml deleted file mode 100644 index 13fd55d..0000000 --- a/doc/specs/schemas/BroadcastRoundTournamentInfo.yaml +++ /dev/null @@ -1,26 +0,0 @@ -type: object - -properties: - id: - type: string - name: - type: string - slug: - type: string - description: - type: string - createdAt: - type: integer - format: int64 - tier: - type: integer - image: - description: URL of the tournament image - type: string - -required: - - id - - name - - slug - - description - - createdAt diff --git a/doc/specs/schemas/BroadcastTour.yaml b/doc/specs/schemas/BroadcastTour.yaml index fa8fcfd..e3e3470 100644 --- a/doc/specs/schemas/BroadcastTour.yaml +++ b/doc/specs/schemas/BroadcastTour.yaml @@ -1,33 +1,35 @@ -example: - { - 'tour': - { - 'id': 'QYiOYnl1', - 'name': 'New in Chess Classic | Finals', - 'slug': 'new-in-chess-classic--finals', - 'description': 'Match for 1st 2nd and 3rd place.', - 'url': 'https://lichess.org/broadcast/new-in-chess-classic--finals/phgcXuBl', - 'createdAt': 1525789431889, - }, - 'rounds': - [ - { - 'id': 'yeGGfkfY', - 'name': 'Finals Day 2', - 'slug': 'finals-day-2', - 'url': 'https://lichess.org/broadcast/new-in-chess-classic--finals/finals-day-2/yeGGfkfY', - 'createdAt': 1715858059529, - 'ongoing': true, - 'startsAt': 1716279000000, - }, - { - 'id': 'BueO56UJ', - 'name': 'Finals Day 1', - 'slug': 'finals-day-1', - 'url': 'https://lichess.org/broadcast/new-in-chess-classic--finals/finals-day-1/BueO56UJ', - 'createdAt': 1715858037525, - 'finished': true, - 'startsAt': 1716214200000, - }, - ], - } +type: object + +properties: + id: + type: string + name: + type: string + slug: + type: string + description: + type: string + createdAt: + type: number + tier: + type: number + description: "Used to designate featured tournaments on Lichess" + image: + type: string + markup: + type: string + description: "HTML markup of the tour description" + leaderboard: + type: boolean + teamTable: + type: boolean + url: + type: string + +required: + - id + - name + - slug + - description + - createdAt + - url diff --git a/doc/specs/schemas/BroadcastWithRounds.yaml b/doc/specs/schemas/BroadcastWithRounds.yaml new file mode 100644 index 0000000..aaa4b26 --- /dev/null +++ b/doc/specs/schemas/BroadcastWithRounds.yaml @@ -0,0 +1,9 @@ +type: object + +properties: + tour: + $ref: './BroadcastTour.yaml' + rounds: + type: array + items: + $ref: './BroadcastRoundInfo.yaml' diff --git a/doc/specs/tags/broadcasts/api-broadcast.yaml b/doc/specs/tags/broadcasts/api-broadcast.yaml deleted file mode 100644 index 085e727..0000000 --- a/doc/specs/tags/broadcasts/api-broadcast.yaml +++ /dev/null @@ -1,32 +0,0 @@ -get: - operationId: broadcastIndex - summary: Get official broadcasts - description: | - Get all incoming, ongoing, and finished official broadcasts. - The broadcasts are sorted by start date, most recent first. - Broadcasts are streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON). - tags: - - Broadcasts - security: [] - parameters: - - in: query - name: nb - description: Max number of broadcasts to fetch - schema: - type: integer - default: 20 - minimum: 1 - responses: - '200': - description: The list of official broadcasts. - headers: - Access-Control-Allow-Origin: - schema: - type: string - default: "'*'" - content: - application/x-ndjson: - schema: - type: array - items: - $ref: '../../schemas/BroadcastTour.yaml' diff --git a/doc/specs/tags/broadcasts/api-broadcasts-by-user.yaml b/doc/specs/tags/broadcasts/api-broadcasts-by-user.yaml new file mode 100644 index 0000000..1b86bc7 --- /dev/null +++ b/doc/specs/tags/broadcasts/api-broadcasts-by-user.yaml @@ -0,0 +1,454 @@ +get: + operationId: broadcastsByUser + summary: Get broadcasts created by a user + description: | + Get all incoming, ongoing, and finished official broadcasts. + The broadcasts are sorted by created date, most recent first. + tags: + - Broadcasts + security: [] + parameters: + - in: path + name: username + schema: + type: string + required: true + - in: query + name: page + schema: + type: number + example: 1 + default: 1 + responses: + '200': + description: A paginated list of the broadcasts created by a user. + headers: + Access-Control-Allow-Origin: + schema: + type: string + default: "'*'" + content: + application/json: + schema: + type: object + properties: + currentPage: + type: number + example: 4 + maxPerPage: + type: number + example: 15 + currentPageResults: + type: array + items: + type: object + properties: + tour: + $ref: '../../schemas/BroadcastTour.yaml' + lastRound: + $ref: '../../schemas/BroadcastRoundInfo.yaml' + nbResults: + type: number + example: 205194 + previousPage: + type: [number, 'null'] + example: 3 + nextPage: + type: [number, 'null'] + example: 5 + nbPages: + type: number + example: 13680 + + example: + { + "currentPage": 1, + "currentPageResults": [ + { + "lastRound": { + "createdAt": 1717249588469, + "id": "6YXGF5e1", + "name": "Round 1", + "slug": "round-1", + "startsAt": 1743388986537, + "url": "https://lichess.org/broadcast/torphy-group-invitational/round-1/6YXGF5e1" + }, + "tour": { + "createdAt": 1717249588462, + "description": "Dolor tres abeo caritas cubo tres tero averto causa.", + "id": "fvYXzVY6", + "markup": "

Amicitia censura arma versus adsuesco sunt ver illo. Thymum decens ultio veritatis aequus. Conturbo adfero aegre nam terra amplitudo calco.

\n", + "name": "Torphy Group Invitational", + "slug": "torphy-group-invitational", + "url": "https://lichess.org/broadcast/torphy-group-invitational/fvYXzVY6" + } + }, + { + "lastRound": { + "createdAt": 1717249588444, + "id": "orDz0AFK", + "name": "Round 4", + "slug": "round-4", + "startsAt": 1748230972395, + "url": "https://lichess.org/broadcast/tremblay-jacobson-and-hackett-invitational/round-4/orDz0AFK" + }, + "tour": { + "createdAt": 1717249588411, + "description": "Ut adversus ago auditor degero.", + "id": "hFpLaxpD", + "markup": "

Corona odio cur caelum. Provident ad suffoco atque uterque. Absens tyrannus conservo caveo patruus.

\n", + "name": "Tremblay, Jacobson and Hackett Invitational", + "slug": "tremblay-jacobson-and-hackett-invitational", + "url": "https://lichess.org/broadcast/tremblay-jacobson-and-hackett-invitational/hFpLaxpD" + } + }, + { + "lastRound": { + "createdAt": 1717249588387, + "id": "dIjr8Egv", + "name": "Round 3", + "slug": "round-3", + "startsAt": 1747057627205, + "url": "https://lichess.org/broadcast/schneider-rodriguez-and-spencer-invitational/round-3/dIjr8Egv" + }, + "tour": { + "createdAt": 1717249588360, + "description": "Doloribus ascit arto ab somniculosus tempore minima odio.", + "id": "DXtmymWf", + "markup": "

Decretum admoneo vulticulus commodo curvo.
Cogito calculus cognomen confugo facilis autem.
Occaecati aperiam amor callide timor.

\n", + "name": "Schneider, Rodriguez and Spencer Invitational", + "slug": "schneider-rodriguez-and-spencer-invitational", + "url": "https://lichess.org/broadcast/schneider-rodriguez-and-spencer-invitational/DXtmymWf" + } + }, + { + "lastRound": { + "createdAt": 1717249588325, + "id": "mU0eAY2J", + "name": "Round 2", + "slug": "round-2", + "startsAt": 1745099050618, + "url": "https://lichess.org/broadcast/osinski-schmitt-invitational/round-2/mU0eAY2J" + }, + "tour": { + "createdAt": 1717249588305, + "description": "Auctor degusto quae textor sophismata uxor autus studio supra tamquam.", + "id": "1iADebBs", + "markup": "

Incidunt corrupti congregatio admoveo reiciendis. Exercitationem articulus charisma aegrotatio. Conservo stipes curtus ultra cruciamentum trans.

\n", + "name": "Osinski - Schmitt Invitational", + "slug": "osinski-schmitt-invitational", + "url": "https://lichess.org/broadcast/osinski-schmitt-invitational/1iADebBs" + } + }, + { + "lastRound": { + "createdAt": 1717249588290, + "id": "1sKzcoXR", + "name": "Round 4", + "slug": "round-4", + "startsAt": 1742118641508, + "url": "https://lichess.org/broadcast/deckow-oconner-and-maggio-invitational/round-4/1sKzcoXR" + }, + "tour": { + "createdAt": 1717249588249, + "description": "Confero cometes at succurro avarus ex stabilis derelinquo certe.", + "id": "vk04toRU", + "markup": "

Tristis canto adipisci vita assumenda thermae. Decerno sponte cohaero. Pauper quasi doloremque vomica alii consequuntur degero.

\n", + "name": "Deckow, O'Conner and Maggio Invitational", + "slug": "deckow-oconner-and-maggio-invitational", + "url": "https://lichess.org/broadcast/deckow-oconner-and-maggio-invitational/vk04toRU" + } + }, + { + "lastRound": { + "createdAt": 1717249588227, + "id": "AXgZWVTw", + "name": "Round 3", + "slug": "round-3", + "startsAt": 1745331516995, + "url": "https://lichess.org/broadcast/reinger-breitenberg-and-durgan-invitational/round-3/AXgZWVTw" + }, + "tour": { + "createdAt": 1717249588203, + "description": "Curis accusator nam claro adversus dolores vulnero cetera theologus ars.", + "id": "B0w1miCj", + "markup": "

Tamquam vobis aequus astrum solvo celo decretum cras arcesso aspicio. Somnus veniam sollers. Similique libero cura vomito celebrer quasi.

\n", + "name": "Reinger, Breitenberg and Durgan Invitational", + "slug": "reinger-breitenberg-and-durgan-invitational", + "url": "https://lichess.org/broadcast/reinger-breitenberg-and-durgan-invitational/B0w1miCj" + } + }, + { + "lastRound": { + "createdAt": 1717249588171, + "id": "hKb1OBFk", + "name": "Round 2", + "slug": "round-2", + "startsAt": 1744437837114, + "url": "https://lichess.org/broadcast/schmitt-paucek-and-quitzon-invitational/round-2/hKb1OBFk" + }, + "tour": { + "createdAt": 1717249588157, + "description": "Natus adsum adipiscor video umbra angelus audio.", + "id": "6n1DFnzd", + "markup": "

Aranea textus averto suppono. Conculco patria autem angulus. Eveniet taceo aedificium summopere conculco tristis.
Vomer subvenio tibi tamdiu solitudo anser cogito. Utroque vallum ancilla suggero aiunt bellum carbo. Derideo vulgus paens vesco victus audax.
Amicitia umerus terra. Degero subiungo quibusdam. Trans ubi apparatus cohibeo video eius ater deorsum ea surculus.

\n", + "name": "Schmitt, Paucek and Quitzon Invitational", + "slug": "schmitt-paucek-and-quitzon-invitational", + "url": "https://lichess.org/broadcast/schmitt-paucek-and-quitzon-invitational/6n1DFnzd" + } + }, + { + "lastRound": { + "createdAt": 1717249588150, + "id": "osmUpkLb", + "name": "Round 5", + "slug": "round-5", + "startsAt": 1739567218096, + "url": "https://lichess.org/broadcast/boyle-medhurst-invitational/round-5/osmUpkLb" + }, + "tour": { + "createdAt": 1717249588108, + "description": "Decerno deinde voluptate crebro tabula testimonium.", + "id": "oNqkeaBL", + "markup": "

Ancilla alii terra argentum adulescens acquiro comis pectus truculenter. Vita tempus rerum. Via cunctatio subnecto vel cupiditate tonsor statua abundans curtus tracto.
Cariosus tergum tracto uredo vitiosus aestas uter asper comprehendo. Optio depraedor subvenio repellat ultra omnis desparatus rem summisse veritas. Casso desidero timidus.
Velit cuppedia xiphias. Centum terreo tripudio spargo chirographum. Mollitia absens advenio volup coruscus quas vulnero.

\n", + "name": "Boyle - Medhurst Invitational", + "slug": "boyle-medhurst-invitational", + "url": "https://lichess.org/broadcast/boyle-medhurst-invitational/oNqkeaBL" + } + }, + { + "lastRound": { + "createdAt": 1717249588046, + "id": "lCi6kFSf", + "name": "Round 1", + "slug": "round-1", + "startsAt": 1748507308700, + "url": "https://lichess.org/broadcast/johnson-roberts-and-kris-invitational/round-1/lCi6kFSf" + }, + "tour": { + "createdAt": 1717249588039, + "description": "Conturbo celer conturbo amaritudo magni attero velut necessitatibus.", + "id": "5c1bHVJY", + "leaderboard": true, + "markup": "

Vita sub ago venustas alioqui tenuis bos ademptio. Valens doloribus currus voluptatem. Arca caries summopere aestas.
Bibo tertius deprecator terra supra volutabrum. Commodo vos patior vociferor perspiciatis suadeo arbustum adduco verecundia. Thesaurus umerus arceo sponte tenax eius.
Deduco coniecto arcesso. Cetera adstringo ars apud usque aut calculus nemo textilis. Advoco administratio omnis super autus provident dens.

\n", + "name": "Johnson, Roberts and Kris Invitational", + "slug": "johnson-roberts-and-kris-invitational", + "url": "https://lichess.org/broadcast/johnson-roberts-and-kris-invitational/5c1bHVJY" + } + }, + { + "lastRound": { + "createdAt": 1717249587997, + "id": "kZ8swp05", + "name": "Round 1", + "slug": "round-1", + "startsAt": 1747486148891, + "url": "https://lichess.org/broadcast/mann-murray-invitational/round-1/kZ8swp05" + }, + "tour": { + "createdAt": 1717249587989, + "description": "Tertius admoveo cetera officia.", + "id": "pEXcJ961", + "markup": "

Varietas vere comedo.
Carcer cilicium dens delinquo tutis desino.
Similique celer crudelis ciminatio cupio thymum spargo depulso.
Consuasor aureus bene.

\n", + "name": "Mann - Murray Invitational", + "slug": "mann-murray-invitational", + "url": "https://lichess.org/broadcast/mann-murray-invitational/pEXcJ961" + } + }, + { + "lastRound": { + "createdAt": 1717249587974, + "id": "C4HPF2sH", + "name": "Round 4", + "slug": "round-4", + "startsAt": 1739866037530, + "url": "https://lichess.org/broadcast/hintz-and-sons-invitational/round-4/C4HPF2sH" + }, + "tour": { + "createdAt": 1717249587938, + "description": "Varius desolo delectus versus via totus capillus.", + "id": "MmcRvM8p", + "markup": "

Vicinus approbo tener commodi rerum.

\n", + "name": "Hintz and Sons Invitational", + "slug": "hintz-and-sons-invitational", + "url": "https://lichess.org/broadcast/hintz-and-sons-invitational/MmcRvM8p" + } + }, + { + "lastRound": { + "createdAt": 1717249587912, + "id": "IhjZOhz6", + "name": "Round 3", + "slug": "round-3", + "startsAt": 1746063004594, + "url": "https://lichess.org/broadcast/schroeder-mcglynn-invitational/round-3/IhjZOhz6" + }, + "tour": { + "createdAt": 1717249587888, + "description": "Perspiciatis apto avaritia surculus cena carus tantum teres.", + "id": "HSUhT9Ra", + "markup": "

Tempora villa claudeo.
Terminatio astrum suggero voluptates anser acerbitas absum teres trado.
Correptius voluptas ter fugiat suscipit clamo tamen color aureus cultellus.

\n", + "name": "Schroeder - McGlynn Invitational", + "slug": "schroeder-mcglynn-invitational", + "url": "https://lichess.org/broadcast/schroeder-mcglynn-invitational/HSUhT9Ra" + } + }, + { + "lastRound": { + "createdAt": 1717249587845, + "id": "ARcIOPvd", + "name": "Round 2", + "slug": "round-2", + "startsAt": 1739020538475, + "url": "https://lichess.org/broadcast/klein-will-and-friesen-invitational/round-2/ARcIOPvd" + }, + "tour": { + "createdAt": 1717249587820, + "description": "Delibero concido ex dolore basium maxime statim arbitro.", + "id": "jGVDbKeF", + "markup": "

Quibusdam urbs temptatio usque abbas derideo toties nisi contigo. Conduco tabula facilis. Cura delicate usque sponte avarus curis carmen ago vilicus stillicidium.
Civis aer patruus cum cupiditas torqueo ciminatio ulterius. Magni libero succedo. Apud ipsam illo atrocitas.
Solvo ipsam avarus aegrotatio vesper numquam tardus defluo cena. Circumvenio accommodo damnatio aduro textus tandem adamo corrupti. Corona advoco pax.

\n", + "name": "Klein, Will and Friesen Invitational", + "slug": "klein-will-and-friesen-invitational", + "url": "https://lichess.org/broadcast/klein-will-and-friesen-invitational/jGVDbKeF" + } + }, + { + "lastRound": { + "createdAt": 1717249587778, + "id": "w1Xsv0y0", + "name": "Round 1", + "slug": "round-1", + "startsAt": 1739288061496, + "url": "https://lichess.org/broadcast/schmeler-inc-invitational/round-1/w1Xsv0y0" + }, + "tour": { + "createdAt": 1717249587769, + "description": "Sequi error ocer talis terminatio.", + "id": "PBMMcqlM", + "markup": "

Qui velociter aeger attollo confugo summopere synagoga consectetur coaegresco.
Vitium cras valens dapifer via deorsum.
Cervus amplus currus eaque viridis cunabula aspernatur.

\n", + "name": "Schmeler Inc Invitational", + "slug": "schmeler-inc-invitational", + "url": "https://lichess.org/broadcast/schmeler-inc-invitational/PBMMcqlM" + } + }, + { + "lastRound": { + "createdAt": 1717249587727, + "id": "lp9SfzBM", + "name": "Round 1", + "slug": "round-1", + "startsAt": 1744323809959, + "url": "https://lichess.org/broadcast/langworth-mosciski-invitational/round-1/lp9SfzBM" + }, + "tour": { + "createdAt": 1717249587713, + "description": "Conicio cena ventus dolore quo.", + "id": "SoYixY0L", + "markup": "

Somnus corrigo vulnero despecto depopulo canto convoco sint. Video constans bardus xiphias umerus trepide audeo. Bellicus reiciendis velut laborum inflammatio deludo doloribus creator. Triduana cibo subvenio. Ocer decor magni. Villa commemoro unus maxime denuncio voluptas sollicito uberrime testimonium.

\n", + "name": "Langworth - Mosciski Invitational", + "slug": "langworth-mosciski-invitational", + "url": "https://lichess.org/broadcast/langworth-mosciski-invitational/SoYixY0L" + } + }, + { + "lastRound": { + "createdAt": 1717249587664, + "id": "jHUP0402", + "name": "Round 1", + "slug": "round-1", + "startsAt": 1746827217161, + "url": "https://lichess.org/broadcast/morissette-group-invitational/round-1/jHUP0402" + }, + "tour": { + "createdAt": 1717249587657, + "description": "Maxime debeo ver ubi audacia ars stultus.", + "id": "1AO90Qw6", + "markup": "

Adflicto deporto veniam. Absum verus certus doloremque benigne conservo at pax nobis. Abeo amiculum tondeo contabesco asperiores veritas a absorbeo approbo.

\n", + "name": "Morissette Group Invitational", + "slug": "morissette-group-invitational", + "url": "https://lichess.org/broadcast/morissette-group-invitational/1AO90Qw6" + } + }, + { + "lastRound": { + "createdAt": 1717249587641, + "id": "2TvylXcE", + "name": "Round 4", + "slug": "round-4", + "startsAt": 1748223520772, + "url": "https://lichess.org/broadcast/auer-witting-and-gulgowski-invitational/round-4/2TvylXcE" + }, + "tour": { + "createdAt": 1717249587607, + "description": "Denego adaugeo bos ex tersus ubi.", + "id": "OwZsFgC4", + "markup": "

Capitulus cohaero comburo. Angulus desino cunae vinculum collum.

\n", + "name": "Auer, Witting and Gulgowski Invitational", + "slug": "auer-witting-and-gulgowski-invitational", + "url": "https://lichess.org/broadcast/auer-witting-and-gulgowski-invitational/OwZsFgC4" + } + }, + { + "lastRound": { + "createdAt": 1717249587572, + "id": "lu48KbHl", + "name": "Round 2", + "slug": "round-2", + "startsAt": 1744223346980, + "url": "https://lichess.org/broadcast/prosacco-group-invitational/round-2/lu48KbHl" + }, + "tour": { + "createdAt": 1717249587553, + "description": "Atrocitas alius crapula villa debitis vulgo contra clam.", + "id": "kaxrGnsQ", + "markup": "

Deserunt vociferor velociter abstergo aufero. Aro certe clementia admitto attollo aufero cito. Charisma deduco acervus ad praesentium volup cui cogito vesica advoco. Clementia asperiores artificiose supplanto baiulus. Viriliter tenetur capitulus crustulum mollitia.

\n", + "name": "Prosacco Group Invitational", + "slug": "prosacco-group-invitational", + "url": "https://lichess.org/broadcast/prosacco-group-invitational/kaxrGnsQ" + } + }, + { + "lastRound": { + "createdAt": 1717249587542, + "id": "vPePjvo8", + "name": "Round 5", + "slug": "round-5", + "startsAt": 1748713305442, + "url": "https://lichess.org/broadcast/langworth-west-and-kling-invitational/round-5/vPePjvo8" + }, + "tour": { + "createdAt": 1717249587494, + "description": "Supplanto sono collum rerum.", + "id": "d1m26zEz", + "markup": "

Commemoro victoria ambulo arca voro.

\n", + "name": "Langworth, West and Kling Invitational", + "slug": "langworth-west-and-kling-invitational", + "url": "https://lichess.org/broadcast/langworth-west-and-kling-invitational/d1m26zEz" + } + }, + { + "lastRound": { + "createdAt": 1717249587424, + "id": "JKjDqiEb", + "name": "Round 1", + "slug": "round-1", + "startsAt": 1745920680927, + "url": "https://lichess.org/broadcast/lockman-hauck-and-wunsch-invitational/round-1/JKjDqiEb" + }, + "tour": { + "createdAt": 1717249587417, + "description": "Vivo acervus allatus altus utor alioqui verus verbum.", + "id": "cmsPzocQ", + "markup": "

Xiphias tabula combibo ut.

\n", + "name": "Lockman, Hauck and Wunsch Invitational", + "slug": "lockman-hauck-and-wunsch-invitational", + "url": "https://lichess.org/broadcast/lockman-hauck-and-wunsch-invitational/cmsPzocQ" + } + } + ], + "maxPerPage": 20, + "nbPages": 5, + "nbResults": 100, + "nextPage": 2, + "previousPage": null + } diff --git a/doc/specs/tags/broadcasts/api-broadcasts-official.yaml b/doc/specs/tags/broadcasts/api-broadcasts-official.yaml new file mode 100644 index 0000000..940ad5c --- /dev/null +++ b/doc/specs/tags/broadcasts/api-broadcasts-official.yaml @@ -0,0 +1,141 @@ +get: + operationId: broadcastsOfficial + summary: Get official broadcasts + description: | + Get all incoming, ongoing, and finished official broadcasts. + The broadcasts are sorted by start date, most recent first. + Broadcasts are streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON). + tags: + - Broadcasts + security: [] + parameters: + - in: query + name: nb + description: Max number of broadcasts to fetch + schema: + type: integer + default: 20 + minimum: 1 + responses: + '200': + description: The list of official broadcasts. + headers: + Access-Control-Allow-Origin: + schema: + type: string + default: "'*'" + content: + application/x-ndjson: + schema: + $ref: '../../schemas/BroadcastWithRounds.yaml' + example: + { + 'tour': + { + 'id': 'qkY2yAcs', + 'name': 'Norway Chess 2024 | Open', + 'slug': 'norway-chess-2024--open', + 'description': 'May 27th - June 7th | 6-player double round-robin | Classical time control | Carlsen, Ding, Caruana, Nakamura', + 'createdAt': 1716672627410, + 'tier': 5, + 'image': 'https://image.lichess1.org/display?h=400&op=thumbnail&path=aaarmstark:relay:qkY2yAcs:dCwnFf0q.jpg&w=800&sig=36d5da931b2f9631e3ad4ae67cdb6b6412c469bb', + 'markup': "

The Norway Chess 2024 is a 6-player double round-robin tournament, held from the 27th of May to the 7th of June in Stavanger, Norway, featuring the former and current World Champions Magnus Carlsen and Ding Liren, Fabiano Caruana, Hikaru Nakamura, R Praggnanandhaa and Alireza Firouzja.

\n

Time control is 120 minutes for the entire game with a 10-second increment from move 41.

\n

Official Website | Standings | Regulations

\n
\n

Mutually agreed draws are not allowed until both players have made at least 30 moves.

\n

In the event of a draw, an Armageddon game is played to determine the winner of the round. Players keep the colour from the classical game. Time control is 10 minutes for White and 7 minutes for Black with a 1-second increment from move 41.

\n
\n

Standings after Round 5

\n

Players are awarded:

\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\n
RankPlayerEloWDLAwTotal
1GM Nakamura2794230210.0
2GM Carlsen283022129.0
3GM Praggnanandhaa274722118.5
4GM Firouzja273713116.5
5GM Caruana280512205.0
6GM Ding276202312.5
\n
\n
\n

Previous editions: 2023 | 2022 | 2021

\n", + 'url': 'https://lichess.org/broadcast/norway-chess-2024--open/qkY2yAcs', + }, + 'rounds': + [ + { + 'id': 'VFMWFVLX', + 'name': 'Round 5', + 'slug': 'round-5', + 'createdAt': 1716681349783, + 'finished': true, + 'startsAt': 1717254000000, + 'url': 'https://lichess.org/broadcast/norway-chess-2024--open/round-5/VFMWFVLX', + }, + { + 'id': '4JSenCaJ', + 'name': 'Round 4', + 'slug': 'round-4', + 'createdAt': 1716681322100, + 'finished': true, + 'startsAt': 1717081200000, + 'url': 'https://lichess.org/broadcast/norway-chess-2024--open/round-4/4JSenCaJ', + }, + { + 'id': 'xmZcMs9U', + 'name': 'Round 3', + 'slug': 'round-3', + 'createdAt': 1716681206009, + 'finished': true, + 'startsAt': 1716994800000, + 'url': 'https://lichess.org/broadcast/norway-chess-2024--open/round-3/xmZcMs9U', + }, + { + 'id': 'sbOHYOVj', + 'name': 'Round 2', + 'slug': 'round-2', + 'createdAt': 1716673477425, + 'finished': true, + 'startsAt': 1716908400000, + 'url': 'https://lichess.org/broadcast/norway-chess-2024--open/round-2/sbOHYOVj', + }, + { + 'id': 'I9TLGEOt', + 'name': 'Round 1', + 'slug': 'round-1', + 'createdAt': 1716672669495, + 'finished': true, + 'startsAt': 1716822000000, + 'url': 'https://lichess.org/broadcast/norway-chess-2024--open/round-1/I9TLGEOt', + }, + { + 'id': 'E0YSbWDC', + 'name': 'Tiebreaks', + 'slug': 'tiebreaks', + 'createdAt': 1716681627336, + 'startsAt': 1717790400000, + 'url': 'https://lichess.org/broadcast/norway-chess-2024--open/tiebreaks/E0YSbWDC', + }, + { + 'id': 'C5Zzd9mM', + 'name': 'Round 10', + 'slug': 'round-10', + 'createdAt': 1716681541792, + 'startsAt': 1717772400000, + 'url': 'https://lichess.org/broadcast/norway-chess-2024--open/round-10/C5Zzd9mM', + }, + { + 'id': 'Qvlkp2yF', + 'name': 'Round 9', + 'slug': 'round-9', + 'createdAt': 1716681503527, + 'startsAt': 1717686000000, + 'url': 'https://lichess.org/broadcast/norway-chess-2024--open/round-9/Qvlkp2yF', + }, + { + 'id': '2xhPECG3', + 'name': 'Round 8', + 'slug': 'round-8', + 'createdAt': 1716681472192, + 'startsAt': 1717513200000, + 'url': 'https://lichess.org/broadcast/norway-chess-2024--open/round-8/2xhPECG3', + }, + { + 'id': '4FLBpAW3', + 'name': 'Round 7', + 'slug': 'round-7', + 'createdAt': 1716681411436, + 'startsAt': 1717426800000, + 'url': 'https://lichess.org/broadcast/norway-chess-2024--open/round-7/4FLBpAW3', + }, + { + 'id': 'Whq5YPU7', + 'name': 'Round 6', + 'slug': 'round-6', + 'createdAt': 1716681379848, + 'startsAt': 1717340400000, + 'url': 'https://lichess.org/broadcast/norway-chess-2024--open/round-6/Whq5YPU7', + }, + ], + } diff --git a/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId-new.yaml b/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId-new.yaml index 070f2a9..b733e74 100644 --- a/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId-new.yaml +++ b/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId-new.yaml @@ -74,7 +74,7 @@ post: content: application/json: schema: - $ref: '../../schemas/BroadcastRound.yaml' + $ref: '../../schemas/BroadcastRoundNew.yaml' "400": description: The creation of the broadcast failed. content: diff --git a/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId.yaml b/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId.yaml index 9bad138..71797c6 100644 --- a/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId.yaml +++ b/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId.yaml @@ -19,4 +19,4 @@ get: content: application/json: schema: - $ref: '../../schemas/BroadcastTour.yaml' + $ref: '../../schemas/BroadcastWithRounds.yaml' diff --git a/doc/specs/tags/broadcasts/broadcast-new.yaml b/doc/specs/tags/broadcasts/broadcast-new.yaml index 2abc36a..a2fca2e 100644 --- a/doc/specs/tags/broadcasts/broadcast-new.yaml +++ b/doc/specs/tags/broadcasts/broadcast-new.yaml @@ -25,7 +25,19 @@ post: content: application/json: schema: - $ref: '../../schemas/BroadcastTour.yaml' + $ref: '../../schemas/BroadcastWithRounds.yaml' + example: + { + "tour": { + "createdAt": 1717342164861, + "description": "This is a test", + "id": "HdRP6fce", + "name": "My New Tournament", + "slug": "my-new-tournament", + "url": "https://lichess.org/broadcast/my-new-tournament/HdRP6fce" + }, + "rounds": [] + } "400": description: The creation of the broadcast tournament failed. content: