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
76 changes: 57 additions & 19 deletions doc/specs/schemas/BroadcastForm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,44 +20,82 @@ properties:
type: string
description: |
Mention up to 4 of the best players participating.
autoLeaderboard:
type: boolean
description: Compute and display a simple leaderboard based on game results
markdown:
type: string
description: Optional long description of the broadcast. Markdown is supported. Length must be less than 20,000 characters.
tier:
type: integer
description: |
Optional long description of the broadcast. Markdown is supported. Length must be less than 20,000 characters.
autoLeaderboard:
type: boolean
description: |
Compute and display a simple leaderboard based on game results
teamTable:
type: boolean
description: |
Optional, for Lichess admins only, used to feature on /broadcast.

* `3` for normal
* `4` for high
* `5` for best
Show a team leaderboard. Requires WhiteTeam and BlackTeam PGN tags.
players:
type: string
description: |
Optional replace player names, ratings and titles.

One line per player, formatted as such:

`player name = FIDE ID`
```txt
player name = FIDE ID
```

Example:

`Magnus Carlsen = 1503014`
```txt
Magnus Carlsen = 1503014
```

Player names ignore case and punctuation, and match all possible combinations of 2 words:
"Jorge Rick Vito" will match "Jorge Rick", "jorge vito", "Rick, Vito", etc.
Player names ignore case and punctuation, and match all possible combinations of 2 words: "Jorge Rick Vito" will match "Jorge Rick", "jorge vito", "Rick, Vito", etc.

If the player is NM or WNM, you can:

```txt
Player Name = FIDE ID / Title
```

Alternatively, you may set tags manually, like so:

`player name / rating / title / new name`
```txt
player name / rating / title / new name
```

All values are optional. Example:
```txt
Magnus Carlsen / 2863 / GM
YouGotLittUp / 1890 / / Louis Litt
```
teams:
type: string
description: |
Optional: assign players to teams

One line per player, formatted as such:
```txt
Team name; Fide Id or Player name
```

Example:
```txt
Team Cats ; 3408230
Team Dogs ; Scooby Doo
```

By default the PGN tags WhiteTeam and BlackTeam are used.
tier:
type: integer
description: |
Optional, for Lichess admins only, used to feature on /broadcast.

`Magnus Carlsen / 2863 / GM`
`YouGotLittUp / 1890 / / Louis Litt`
* `3` for Official: normal tier
* `4` for Official: high tier
* `5` for Official: best tier
* `-1` for Private



