Skip to content

Commit

Permalink
Update broadcast schemas (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev authored Jun 2, 2024
1 parent ef9e6b7 commit e006b44
Show file tree
Hide file tree
Showing 15 changed files with 712 additions and 115 deletions.
5 changes: 4 additions & 1 deletion doc/specs/lichess-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 0 additions & 1 deletion doc/specs/schemas/BroadcastForm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ properties:
required:
- name
- description
- autoLeaderboard
33 changes: 15 additions & 18 deletions doc/specs/schemas/BroadcastMyRound.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ properties:
round:
$ref: './BroadcastRoundInfo.yaml'
tour:
$ref: './BroadcastRoundTournamentInfo.yaml'
$ref: './BroadcastTour.yaml'
study:
$ref: './BroadcastRoundStudyInfo.yaml'

Expand All @@ -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 }
}
3 changes: 2 additions & 1 deletion doc/specs/schemas/BroadcastRound.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ properties:
round:
$ref: './BroadcastRoundInfo.yaml'
tour:
$ref: './BroadcastRoundTournamentInfo.yaml'
$ref: './BroadcastTour.yaml'
study:
$ref: './BroadcastRoundStudyInfo.yaml'
games:
Expand Down Expand Up @@ -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":
Expand Down
1 change: 1 addition & 0 deletions doc/specs/schemas/BroadcastRoundInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ properties:
delay:
type: integer
format: int64

required:
- id
- name
Expand Down
36 changes: 36 additions & 0 deletions doc/specs/schemas/BroadcastRoundNew.yaml
Original file line number Diff line number Diff line change
@@ -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"
}
}
26 changes: 0 additions & 26 deletions doc/specs/schemas/BroadcastRoundTournamentInfo.yaml

This file was deleted.

68 changes: 35 additions & 33 deletions doc/specs/schemas/BroadcastTour.yaml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions doc/specs/schemas/BroadcastWithRounds.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type: object

properties:
tour:
$ref: './BroadcastTour.yaml'
rounds:
type: array
items:
$ref: './BroadcastRoundInfo.yaml'
32 changes: 0 additions & 32 deletions doc/specs/tags/broadcasts/api-broadcast.yaml

This file was deleted.

Loading

0 comments on commit e006b44

Please sign in to comment.