diff --git a/doc/specs/schemas/TvGame.yaml b/doc/specs/schemas/TvGame.yaml new file mode 100644 index 0000000..a7da3b6 --- /dev/null +++ b/doc/specs/schemas/TvGame.yaml @@ -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 diff --git a/doc/specs/tags/tv/api-tv-channels.yaml b/doc/specs/tags/tv/api-tv-channels.yaml index 6212c86..1a7b612 100644 --- a/doc/specs/tags/tv/api-tv-channels.yaml +++ b/doc/specs/tags/tv/api-tv-channels.yaml @@ -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: @@ -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', + }, } - }