required:
- name
- description
95 changes: 95 additions & 0 deletions doc/specs/schemas/BroadcastRoundForm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
type: object
properties:
name:
type: string
description: |
Name of the broadcast round. Length must be between 3 and 80 characters.
Example: `Round 1`
syncUrl:
type: string
description: |
URL that Lichess will poll to get updates about the games. It must be publicly accessible from the Internet.
Example:
```txt
https://myserver.org/myevent/round-10/games.pgn
```
Choose one between `syncUrl`, `syncUrls` and `syncIds`, if it is missing, the broadcast needs to be fed by [pushing PGN to it](#operation/broadcastPush)
syncUrls:
type: string
description: |
URLs that Lichess will poll to get updates about the games. It must be publicly accessible from the Internet.
Example:
```txt
https://myserver.org/myevent/round-10/game-1.pgn
https://myserver.org/myevent/round-10/game-2.pgn
```
Choose one between `syncUrl`, `syncUrls` and `syncIds`, if it is missing, the broadcast needs to be fed by [pushing PGN to it](#operation/broadcastPush)
syncIds:
type: string
description: |
Lichess game IDs - Up to 64 Lichess game IDs, separated by spaces.
Choose one between `syncUrl`, `syncUrls` and `syncIds`, if it is missing, the broadcast needs to be fed by [pushing PGN to it](#operation/broadcastPush)
onlyRound:
type: integer
maximum: 999
minimum: 1
description: |
Filter games by round number

Optional, only keep games from the source that match a round number.
It uses the PGN **Round** tag. These would match round 3:
```txt
[Round "3"]
[Round "3.1"]
```
If you set a round number, then games without a **Round** tag are dropped.

It only works if you chose `syncUrl` or `syncUrls` as the source.
slices:
type: string
description: |
Select slices of the games

Optional. Select games based on their position in the source.
```txt
1 only select the first board
1-4 only select the first 4 boards
1,2,3,4 same as above, first 4 boards
11-15,21-25 boards 11 to 15, and boards 21 to 25
2,3,7-9 boards 2, 3, 7, 8, and 9
```
Slicing is done after filtering by round number.

It only works if you chose `syncUrl` or `syncUrls` as the source.
startsAt:
type: integer
description: |
Timestamp in milliseconds of broadcast round start. Leave empty to manually start the broadcast round.
Example: `1356998400070`
minimum: 1356998400070
startsAfterPrevious:
type: boolean
description: |
The start date is unknown, and the round will start automatically when the previous round completes.
default: false
delay:
type: integer
description: |
Delay in seconds for movements to appear on the broadcast. Leave it empty if you don't need it.
Example: `900` (15 min)
minimum: 0
maximum: 3600
finished:
type: boolean
description: |
Mark whether the round has been completed.
default: false
period:
type: integer
description: |
(Only for Admins) Waiting time for each poll.
minimum: 2
maximum: 60

required:
- name
Original file line number Diff line number Diff line change
Expand Up @@ -20,49 +20,7 @@ post:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
name:
type: string
description: |
Name of the broadcast round. Length must be between 3 and 80 characters.
Example: `Round 1`
syncUrl:
type: string
description: |
URL that Lichess will poll to get updates about the games. It must be publicly accessible from the Internet.
Example: `https://myserver.org/myevent/round-10/games.pgn`
If the syncUrl is missing, then the broadcast needs to be fed by [pushing PGN to it](#operation/broadcastPush).
syncUrlRound:
type: string
description: |
Required if `syncUrl` contains a livechesscloud link.
startsAt:
type: integer
description: |
Timestamp in milliseconds of broadcast round start. Leave empty to manually start the broadcast round.
Example: `1356998400070`
minimum: 1356998400070
delay:
type: integer
description: |
Delay in seconds for movements to appear on the broadcast. Leave it empty if you don't need it.
Example: `900` (15 min)
minimum: 0
maximum: 1800
period:
type: integer
description: |
(Only for Admins) Waiting time for each poll.
minimum: 2
maximum: 60
finished:
type: boolean
description: |
Mark whether the round has been completed.
default: false
required:
- name
$ref: '../../schemas/BroadcastRoundForm.yaml'
responses:
"200":
description: The broadcast round was successfully created.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,48 +22,7 @@ post:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
name:
type: string
description: |
Name of the broadcast round. Length must be between 3 and 80 characters.
Example: `Round 10`
syncUrl:
type: string
description: |
URL that Lichess will poll to get updates about the games. It must be publicly accessible from the Internet.
Example: `https://myserver.org/myevent/round-10/games.pgn`
syncUrlRound:
type: string
description: |
Required if `syncUrl` contains a livechesscloud link.
startsAt:
type: integer
description: |
Timestamp in milliseconds of broadcast start. Leave empty to manually start the broadcast.
Example: `1356998400070`
minimum: 1356998400070
delay:
type: integer
description: |
Delay in seconds for movements to appear on the broadcast. Leave it empty if you don't need it.
Example: `900` (15 min)
minimum: 0
maximum: 1800
period:
type: integer
description: |
(Only for Admins) Waiting time for each poll.
minimum: 2
maximum: 60
finished:
type: boolean
description: |
Mark whether the round has been completed.
default: false
required:
- name
$ref: '../../schemas/BroadcastRoundForm.yaml'
responses:
"200":
description: The broadcast round was successfully edited.
Expand Down