Skip to content

Commit

Permalink
Merge pull request #410 from AllieJonsson/fix/tv-channels
Browse files Browse the repository at this point in the history
add tv-channels
  • Loading branch information
ornicar authored Jan 15, 2025
2 parents 652549e + d2de592 commit d66d602
Show file tree
Hide file tree
Showing 2 changed files with 192 additions and 93 deletions.
25 changes: 25 additions & 0 deletions doc/specs/schemas/TvGame.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
type: object

properties:
user:
allOf:
- $ref: './LightUser.yaml'
- type: object
properties:
flair:
$ref: './Flair.yaml'
rating:
type: number
gameId:
type: string
color:
type: string
enum:
- 'white'
- 'black'

required:
- user
- rating
- gameId
- color
260 changes: 167 additions & 93 deletions doc/specs/tags/tv/api-tv-channels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ get:
- TV
security: []
responses:
"200":
'200':
description: The list of games being played for each speed and variant.
headers:
Access-Control-Allow-Origin:
Expand All @@ -19,96 +19,170 @@ get:
content:
application/json:
schema:
example: {
"bot": {
"user": { "id": "leelachess", "name": "LeelaChess", "title": "BOT" },
"rating": 2660,
"gameId": "Zznv9MIl",
"color": "black"
},
"blitz": {
"user": { "id": "lekkerkortook", "name": "LekkerKortOok" },
"rating": 2603,
"gameId": "hTJ4v7Mp",
"color": "black"
},
"racingKings": {
"user": { "id": "chesslo21", "name": "chesslo21" },
"rating": 2123,
"gameId": "lgCDl5Of",
"color": "white"
},
"ultraBullet": {
"user": { "id": "farmville", "name": "Farmville" },
"rating": 2338,
"gameId": "NEY6OQ32",
"color": "white"
},
"bullet": {
"user": { "id": "nurmibrah", "name": "nurmiBrah" },
"rating": 2499,
"gameId": "5LgyE516",
"color": "black"
},
"classical": {
"user": { "id": "holden_m_j_thomas", "name": "Holden_M_J_Thomas" },
"rating": 1806,
"gameId": "k3oLby6N",
"color": "white"
},
"threeCheck": {
"user": { "id": "pepellou", "name": "pepellou", "patron": true },
"rating": 1978,
"gameId": "Og5RCvmu",
"color": "black"
},
"antichess": {
"user": { "id": "maria-bakkar", "name": "maria-bakkar" },
"rating": 2103,
"gameId": "toCr41yx",
"color": "black"
},
"computer": {
"user": { "id": "oh_my_goat_im_so_bat", "name": "oh_my_goat_Im_so_bat" },
"rating": 2314,
"gameId": "TkI4qZxu",
"color": "black"
},
"horde": {
"user": { "id": "habitualchess", "name": "HabitualChess" },
"rating": 1803,
"gameId": "oMofN63H",
"color": "white"
},
"rapid": { "user": { "id": "denpayd", "name": "DenpaYD" }, "rating": 2289, "gameId": "IcWOl8ee" },
"atomic": {
"user": { "id": "meetyourdemise", "name": "MeetYourDemise" },
"rating": 2210,
"gameId": "tvMxtCMN",
"color": "white"
},
"crazyhouse": {
"user": { "id": "mathace", "name": "mathace" },
"rating": 2397,
"gameId": "i3gTZlUb",
"color": "black"
},
"chess960": {
"user": { "id": "voja_7", "name": "voja_7" },
"rating": 1782,
"gameId": "lrXLcedu",
"color": "white"
},
"kingOfTheHill": {
"user": { "id": "nadime", "name": "Nadime" },
"rating": 1500,
"gameId": "DsQn8aEV",
"color": "white"
},
"best": {
"user": { "id": "lekkerkortook", "name": "LekkerKortOok" },
"rating": 2603,
"gameId": "hTJ4v7Mp",
"color": "black"
type: object
required:
- bot
- blitz
- racingKings
- ultraBullet
- bullet
- classical
- threeCheck
- antichess
- computer
- horde
- rapid
- atomic
- crazyhouse
- chess960
- kingOfTheHill
- best
properties:
bot:
$ref: '../../schemas/TvGame.yaml'
blitz:
$ref: '../../schemas/TvGame.yaml'
racingKings:
$ref: '../../schemas/TvGame.yaml'
ultraBullet:
$ref: '../../schemas/TvGame.yaml'
bullet:
$ref: '../../schemas/TvGame.yaml'
classical:
$ref: '../../schemas/TvGame.yaml'
threeCheck:
$ref: '../../schemas/TvGame.yaml'
antichess:
$ref: '../../schemas/TvGame.yaml'
computer:
$ref: '../../schemas/TvGame.yaml'
horde:
$ref: '../../schemas/TvGame.yaml'
rapid:
$ref: '../../schemas/TvGame.yaml'
atomic:
$ref: '../../schemas/TvGame.yaml'
crazyhouse:
$ref: '../../schemas/TvGame.yaml'
chess960:
$ref: '../../schemas/TvGame.yaml'
kingOfTheHill:
$ref: '../../schemas/TvGame.yaml'
best:
$ref: '../../schemas/TvGame.yaml'

example:
{
'bot':
{
'user': { 'id': 'leelachess', 'name': 'LeelaChess', 'title': 'BOT' },
'rating': 2660,
'gameId': 'Zznv9MIl',
'color': 'black',
},
'blitz':
{
'user': { 'id': 'lekkerkortook', 'name': 'LekkerKortOok' },
'rating': 2603,
'gameId': 'hTJ4v7Mp',
'color': 'black',
},
'racingKings':
{
'user': { 'id': 'chesslo21', 'name': 'chesslo21' },
'rating': 2123,
'gameId': 'lgCDl5Of',
'color': 'white',
},
'ultraBullet':
{
'user': { 'id': 'farmville', 'name': 'Farmville' },
'rating': 2338,
'gameId': 'NEY6OQ32',
'color': 'white',
},
'bullet':
{
'user': { 'id': 'nurmibrah', 'name': 'nurmiBrah' },
'rating': 2499,
'gameId': '5LgyE516',
'color': 'black',
},
'classical':
{
'user': { 'id': 'holden_m_j_thomas', 'name': 'Holden_M_J_Thomas' },
'rating': 1806,
'gameId': 'k3oLby6N',
'color': 'white',
},
'threeCheck':
{
'user': { 'id': 'pepellou', 'name': 'pepellou', 'patron': true },
'rating': 1978,
'gameId': 'Og5RCvmu',
'color': 'black',
},
'antichess':
{
'user': { 'id': 'maria-bakkar', 'name': 'maria-bakkar' },
'rating': 2103,
'gameId': 'toCr41yx',
'color': 'black',
},
'computer':
{
'user': { 'id': 'oh_my_goat_im_so_bat', 'name': 'oh_my_goat_Im_so_bat' },
'rating': 2314,
'gameId': 'TkI4qZxu',
'color': 'black',
},
'horde':
{
'user': { 'id': 'habitualchess', 'name': 'HabitualChess' },
'rating': 1803,
'gameId': 'oMofN63H',
'color': 'white',
},
'rapid':
{
'user': { 'id': 'denpayd', 'name': 'DenpaYD' },
'rating': 2289,
'gameId': 'IcWOl8ee',
'color': 'white',
},
'atomic':
{
'user': { 'id': 'meetyourdemise', 'name': 'MeetYourDemise' },
'rating': 2210,
'gameId': 'tvMxtCMN',
'color': 'white',
},
'crazyhouse':
{
'user': { 'id': 'mathace', 'name': 'mathace' },
'rating': 2397,
'gameId': 'i3gTZlUb',
'color': 'black',
},
'chess960':
{
'user': { 'id': 'voja_7', 'name': 'voja_7' },
'rating': 1782,
'gameId': 'lrXLcedu',
'color': 'white',
},
'kingOfTheHill':
{
'user': { 'id': 'nadime', 'name': 'Nadime' },
'rating': 1500,
'gameId': 'DsQn8aEV',
'color': 'white',
},
'best':
{
'user': { 'id': 'lekkerkortook', 'name': 'LekkerKortOok' },
'rating': 2603,
'gameId': 'hTJ4v7Mp',
'color': 'black',
},
}
}

0 comments on commit d66d602

Please sign in to comment.