Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broadcasts: Broadcast via Lichess usernames #418

Merged
merged 2 commits into from
Feb 13, 2025
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
33 changes: 22 additions & 11 deletions doc/specs/schemas/BroadcastRoundForm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ allOf:
description: |
Name of the broadcast round.
Example: `Round 1`

required:
- name

- oneOf:
- type: object
title: send games via push
- type: object
title: send game via PGN url
title: retrieve games via PGN url
required:
- syncUrl
properties:
syncUrl:
type: string
Expand All @@ -25,7 +29,6 @@ allOf:
```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)
onlyRound:
type: integer
maximum: 999
Expand Down Expand Up @@ -59,7 +62,9 @@ allOf:

It only works if you chose `syncUrl` or `syncUrls` as the source.
- type: object
title: send game via mutiple PGN urls
title: retrieve games via mutiple PGN urls
required:
- syncUrls
properties:
syncUrls:
type: string
Expand All @@ -71,7 +76,6 @@ allOf:
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)
onlyRound:
type: integer
maximum: 999
Expand Down Expand Up @@ -105,14 +109,24 @@ allOf:

It only works if you chose `syncUrl` or `syncUrls` as the source.
- type: object
title: Lichess Game Ids
title: retrieve games via Lichess game IDs
required:
- syncIds
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
title: retrieve games via Lichess usernames
required:
- syncUsers
properties:
syncUsers:
type: string
description: |
Up to 100 Lichess usernames, separated by spaces

- type: object
properties:
startsAt:
Expand Down Expand Up @@ -144,6 +158,3 @@ allOf:
(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 @@ -4,17 +4,21 @@ post:
description: |
Create a new broadcast round to relay external games.
This endpoint accepts the same form data as the web form.

Choose one between `syncUrl`, `syncUrls`, `syncIds` and `syncUsers`, if it is missing, the broadcast needs to be fed by [pushing PGN to it](#operation/broadcastPush)
tags:
- Broadcasts
security:
- OAuth2: ["study:write"]
parameters:
- in: path
name: broadcastTournamentId
description: The broadcast tournament ID (8 characters).
description: The broadcast tournament ID
required: true
schema:
type: string
minLength: 8
maxLength: 8
requestBody:
required: true
content:
Expand Down