Skip to content

Commit

Permalink
Merge pull request #390 from SergioGlorias/fix-broadcastroundform
Browse files Browse the repository at this point in the history
OnlyRound and Slice are not in all forms
  • Loading branch information
fitztrev authored Oct 19, 2024
2 parents dff33ae + 6a9522c commit bb2d599
Showing 1 changed file with 103 additions and 68 deletions.
171 changes: 103 additions & 68 deletions doc/specs/schemas/BroadcastRoundForm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,76 +8,12 @@ allOf:
description: |
Name of the broadcast round.
Example: `Round 1`
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

- oneOf:
- type: object
title: send games via push
- type: object
title: syncUrl
title: send game via PGN url
properties:
syncUrl:
type: string
Expand All @@ -90,8 +26,40 @@ allOf:
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)
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.
- type: object
title: syncUrls
title: send game via mutiple PGN urls
properties:
syncUrls:
type: string
Expand All @@ -104,11 +72,78 @@ allOf:
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)
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.
- type: object
title: syncIds
title: Lichess Game Ids
properties:
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)
- type: object
properties:
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

0 comments on commit bb2d599

Please sign in to comment.