Skip to content

Update broadcast grouping descriptions and example#663

Open
tors42 wants to merge 1 commit into
lichess-org:masterfrom
tors42:broadcast-grouping
Open

Update broadcast grouping descriptions and example#663
tors42 wants to merge 1 commit into
lichess-org:masterfrom
tors42:broadcast-grouping

Conversation

@tors42

@tors42 tors42 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

"grouping.info.tours" is not a comma separated list but a linebreak separated list.

Add description to "grouping.scoreGroups" to hint that it is a repeatable parameter with index, i.e
'grouping.scoreGroups[0]=wYigbpXq,M5YHvpOX'

curl,bash,jq "reproducer"
LICHESS="http://localhost:8080"
TOKEN="lip_yulia"

A1=$(curl -s $LICHESS/broadcast/new \
    --data-urlencode "name=Type A | Day 1" \
    --request POST \
    --header "Content-Type: application/x-www-form-urlencoded" \
    --header "Authorization: Bearer $TOKEN" \
    | jq -r .tour.id)

A2=$(curl -s $LICHESS/broadcast/new \
    --data-urlencode "name=Type A | Day 2" \
    --request POST \
    --header "Content-Type: application/x-www-form-urlencoded" \
    --header "Authorization: Bearer $TOKEN" \
    | jq -r .tour.id)

B1=$(curl -s $LICHESS/broadcast/new \
    --data-urlencode "name=Type B | Day 1" \
    --request POST \
    --header "Content-Type: application/x-www-form-urlencoded" \
    --header "Authorization: Bearer $TOKEN" \
    | jq -r .tour.id)

B2=$(curl -s $LICHESS/broadcast/new \
    --data-urlencode "name=Type B | Day 2" \
    --request POST \
    --header "Content-Type: application/x-www-form-urlencoded" \
    --header "Authorization: Bearer $TOKEN" \
    | jq -r .tour.id)

echo $LICHESS/broadcast/$A1/edit
curl $LICHESS/broadcast/$A1/edit \
    --request POST \
    --header "Content-Type: application/x-www-form-urlencoded" \
    --header "Authorization: Bearer $TOKEN" \
    --data-urlencode "name=Type A | Day 1" \
    --data-urlencode "grouping.info.name=The Group" \
    --data-urlencode "grouping.info.tours=$A1,$A2,$B1,$B2" \
    --data-urlencode "grouping.scoreGroups[0]=$A1,$A2" \
    --data-urlencode "grouping.scoreGroups[1]=$B1,$B2"
{"error":{"grouping.info.tours":["Invalid value: Xh0y1Dir,YBSOXETw,zgy0bByU,XIQICt1Z"]}}
curl $LICHESS/broadcast/$A1/edit \
    --request POST \
    --header "Content-Type: application/x-www-form-urlencoded" \
    --header "Authorization: Bearer $TOKEN" \
    --data-urlencode "name=Type A | Day 1" \
    --data-urlencode "grouping.info.name=The Group" \
    --data-urlencode "grouping.info.tours=$A1"$'\n'"$A2"$'\n'"$B1"$'\n'"$B2" \
    --data-urlencode "grouping.scoreGroups[0]=$A1,$A2" \
    --data-urlencode "grouping.scoreGroups[1]=$B1,$B2"
{"ok":true}

"grouping.info.tours" is not a comma separated list but a linebreak
separated list.

Add description to "grouping.scoreGroups" to hint that it is a
repeatable parameter with index, i.e
'grouping.scoreGroups[0]=wYigbpXq,M5YHvpOX'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant