├── .git-blame-ignore-revs
├── .github
└── workflows
│ ├── lint.yml
│ ├── publish-docs.yml
│ ├── publish-types.yml
│ └── reviewable.yml
├── LICENSE
├── README.md
├── doc
├── .gitignore
├── .prettierignore
├── .prettierrc.json
├── package.json
├── pnpm-lock.yaml
├── redocly.yaml
├── specs
│ ├── examples
│ │ ├── account-getMyEmailAddress.json
│ │ ├── account-getMyKidModeStatus.json
│ │ ├── account-getMyPreferences.json
│ │ ├── account-getMyProfile.json
│ │ ├── account-getMyTimeline.json
│ │ ├── account-setMyKidModeStatus.json
│ │ ├── arenas-createArena.json
│ │ ├── arenas-getArenaById.json
│ │ ├── arenas-getCurrentTournaments.json
│ │ ├── arenas-getResultsOfArena.json
│ │ ├── arenas-getTeamArenaTournaments.json
│ │ ├── arenas-getTeamStandingOfTeamBattle.json
│ │ ├── arenas-getTournamentsCreatedByUser.json
│ │ ├── arenas-getTournamentsPlayedByUser.json
│ │ ├── arenas-updateArena.json
│ │ ├── bot-getOnlineBots.json
│ │ ├── broadcasts-createBroadcastRound.json
│ │ ├── broadcasts-createBroadcastTournament.json
│ │ ├── broadcasts-exportAllRoundsAsPgn.pgn.yaml
│ │ ├── broadcasts-exportOneRoundAsPgn.pgn.yaml
│ │ ├── broadcasts-getBroadcastRound.json.yaml
│ │ ├── broadcasts-getBroadcastRoundWithCustomScoring.json.yaml
│ │ ├── broadcasts-getBroadcastTournament.json
│ │ ├── broadcasts-getBroadcastsCreatedByUser.json
│ │ ├── broadcasts-getOfficialBroadcasts.json
│ │ ├── broadcasts-getPaginatedToBroadcastPreviews.json
│ │ ├── broadcasts-getPlayersOfBroadcastTournament.json
│ │ ├── broadcasts-getYourBroadcastRounds.json
│ │ ├── broadcasts-pushPgnToBroadcastRound.json
│ │ ├── broadcasts-resetBroadcastRound.json
│ │ ├── broadcasts-searchBroadcasts.json
│ │ ├── broadcasts-streamOngoingBroadcastRoundAsPgn.pgn.yaml
│ │ ├── broadcasts-updateBroadcastRound.json
│ │ ├── broadcasts-updateBroadcastTournament.json
│ │ ├── challenges-acceptChallenge.json
│ │ ├── challenges-addTimeToOpponent.json
│ │ ├── challenges-adminChallengeTokens.json
│ │ ├── challenges-cancelChallenge.json
│ │ ├── challenges-challengeAi.json
│ │ ├── challenges-createChallenge.json
│ │ ├── challenges-declineChallenge.json
│ │ ├── challenges-listYourChallenges.json
│ │ ├── challenges-openEndedChallenge.json
│ │ ├── challenges-showOneChallenge.json
│ │ ├── challenges-startClocks.json
│ │ ├── externalEngine-acquireAnalysisRequest.json
│ │ ├── externalEngine-analyseWithExternalEngine.json
│ │ ├── externalEngine-createExternalEngine.json
│ │ ├── externalEngine-deleteExternalEngine.json
│ │ ├── externalEngine-getExternalEngine.json
│ │ ├── externalEngine-listExternalEngines.json
│ │ ├── externalEngine-updateExternalEngine.json
│ │ ├── fide-getFidePlayer-nullYear.json.yaml
│ │ ├── fide-getFidePlayer.json.yaml
│ │ ├── fide-searchFidePlayers.json
│ │ ├── games-apiGamesUserJson.json
│ │ ├── games-apiUserCurrentGameJson.json
│ │ ├── games-exportOneGame.json
│ │ ├── games-exportOneGame.pgn.yaml
│ │ ├── games-gamesExportIds.json
│ │ ├── oauth-testMultipleOauthTokens-request.txt.yaml
│ │ ├── oauth-testMultipleOauthTokens.json
│ │ ├── openingExplorer-lichess.json
│ │ ├── openingExplorer-masters.json
│ │ ├── openingExplorer-otbMasterGame.pgn.yaml
│ │ ├── openingExplorer-player.json
│ │ ├── puzzles-createAndJoinPuzzleRace.json
│ │ ├── puzzles-getDailyPuzzle.json
│ │ ├── puzzles-getNewPuzzle.json
│ │ ├── puzzles-getPuzzleById.json
│ │ ├── puzzles-getPuzzlesToReplay.json
│ │ ├── puzzles-getStormDashboardOfPlayer.json
│ │ ├── puzzles-getYourPuzzleActivity.json
│ │ ├── puzzles-getYourPuzzleDashboard.json
│ │ ├── relations-blockPlayer.json
│ │ ├── relations-followPlayer.json
│ │ ├── relations-getMyFollowing.json
│ │ ├── relations-unblockPlayer.json
│ │ ├── relations-unfollowPlayer.json
│ │ ├── simuls-getCurrentSimuls.json
│ │ ├── stream-challenge.json.yaml
│ │ ├── stream-challengeCanceled.json.yaml
│ │ ├── stream-challengeDeclined.json.yaml
│ │ ├── stream-gameFinish.json.yaml
│ │ ├── stream-gameStart.json.yaml
│ │ ├── tablebase-lookupAntichess.json
│ │ ├── tablebase-lookupAtomic.json
│ │ ├── tablebase-lookupStandard.json
│ │ ├── teams-getPopularTeams.json
│ │ ├── teams-getSingleTeam.json
│ │ ├── teams-getTeamSwissTournaments.json
│ │ ├── teams-searchTeams.json
│ │ ├── teams-teamsOfPlayer.json
│ │ ├── tv-getBestOngoingGamesOfTvChannel.json
│ │ ├── tv-getBestOngoingGamesOfTvChannel.pgn.yaml
│ │ ├── tv-getCurrentTvGames.json
│ │ ├── tv-streamCurrentTvGame-move.json.yaml
│ │ ├── tv-streamCurrentTvGame-newGame.json.yaml
│ │ ├── user-georges-bot.json
│ │ ├── users-addNoteForUser.json
│ │ ├── users-autocompleteUsernames-list.json.yaml
│ │ ├── users-autocompleteUsernames-object.json.yaml
│ │ ├── users-getAllTop10.json
│ │ ├── users-getCrosstable.json
│ │ ├── users-getLiveStreamers.json
│ │ ├── users-getNotesForUser.json
│ │ ├── users-getOneLeaderboard.json
│ │ ├── users-getPerformanceStatisticsOfAUser.json
│ │ ├── users-getRatingHistoryOfAUser.json
│ │ ├── users-getRealTimeUsersStatus.json
│ │ ├── users-getUserActivity.json
│ │ ├── users-getUserPublicData.json
│ │ └── users-getUsersById.json
│ ├── favicon.ico
│ ├── lichess-api.yaml
│ ├── schemas
│ │ ├── ArenaPerf.yaml
│ │ ├── ArenaPosition.yaml
│ │ ├── ArenaRatingObj.yaml
│ │ ├── ArenaSheet.yaml
│ │ ├── ArenaStatus.yaml
│ │ ├── ArenaStatusName.yaml
│ │ ├── ArenaTournament.yaml
│ │ ├── ArenaTournamentFull.yaml
│ │ ├── ArenaTournamentPlayed.yaml
│ │ ├── ArenaTournamentPlayer.yaml
│ │ ├── ArenaTournaments.yaml
│ │ ├── BroadcastByUser.yaml
│ │ ├── BroadcastCustomPoints.yaml
│ │ ├── BroadcastCustomScoring.yaml
│ │ ├── BroadcastForm.yaml
│ │ ├── BroadcastGroup.yaml
│ │ ├── BroadcastGroupTour.yaml
│ │ ├── BroadcastMyRound.yaml
│ │ ├── BroadcastPgnPush.yaml
│ │ ├── BroadcastPgnPushTags.yaml
│ │ ├── BroadcastPlayerEntry.yaml
│ │ ├── BroadcastRound.yaml
│ │ ├── BroadcastRoundForm.yaml
│ │ ├── BroadcastRoundFormName.yaml
│ │ ├── BroadcastRoundGame.yaml
│ │ ├── BroadcastRoundInfo.yaml
│ │ ├── BroadcastRoundNew.yaml
│ │ ├── BroadcastRoundStudyInfo.yaml
│ │ ├── BroadcastTop.yaml
│ │ ├── BroadcastTour.yaml
│ │ ├── BroadcastWithLastRound.yaml
│ │ ├── BroadcastWithRounds.yaml
│ │ ├── BulkPairing.yaml
│ │ ├── ChallengeCanceledEvent.yaml
│ │ ├── ChallengeDeclinedEvent.yaml
│ │ ├── ChallengeDeclinedJson.yaml
│ │ ├── ChallengeEvent.yaml
│ │ ├── ChallengeJson.yaml
│ │ ├── ChallengeOpenJson.yaml
│ │ ├── ChallengeStatus.yaml
│ │ ├── ChallengeUser.yaml
│ │ ├── ChatLineEvent.yaml
│ │ ├── Clock.yaml
│ │ ├── CloudEval.yaml
│ │ ├── Count.yaml
│ │ ├── Crosstable.yaml
│ │ ├── Error.yaml
│ │ ├── ExternalEngine.yaml
│ │ ├── ExternalEngineRegistration.yaml
│ │ ├── ExternalEngineWork.yaml
│ │ ├── ExternalEngineWorkCommon.yaml
│ │ ├── FIDEPlayer.yaml
│ │ ├── Flair.yaml
│ │ ├── FromPositionFEN.yaml
│ │ ├── GameChat.yaml
│ │ ├── GameColor.yaml
│ │ ├── GameCompat.yaml
│ │ ├── GameEventInfo.yaml
│ │ ├── GameEventOpponent.yaml
│ │ ├── GameEventPlayer.yaml
│ │ ├── GameFinishEvent.yaml
│ │ ├── GameFullEvent.yaml
│ │ ├── GameJson.yaml
│ │ ├── GameMoveAnalysis.yaml
│ │ ├── GameOpening.yaml
│ │ ├── GamePgn.yaml
│ │ ├── GameSource.yaml
│ │ ├── GameStartEvent.yaml
│ │ ├── GameStateEvent.yaml
│ │ ├── GameStatus.yaml
│ │ ├── GameStatusId.yaml
│ │ ├── GameStatusName.yaml
│ │ ├── GameStream.yaml
│ │ ├── GameUser.yaml
│ │ ├── GameUsers.yaml
│ │ ├── Leaderboard.yaml
│ │ ├── LightUser.yaml
│ │ ├── LightUserOnline.yaml
│ │ ├── Move.yaml
│ │ ├── MoveStream.yaml
│ │ ├── NotFound.yaml
│ │ ├── OAuthError.yaml
│ │ ├── Ok.yaml
│ │ ├── OpeningExplorerGamePlayer.yaml
│ │ ├── OpeningExplorerLichess.yaml
│ │ ├── OpeningExplorerLichessGame.yaml
│ │ ├── OpeningExplorerMasters.yaml
│ │ ├── OpeningExplorerMastersGame.yaml
│ │ ├── OpeningExplorerOpening.yaml
│ │ ├── OpeningExplorerPlayer.yaml
│ │ ├── OpeningExplorerPlayerGame.yaml
│ │ ├── OpponentGoneEvent.yaml
│ │ ├── Perf.yaml
│ │ ├── PerfStat.yaml
│ │ ├── PerfTop10.yaml
│ │ ├── PerfType.yaml
│ │ ├── Perfs.yaml
│ │ ├── PlayTime.yaml
│ │ ├── Profile.yaml
│ │ ├── PuzzleActivity.yaml
│ │ ├── PuzzleAndGame.yaml
│ │ ├── PuzzleDashboard.yaml
│ │ ├── PuzzleModePerf.yaml
│ │ ├── PuzzlePerformance.yaml
│ │ ├── PuzzleRacer.yaml
│ │ ├── PuzzleReplay.yaml
│ │ ├── PuzzleStormDashboard.yaml
│ │ ├── RatingHistory.yaml
│ │ ├── Simul.yaml
│ │ ├── Speed.yaml
│ │ ├── StudyImportPgnChapters.yaml
│ │ ├── StudyMetadata.yaml
│ │ ├── StudyPgn.yaml
│ │ ├── SwissFromPositionFEN.yaml
│ │ ├── SwissStatus.yaml
│ │ ├── SwissTournament.yaml
│ │ ├── SwissUnauthorisedEdit.yaml
│ │ ├── TablebaseJson.yaml
│ │ ├── Team.yaml
│ │ ├── TeamPaginatorJson.yaml
│ │ ├── TeamRequest.yaml
│ │ ├── TeamRequestWithUser.yaml
│ │ ├── TimeControl.yaml
│ │ ├── Timeline.yaml
│ │ ├── TimelineEntryBlogPost.yaml
│ │ ├── TimelineEntryFollow.yaml
│ │ ├── TimelineEntryForumPost.yaml
│ │ ├── TimelineEntryGameEnd.yaml
│ │ ├── TimelineEntryPlanRenew.yaml
│ │ ├── TimelineEntryPlanStart.yaml
│ │ ├── TimelineEntrySimul.yaml
│ │ ├── TimelineEntryStreamStart.yaml
│ │ ├── TimelineEntryStudyLike.yaml
│ │ ├── TimelineEntryTeamCreate.yaml
│ │ ├── TimelineEntryTeamJoin.yaml
│ │ ├── TimelineEntryTourJoin.yaml
│ │ ├── TimelineEntryUblogPost.yaml
│ │ ├── TimelineEntryUblogPostLike.yaml
│ │ ├── Title.yaml
│ │ ├── Top10s.yaml
│ │ ├── TopUser.yaml
│ │ ├── TvFeed.yaml
│ │ ├── TvGame.yaml
│ │ ├── UciVariant.yaml
│ │ ├── User.yaml
│ │ ├── UserActivity.yaml
│ │ ├── UserActivityCorrespondenceGame.yaml
│ │ ├── UserActivityFollowList.yaml
│ │ ├── UserActivityScore.yaml
│ │ ├── UserExtended.yaml
│ │ ├── UserNote.yaml
│ │ ├── UserPreferences.yaml
│ │ ├── UserStreamer.yaml
│ │ ├── Variant.yaml
│ │ ├── VariantKey.yaml
│ │ ├── Verdict.yaml
│ │ ├── Verdicts.yaml
│ │ └── _index.yaml
│ └── tags
│ │ ├── account
│ │ ├── api-account-email.yaml
│ │ ├── api-account-kid.yaml
│ │ ├── api-account-preferences.yaml
│ │ ├── api-account.yaml
│ │ └── api-timeline.yaml
│ │ ├── analysis
│ │ └── api-cloud-eval.yaml
│ │ ├── arenatournaments
│ │ ├── api-tournament-id-games.yaml
│ │ ├── api-tournament-id-join.yaml
│ │ ├── api-tournament-id-results.yaml
│ │ ├── api-tournament-id-teams.yaml
│ │ ├── api-tournament-id-terminate.yaml
│ │ ├── api-tournament-id-withdraw.yaml
│ │ ├── api-tournament-id.yaml
│ │ ├── api-tournament-team-battle-id.yaml
│ │ ├── api-tournament.yaml
│ │ ├── api-user-username-tournament-created.yaml
│ │ └── api-user-username-tournament-played.yaml
│ │ ├── board
│ │ ├── api-board-game-gameId-abort.yaml
│ │ ├── api-board-game-gameId-berserk.yaml
│ │ ├── api-board-game-gameId-chat.yaml
│ │ ├── api-board-game-gameId-claim-victory.yaml
│ │ ├── api-board-game-gameId-draw-accept.yaml
│ │ ├── api-board-game-gameId-move-move.yaml
│ │ ├── api-board-game-gameId-resign.yaml
│ │ ├── api-board-game-gameId-takeback-accept.yaml
│ │ ├── api-board-game-stream-gameId.yaml
│ │ ├── api-board-seek.yaml
│ │ └── api-stream-event.yaml
│ │ ├── bot
│ │ ├── api-bot-account-upgrade.yaml
│ │ ├── api-bot-game-gameId-abort.yaml
│ │ ├── api-bot-game-gameId-chat.yaml
│ │ ├── api-bot-game-gameId-claim-victory.yaml
│ │ ├── api-bot-game-gameId-draw-accept.yaml
│ │ ├── api-bot-game-gameId-move-move.yaml
│ │ ├── api-bot-game-gameId-resign.yaml
│ │ ├── api-bot-game-gameId-takeback-accept.yaml
│ │ ├── api-bot-game-stream-gameId.yaml
│ │ └── api-bot-online.yaml
│ │ ├── broadcasts
│ │ ├── api-broadcast-broadcastTournamentId-pgn.yaml
│ │ ├── api-broadcast-broadcastTournamentSlug-broadcastRoundSlug-broadcastRoundId.yaml
│ │ ├── api-broadcast-my-rounds.yaml
│ │ ├── api-broadcast-round-broadcastRoundId-pgn.yaml
│ │ ├── api-broadcasts-by-user.yaml
│ │ ├── api-broadcasts-official.yaml
│ │ ├── api-broadcasts-search.yaml
│ │ ├── api-broadcasts-top.yaml
│ │ ├── api-stream-broadcast-round-broadcastRoundId-pgn.yaml
│ │ ├── broadcast-broadcastTournamentId-edit.yaml
│ │ ├── broadcast-broadcastTournamentId-new.yaml
│ │ ├── broadcast-broadcastTournamentId-players.yaml
│ │ ├── broadcast-broadcastTournamentId.yaml
│ │ ├── broadcast-new.yaml
│ │ ├── broadcast-round-broadcastRoundId-edit.yaml
│ │ ├── broadcast-round-broadcastRoundId-push.yaml
│ │ └── broadcast-round-broadcastRoundId-reset.yaml
│ │ ├── bulkpairings
│ │ ├── api-bulk-pairing-id-games.yaml
│ │ ├── api-bulk-pairing-id-start-clocks.yaml
│ │ ├── api-bulk-pairing-id.yaml
│ │ └── api-bulk-pairing.yaml
│ │ ├── challenges
│ │ ├── api-challenge-ai.yaml
│ │ ├── api-challenge-challengeId-accept.yaml
│ │ ├── api-challenge-challengeId-cancel.yaml
│ │ ├── api-challenge-challengeId-decline.yaml
│ │ ├── api-challenge-gameId-start-clocks.yaml
│ │ ├── api-challenge-id-show.yaml
│ │ ├── api-challenge-open.yaml
│ │ ├── api-challenge-username.yaml
│ │ ├── api-challenge.yaml
│ │ ├── api-round-gameId-add-time-seconds.yaml
│ │ └── api-token-admin-challenge.yaml
│ │ ├── externalengine
│ │ ├── api-external-engine-id-analyse.yaml
│ │ ├── api-external-engine-id.yaml
│ │ ├── api-external-engine-work-id.yaml
│ │ ├── api-external-engine-work.yaml
│ │ └── api-external-engine.yaml
│ │ ├── fide
│ │ ├── api-fide-player-playerId.yaml
│ │ └── api-fide-player-search.yaml
│ │ ├── games
│ │ ├── api-account-playing.yaml
│ │ ├── api-games-export-_ids.yaml
│ │ ├── api-games-export-bookmarks.yaml
│ │ ├── api-games-export-imports.yaml
│ │ ├── api-games-user-username.yaml
│ │ ├── api-import.yaml
│ │ ├── api-stream-game-id.yaml
│ │ ├── api-stream-games-by-users.yaml
│ │ ├── api-stream-games-streamId-add.yaml
│ │ ├── api-stream-games-streamId.yaml
│ │ ├── api-user-username-current-game.yaml
│ │ └── game-export-gameId.yaml
│ │ ├── messaging
│ │ └── inbox-username.yaml
│ │ ├── oauth
│ │ ├── api-token-test.yaml
│ │ ├── api-token.yaml
│ │ └── oauth.yaml
│ │ ├── openingexplorer
│ │ ├── lichess.yaml
│ │ ├── master-pgn-gameId.yaml
│ │ ├── masters.yaml
│ │ └── player.yaml
│ │ ├── puzzles
│ │ ├── api-puzzle-activity.yaml
│ │ ├── api-puzzle-daily.yaml
│ │ ├── api-puzzle-dashboard-days.yaml
│ │ ├── api-puzzle-id.yaml
│ │ ├── api-puzzle-next.yaml
│ │ ├── api-puzzle-replay-days-theme.yaml
│ │ ├── api-racer.yaml
│ │ └── api-storm-dashboard-username.yaml
│ │ ├── relations
│ │ ├── api-rel-block-username.yaml
│ │ ├── api-rel-follow-username.yaml
│ │ ├── api-rel-following.yaml
│ │ ├── api-rel-unblock-username.yaml
│ │ └── api-rel-unfollow-username.yaml
│ │ ├── simuls
│ │ └── api-simul.yaml
│ │ ├── studies
│ │ ├── api-study-by-username.yaml
│ │ ├── api-study-studyId-chapterId.pgn.yaml
│ │ ├── api-study-studyId-chapterId.yaml
│ │ ├── api-study-studyId-import-pgn.yaml
│ │ ├── api-study-studyId.pgn.yaml
│ │ └── study-by-username-export.pgn.yaml
│ │ ├── swisstournaments
│ │ ├── api-swiss-id-edit.yaml
│ │ ├── api-swiss-id-games.yaml
│ │ ├── api-swiss-id-join.yaml
│ │ ├── api-swiss-id-results.yaml
│ │ ├── api-swiss-id-schedule-next-round.yaml
│ │ ├── api-swiss-id-terminate.yaml
│ │ ├── api-swiss-id-withdraw.yaml
│ │ ├── api-swiss-id.yaml
│ │ ├── api-swiss-new-teamId.yaml
│ │ └── swiss-id.trf.yaml
│ │ ├── tablebase
│ │ ├── antichess.yaml
│ │ ├── atomic.yaml
│ │ └── standard.yaml
│ │ ├── teams
│ │ ├── api-team-all.yaml
│ │ ├── api-team-of-username.yaml
│ │ ├── api-team-search.yaml
│ │ ├── api-team-teamId-arena.yaml
│ │ ├── api-team-teamId-kick-userId.yaml
│ │ ├── api-team-teamId-request-userId-accept.yaml
│ │ ├── api-team-teamId-request-userId-decline.yaml
│ │ ├── api-team-teamId-requests.yaml
│ │ ├── api-team-teamId-swiss.yaml
│ │ ├── api-team-teamId-users.yaml
│ │ ├── api-team-teamId.yaml
│ │ ├── team-teamId-join.yaml
│ │ ├── team-teamId-pm-all.yaml
│ │ └── team-teamId-quit.yaml
│ │ ├── tv
│ │ ├── api-tv-channel-feed.yaml
│ │ ├── api-tv-channel.yaml
│ │ ├── api-tv-channels.yaml
│ │ └── api-tv-feed.yaml
│ │ └── users
│ │ ├── api-crosstable-user1-user2.yaml
│ │ ├── api-player-autocomplete.yaml
│ │ ├── api-player-top-nb-perfType.yaml
│ │ ├── api-player.yaml
│ │ ├── api-streamer-live.yaml
│ │ ├── api-user-username-activity.yaml
│ │ ├── api-user-username-note.yaml
│ │ ├── api-user-username-perf-perf.yaml
│ │ ├── api-user-username-rating-history.yaml
│ │ ├── api-user-username.yaml
│ │ ├── api-users-status.yaml
│ │ └── api-users.yaml
├── spectral.yaml
└── template.hbs
├── example
├── .gitignore
├── README.md
├── oauth-app
│ ├── .gitignore
│ ├── .prettierignore
│ ├── .prettierrc.json
│ ├── README.md
│ ├── index.html
│ ├── package-lock.json
│ ├── package.json
│ ├── rollup.config.mjs
│ ├── src
│ │ ├── ctrl.ts
│ │ ├── main.ts
│ │ └── view.ts
│ └── tsconfig.json
├── oauth-backend
│ ├── .gitignore
│ ├── README.md
│ ├── index.js
│ ├── package-lock.json
│ └── package.json
├── oauth-demo
│ └── README.md
├── oauth-personal-token
│ ├── .env.default
│ ├── .gitignore
│ ├── README.md
│ ├── index.js
│ ├── package-lock.json
│ └── package.json
└── tournament-entry-code
│ └── browser.js
├── scripts
└── update-examples
│ ├── .gitignore
│ ├── .prettierignore
│ ├── README.md
│ ├── account.ts
│ ├── arenas.ts
│ ├── bot.ts
│ ├── broadcasts.ts
│ ├── challenges.ts
│ ├── config.ts
│ ├── external-engine.ts
│ ├── fide.ts
│ ├── games.ts
│ ├── oauth.ts
│ ├── opening-explorer.ts
│ ├── package.json
│ ├── pnpm-lock.yaml
│ ├── puzzles.ts
│ ├── relations.ts
│ ├── simuls.ts
│ ├── tablebase.ts
│ ├── teams.ts
│ ├── tsconfig.json
│ ├── tv.ts
│ └── users.ts
└── types
├── .gitignore
├── .prettierignore
├── README.md
├── index.js
├── lichess-api.d.ts
├── package.json
└── pnpm-lock.yaml
/.git-blame-ignore-revs:
--------------------------------------------------------------------------------
1 | # Initial prettier formatting
2 | d3e7a4379f6a3e5a94fc1e75cf3024c53acbb4ac
3 |
--------------------------------------------------------------------------------
/.github/workflows/lint.yml:
--------------------------------------------------------------------------------
1 | name: Lint OpenAPI specification
2 | on:
3 | - push
4 | - pull_request
5 | jobs:
6 | lint:
7 | name: Lint OpenAPI spec
8 | runs-on: ubuntu-latest
9 | defaults:
10 | run:
11 | working-directory: doc
12 | steps:
13 | - uses: actions/checkout@v4
14 | - uses: actions/setup-node@v4
15 | with:
16 | node-version: 22
17 | - uses: pnpm/action-setup@v4
18 | with:
19 | run_install: true
20 | package_json_file: doc/package.json
21 | - run: pnpm spectral
22 | - run: pnpm lint
23 | - run: pnpm check-format
24 |
--------------------------------------------------------------------------------
/.github/workflows/publish-docs.yml:
--------------------------------------------------------------------------------
1 | name: Publish documentation
2 | on:
3 | push:
4 | branches:
5 | - master
6 | permissions:
7 | contents: read
8 | pages: write
9 | id-token: write
10 | concurrency:
11 | group: pages
12 | cancel-in-progress: true
13 | jobs:
14 | deploy:
15 | environment:
16 | name: github-pages
17 | url: ${{ steps.deployment.outputs.page_url }}
18 | runs-on: ubuntu-latest
19 | defaults:
20 | run:
21 | working-directory: doc
22 | steps:
23 | - uses: actions/checkout@v4
24 | - uses: pnpm/action-setup@v4
25 | with:
26 | package_json_file: doc/package.json
27 | run_install: true
28 | - run: pnpm build
29 | - run: pnpm bundle
30 | - uses: actions/configure-pages@v3
31 | - uses: actions/upload-pages-artifact@v3
32 | with:
33 | path: doc/public
34 | - uses: actions/deploy-pages@v4
35 | id: deployment
36 |
--------------------------------------------------------------------------------
/.github/workflows/reviewable.yml:
--------------------------------------------------------------------------------
1 | name: Reviewable
2 |
3 | on: [pull_request_target]
4 |
5 | jobs:
6 | reviewable:
7 | uses: lichess-org/.github/.github/workflows/reviewable.yml@main
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Lichess API doc & examples
2 |
3 | - [API documentation](https://lichess.org/api)
4 | - [Example code](https://github.com/lichess-org/api/tree/master/example/)
5 | - [Which authentication is right for me](https://github.com/lichess-org/api/tree/master/example/README.md)
6 |
7 | ## Run locally
8 |
9 | ```shell
10 | cd doc
11 | pnpm install
12 | pnpm serve
13 | ```
14 |
15 | Now open . You should see the generated API doc.
16 |
17 | Make modifications to `doc/specs/lichess-api.yaml`, and reload the page to see your changes.
18 |
19 | ### Check the yaml files for syntax errors:
20 |
21 | ```shell
22 | pnpm spectral
23 | pnpm lint
24 | ```
25 |
26 | ### Format the yaml files
27 |
28 | ```shell
29 | pnpm format
30 | ```
31 |
--------------------------------------------------------------------------------
/doc/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | public
3 |
--------------------------------------------------------------------------------
/doc/.prettierignore:
--------------------------------------------------------------------------------
1 | pnpm-lock.yaml
2 |
--------------------------------------------------------------------------------
/doc/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "printWidth": 120
3 | }
4 |
--------------------------------------------------------------------------------
/doc/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lichess-api-doc",
3 | "private": true,
4 | "license": "AGPL-3.0-or-later",
5 | "packageManager": "pnpm@10.0.0+sha512.b8fef5494bd3fe4cbd4edabd0745df2ee5be3e4b0b8b08fa643aa3e4c6702ccc0f00d68fa8a8c9858a735a0032485a44990ed2810526c875e416f001b17df12b",
6 | "devDependencies": {
7 | "@redocly/cli": "^1.34.2",
8 | "@stoplight/spectral-cli": "^6.14.3",
9 | "@stoplight/spectral-rulesets": "1.18.1",
10 | "prettier": "^3.5.3"
11 | },
12 | "scripts": {
13 | "spectral": "spectral lint --fail-severity=warn specs/*.yaml",
14 | "lint": "redocly lint specs/lichess-api.yaml",
15 | "bundle": "redocly bundle specs/lichess-api.yaml --output public/openapi.yaml",
16 | "build": "redocly build-docs specs/lichess-api.yaml --output public/index.html",
17 | "serve": "redocly preview-docs specs/lichess-api.yaml --port 8089",
18 | "format": "prettier . --write",
19 | "check-format": "prettier . --check"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/doc/redocly.yaml:
--------------------------------------------------------------------------------
1 | theme:
2 | openapi:
3 | htmlTemplate: ./template.hbs
4 |
5 | extends:
6 | - recommended-strict
7 |
8 | rules:
9 | operation-4xx-response: off
10 | no-ambiguous-paths: off # 25 warnings, 2024-04-09
11 | # Example ambiguous paths:
12 | # /api/tournament/{id1}/join
13 | # /api/tournament/team-battle/{id2}
14 | # If id1 has value "team-battle", and id2 has value "join",
15 | # these paths would be identical...
16 | no-invalid-schema-examples:
17 | severity: error
18 | allowAdditionalProperties: false
19 |
--------------------------------------------------------------------------------
/doc/specs/examples/account-getMyEmailAddress.json:
--------------------------------------------------------------------------------
1 | {
2 | "email": "bobby@localhost"
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/account-getMyKidModeStatus.json:
--------------------------------------------------------------------------------
1 | {
2 | "kid": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/account-getMyPreferences.json:
--------------------------------------------------------------------------------
1 | {
2 | "prefs": {
3 | "dark": true,
4 | "transp": false,
5 | "bgImg": "https://lichess1.org/assets/lifat/background/gallery/bg19.webp",
6 | "is3d": false,
7 | "theme": "brown",
8 | "pieceSet": "cburnett",
9 | "theme3d": "Woodi",
10 | "pieceSet3d": "Basic",
11 | "soundSet": "standard",
12 | "autoQueen": 2,
13 | "autoThreefold": 3,
14 | "takeback": 3,
15 | "moretime": 3,
16 | "clockTenths": 1,
17 | "clockBar": true,
18 | "clockSound": true,
19 | "premove": true,
20 | "animation": 2,
21 | "pieceNotation": 0,
22 | "captured": true,
23 | "follow": true,
24 | "highlight": true,
25 | "destination": true,
26 | "coords": 1,
27 | "replay": 2,
28 | "challenge": 4,
29 | "message": 3,
30 | "submitMove": 0,
31 | "confirmResign": 1,
32 | "insightShare": 1,
33 | "keyboardMove": 0,
34 | "voiceMove": false,
35 | "zen": 0,
36 | "ratings": 1,
37 | "moveEvent": 2,
38 | "rookCastle": 1
39 | },
40 | "language": "en-US"
41 | }
42 |
--------------------------------------------------------------------------------
/doc/specs/examples/account-setMyKidModeStatus.json:
--------------------------------------------------------------------------------
1 | {
2 | "ok": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/arenas-createArena.json:
--------------------------------------------------------------------------------
1 | {
2 | "nbPlayers": 0,
3 | "duels": [],
4 | "secondsToStart": 300,
5 | "standing": {
6 | "page": 1,
7 | "players": []
8 | },
9 | "id": "Zt9SEhVE",
10 | "createdBy": "bobby",
11 | "startsAt": "2025-05-17T00:44:50.550254451Z",
12 | "system": "arena",
13 | "fullName": "Cvitan Arena",
14 | "minutes": 60,
15 | "perf": {
16 | "key": "blitz",
17 | "name": "Blitz",
18 | "icon": ")"
19 | },
20 | "clock": {
21 | "limit": 300,
22 | "increment": 0
23 | },
24 | "variant": "standard",
25 | "rated": true,
26 | "berserkable": true,
27 | "verdicts": {
28 | "list": [
29 | {
30 | "condition": "Bot players are not allowed",
31 | "verdict": "ok"
32 | }
33 | ],
34 | "accepted": true
35 | },
36 | "quote": {
37 | "text": "Before Geller we did not understand the King's Indian Defence.",
38 | "author": "Mikhail Botvinnik"
39 | },
40 | "greatPlayer": {
41 | "name": "Cvitan",
42 | "url": "https://wikipedia.org/wiki/Ognjen_Cvitan"
43 | },
44 | "myUsername": "Bobby"
45 | }
46 |
--------------------------------------------------------------------------------
/doc/specs/examples/arenas-getResultsOfArena.json:
--------------------------------------------------------------------------------
1 | {
2 | "rank": 1,
3 | "score": 124,
4 | "rating": 2830,
5 | "username": "penguingim1",
6 | "title": "GM",
7 | "flair": "nature.penguin",
8 | "performance": 2873,
9 | "sheet": {
10 | "scores": "2554230000452203303030523003024330543303000305533055330"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/doc/specs/examples/arenas-getTeamArenaTournaments.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "NrJaGvHl",
3 | "createdBy": "natebrady23",
4 | "system": "arena",
5 | "minutes": 60,
6 | "clock": {
7 | "limit": 300,
8 | "increment": 3
9 | },
10 | "rated": false,
11 | "fullName": "BBB Title Arena - Week 126 Arena",
12 | "nbPlayers": 13,
13 | "variant": {
14 | "key": "standard",
15 | "short": "Std",
16 | "name": "Standard"
17 | },
18 | "startsAt": 1747186200000,
19 | "finishesAt": 1747189800000,
20 | "status": 30,
21 | "perf": {
22 | "key": "blitz",
23 | "name": "Blitz",
24 | "position": 1,
25 | "icon": ")"
26 | },
27 | "teamMember": "bradys-blunder-buddies",
28 | "winner": {
29 | "name": "TheCheesemate",
30 | "flair": "food-drink.cheese-wedge",
31 | "id": "thecheesemate"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/doc/specs/examples/arenas-getTournamentsCreatedByUser.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "NrJaGvHl",
3 | "createdBy": "natebrady23",
4 | "system": "arena",
5 | "minutes": 60,
6 | "clock": {
7 | "limit": 300,
8 | "increment": 3
9 | },
10 | "rated": false,
11 | "fullName": "BBB Title Arena - Week 126 Arena",
12 | "nbPlayers": 13,
13 | "variant": {
14 | "key": "standard",
15 | "short": "Std",
16 | "name": "Standard"
17 | },
18 | "startsAt": 1747186200000,
19 | "finishesAt": 1747189800000,
20 | "status": 30,
21 | "perf": {
22 | "key": "blitz",
23 | "name": "Blitz",
24 | "position": 1,
25 | "icon": ")"
26 | },
27 | "teamMember": "bradys-blunder-buddies",
28 | "winner": {
29 | "name": "TheCheesemate",
30 | "flair": "food-drink.cheese-wedge",
31 | "id": "thecheesemate"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/doc/specs/examples/arenas-getTournamentsPlayedByUser.json:
--------------------------------------------------------------------------------
1 | {
2 | "tournament": {
3 | "id": "JbdQe217",
4 | "createdBy": "cormacobear",
5 | "system": "arena",
6 | "minutes": 240,
7 | "clock": {
8 | "limit": 180,
9 | "increment": 0
10 | },
11 | "rated": true,
12 | "fullName": "Lichess 2025 MSF Charity Campaign",
13 | "nbPlayers": 3753,
14 | "variant": {
15 | "key": "standard",
16 | "short": "Std",
17 | "name": "Standard"
18 | },
19 | "startsAt": 1746295200000,
20 | "finishesAt": 1746309600000,
21 | "status": 30,
22 | "perf": {
23 | "key": "blitz",
24 | "name": "Blitz",
25 | "position": 1,
26 | "icon": ")"
27 | },
28 | "minRatedGames": {
29 | "nb": 20
30 | },
31 | "schedule": {
32 | "freq": "unique",
33 | "speed": "superBlitz"
34 | }
35 | },
36 | "player": {
37 | "games": 8,
38 | "score": 7,
39 | "rank": 1503
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/doc/specs/examples/arenas-updateArena.json:
--------------------------------------------------------------------------------
1 | {
2 | "nbPlayers": 0,
3 | "duels": [],
4 | "secondsToStart": 300,
5 | "standing": {
6 | "page": 1,
7 | "players": []
8 | },
9 | "id": "Zt9SEhVE",
10 | "createdBy": "bobby",
11 | "startsAt": "2025-05-17T00:44:50.55Z",
12 | "system": "arena",
13 | "fullName": "Updated Arena Arena",
14 | "minutes": 60,
15 | "perf": {
16 | "key": "blitz",
17 | "name": "Blitz",
18 | "icon": ")"
19 | },
20 | "clock": {
21 | "limit": 300,
22 | "increment": 0
23 | },
24 | "variant": "standard",
25 | "rated": true,
26 | "berserkable": true,
27 | "verdicts": {
28 | "list": [
29 | {
30 | "condition": "Bot players are not allowed",
31 | "verdict": "ok"
32 | }
33 | ],
34 | "accepted": true
35 | },
36 | "quote": {
37 | "text": "Few things are as psychologically brutal as chess.",
38 | "author": "Garry Kasparov"
39 | },
40 | "myUsername": "Bobby"
41 | }
42 |
--------------------------------------------------------------------------------
/doc/specs/examples/broadcasts-createBroadcastRound.json:
--------------------------------------------------------------------------------
1 | {
2 | "round": {
3 | "id": "6j92xrwH",
4 | "name": "Final Round",
5 | "slug": "final-round",
6 | "createdAt": 1745619386270,
7 | "ongoing": true,
8 | "startsAt": 1745619386270,
9 | "rated": true,
10 | "url": "https://lichess.org/broadcast/knight-invitational/final-round/6j92xrwH"
11 | },
12 | "tour": {
13 | "id": "ZEB4BtHU",
14 | "name": "Knight Invitational",
15 | "slug": "knight-invitational",
16 | "info": {},
17 | "createdAt": 1745619386114,
18 | "url": "https://lichess.org/broadcast/knight-invitational/ZEB4BtHU",
19 | "tier": 5,
20 | "dates": [1745622986125]
21 | },
22 | "study": {
23 | "writeable": true
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/doc/specs/examples/broadcasts-createBroadcastTournament.json:
--------------------------------------------------------------------------------
1 | {
2 | "tour": {
3 | "id": "ZEB4BtHU",
4 | "name": "Knight Invitational",
5 | "slug": "knight-invitational",
6 | "info": {},
7 | "createdAt": 1745619386114,
8 | "url": "https://lichess.org/broadcast/knight-invitational/ZEB4BtHU",
9 | "tier": 5
10 | },
11 | "rounds": []
12 | }
13 |
--------------------------------------------------------------------------------
/doc/specs/examples/broadcasts-exportOneRoundAsPgn.pgn.yaml:
--------------------------------------------------------------------------------
1 | value: |
2 | [Event "Knight Invitational"]
3 | [Site "https://lichess.org/broadcast/-/-/6j92xrwH"]
4 | [White "Player 1"]
5 | [Black "Player 2"]
6 | [Result "*"]
7 | [Variant "Standard"]
8 | [ECO "C20"]
9 | [Opening "King's Pawn Game"]
10 | [Annotator "https://lichess.org/broadcast/-/-/6j92xrwH"]
11 | [StudyName "Final Round 2"]
12 | [ChapterName "Player 1 - Player 2"]
13 | [UTCDate "2025.04.25"]
14 | [UTCTime "22:16:26"]
15 |
16 | 1. e4 e5 *
17 |
18 |
19 | [Event "Knight Invitational"]
20 | [Site "https://lichess.org/broadcast/-/-/6j92xrwH"]
21 | [White "Player 3"]
22 | [Black "Player 4"]
23 | [Result "*"]
24 | [Variant "Standard"]
25 | [ECO "D00"]
26 | [Opening "Queen's Pawn Game"]
27 | [Annotator "https://lichess.org/broadcast/-/-/6j92xrwH"]
28 | [StudyName "Final Round 2"]
29 | [ChapterName "Player 3 - Player 4"]
30 | [UTCDate "2025.04.25"]
31 | [UTCTime "22:16:26"]
32 |
33 | 1. d4 d5 *
34 |
--------------------------------------------------------------------------------
/doc/specs/examples/broadcasts-getBroadcastsCreatedByUser.json:
--------------------------------------------------------------------------------
1 | {
2 | "currentPage": 1,
3 | "maxPerPage": 24,
4 | "currentPageResults": [
5 | {
6 | "tour": {
7 | "id": "qZf4ab2u",
8 | "name": "Bobby's Tournament",
9 | "slug": "bobbys-tournament",
10 | "info": {
11 | "format": "5-round Swiss",
12 | "location": "Chess Club"
13 | },
14 | "createdAt": 1745619386317,
15 | "url": "https://lichess.org/broadcast/bobbys-tournament/qZf4ab2u"
16 | }
17 | }
18 | ],
19 | "previousPage": null,
20 | "nextPage": null,
21 | "nbResults": 1,
22 | "nbPages": 1
23 | }
24 |
--------------------------------------------------------------------------------
/doc/specs/examples/broadcasts-getPaginatedToBroadcastPreviews.json:
--------------------------------------------------------------------------------
1 | {
2 | "active": [
3 | {
4 | "tour": {
5 | "id": "ZEB4BtHU",
6 | "name": "Knight Invitational",
7 | "slug": "knight-invitational",
8 | "info": {},
9 | "createdAt": 1745619386114,
10 | "url": "https://lichess.org/broadcast/knight-invitational/ZEB4BtHU",
11 | "tier": 5,
12 | "dates": [1745619386270]
13 | },
14 | "round": {
15 | "id": "lXnKRxIP",
16 | "name": "Round 1",
17 | "slug": "round-1",
18 | "createdAt": 1745619386133,
19 | "ongoing": true,
20 | "startsAt": 1745622986125,
21 | "rated": true,
22 | "url": "https://lichess.org/broadcast/knight-invitational/round-1/lXnKRxIP"
23 | }
24 | }
25 | ],
26 | "upcoming": [],
27 | "past": {
28 | "currentPage": 1,
29 | "maxPerPage": 24,
30 | "currentPageResults": [],
31 | "previousPage": null,
32 | "nextPage": null
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/doc/specs/examples/broadcasts-getPlayersOfBroadcastTournament.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "Player 1",
4 | "played": 0
5 | },
6 | {
7 | "name": "Player 2",
8 | "played": 0
9 | },
10 | {
11 | "name": "Player 3",
12 | "played": 0
13 | },
14 | {
15 | "name": "Player 4",
16 | "played": 0
17 | }
18 | ]
19 |
--------------------------------------------------------------------------------
/doc/specs/examples/broadcasts-getYourBroadcastRounds.json:
--------------------------------------------------------------------------------
1 | {
2 | "round": {
3 | "id": "6j92xrwH",
4 | "name": "Final Round 2",
5 | "slug": "final-round-2",
6 | "createdAt": 1745619386270,
7 | "ongoing": true,
8 | "startsAt": 1745619386270,
9 | "rated": true,
10 | "url": "https://lichess.org/broadcast/knight-invitational-2/final-round-2/6j92xrwH"
11 | },
12 | "tour": {
13 | "id": "ZEB4BtHU",
14 | "name": "Knight Invitational 2",
15 | "slug": "knight-invitational-2",
16 | "info": {},
17 | "createdAt": 1745619386114,
18 | "url": "https://lichess.org/broadcast/knight-invitational-2/ZEB4BtHU",
19 | "dates": [1745619386270]
20 | },
21 | "study": {
22 | "writeable": true
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/doc/specs/examples/broadcasts-pushPgnToBroadcastRound.json:
--------------------------------------------------------------------------------
1 | {
2 | "games": [
3 | {
4 | "tags": {
5 | "White": "Player 1",
6 | "Black": "Player 2",
7 | "Result": "*",
8 | "Event": "Knight Invitational"
9 | },
10 | "moves": 2
11 | },
12 | {
13 | "tags": {
14 | "White": "Player 3",
15 | "Black": "Player 4",
16 | "Result": "*",
17 | "Event": "Knight Invitational"
18 | },
19 | "moves": 2
20 | }
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/doc/specs/examples/broadcasts-resetBroadcastRound.json:
--------------------------------------------------------------------------------
1 | {
2 | "ok": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/broadcasts-searchBroadcasts.json:
--------------------------------------------------------------------------------
1 | {
2 | "currentPage": 1,
3 | "maxPerPage": 24,
4 | "currentPageResults": [
5 | {
6 | "tour": {
7 | "id": "sO7W9Jje",
8 | "name": "Knight Invitational",
9 | "slug": "knight-invitational",
10 | "info": {},
11 | "createdAt": 1746738601405,
12 | "url": "https://lichess.org/broadcast/knight-invitational/sO7W9Jje",
13 | "tier": 5,
14 | "dates": [1746738601684]
15 | },
16 | "round": {
17 | "id": "6qYaFbEv",
18 | "name": "Final Round",
19 | "slug": "final-round",
20 | "createdAt": 1746738601684,
21 | "ongoing": true,
22 | "startsAt": 1746738601684,
23 | "rated": true,
24 | "url": "https://lichess.org/broadcast/knight-invitational/final-round/6qYaFbEv"
25 | }
26 | }
27 | ],
28 | "previousPage": null,
29 | "nextPage": null
30 | }
31 |
--------------------------------------------------------------------------------
/doc/specs/examples/broadcasts-streamOngoingBroadcastRoundAsPgn.pgn.yaml:
--------------------------------------------------------------------------------
1 | value: |
2 | [Event "Knight Invitational"]
3 | [Site "https://lichess.org/study/6j92xrwH/0APpZxve"]
4 | [White "Player 1"]
5 | [Black "Player 2"]
6 | [Result "*"]
7 | [Variant "Standard"]
8 | [ECO "C20"]
9 | [Opening "King's Pawn Game"]
10 | [Annotator "https://lichess.org/broadcast/-/-/6j92xrwH"]
11 | [StudyName "Final Round 2"]
12 | [ChapterName "Player 1 - Player 2"]
13 | [UTCDate "2025.04.25"]
14 | [UTCTime "22:16:26"]
15 |
16 | 1. e4 e5 *
17 |
18 |
19 | [Event "Knight Invitational"]
20 | [Site "https://lichess.org/study/6j92xrwH/GzjMltBk"]
21 | [White "Player 3"]
22 | [Black "Player 4"]
23 | [Result "*"]
24 | [Variant "Standard"]
25 | [ECO "D00"]
26 | [Opening "Queen's Pawn Game"]
27 | [Annotator "https://lichess.org/broadcast/-/-/6j92xrwH"]
28 | [StudyName "Final Round 2"]
29 | [ChapterName "Player 3 - Player 4"]
30 | [UTCDate "2025.04.25"]
31 | [UTCTime "22:16:26"]
32 |
33 | 1. d4 d5 *
34 |
--------------------------------------------------------------------------------
/doc/specs/examples/broadcasts-updateBroadcastTournament.json:
--------------------------------------------------------------------------------
1 | {
2 | "ok": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/challenges-acceptChallenge.json:
--------------------------------------------------------------------------------
1 | {
2 | "ok": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/challenges-addTimeToOpponent.json:
--------------------------------------------------------------------------------
1 | {
2 | "ok": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/challenges-adminChallengeTokens.json:
--------------------------------------------------------------------------------
1 | {
2 | "bobby": "lip_UApWGQEPAy2fn2sneRLL",
3 | "boris": "lip_OqjzF0daIQ42uEOfUmPO",
4 | "mary": "lip_p40VbmcuQ54qnyDtpSSX"
5 | }
6 |
--------------------------------------------------------------------------------
/doc/specs/examples/challenges-cancelChallenge.json:
--------------------------------------------------------------------------------
1 | {
2 | "ok": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/challenges-challengeAi.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "FLuFXFzs",
3 | "variant": {
4 | "key": "standard",
5 | "name": "Standard",
6 | "short": "Std"
7 | },
8 | "speed": "correspondence",
9 | "perf": "correspondence",
10 | "rated": false,
11 | "fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
12 | "turns": 0,
13 | "source": "ai",
14 | "status": {
15 | "id": 20,
16 | "name": "started"
17 | },
18 | "createdAt": 1747312530755,
19 | "player": "white",
20 | "fullId": "FLuFXFzs4NSG"
21 | }
22 |
--------------------------------------------------------------------------------
/doc/specs/examples/challenges-createChallenge.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "1jqMGJOv",
3 | "url": "https://lichess.org/1jqMGJOv",
4 | "status": "created",
5 | "challenger": {
6 | "id": "bobby",
7 | "name": "Bobby",
8 | "rating": 1612,
9 | "title": null
10 | },
11 | "destUser": {
12 | "id": "mary",
13 | "name": "Mary",
14 | "rating": 1064,
15 | "title": null,
16 | "flair": "objects.notebook"
17 | },
18 | "variant": {
19 | "key": "standard",
20 | "name": "Standard",
21 | "short": "Std"
22 | },
23 | "rated": false,
24 | "speed": "correspondence",
25 | "timeControl": {
26 | "type": "unlimited"
27 | },
28 | "color": "random",
29 | "finalColor": "white",
30 | "perf": {
31 | "icon": "",
32 | "name": "Correspondence"
33 | },
34 | "direction": "out"
35 | }
36 |
--------------------------------------------------------------------------------
/doc/specs/examples/challenges-declineChallenge.json:
--------------------------------------------------------------------------------
1 | {
2 | "ok": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/challenges-listYourChallenges.json:
--------------------------------------------------------------------------------
1 | {
2 | "in": [
3 | {
4 | "id": "1jqMGJOv",
5 | "url": "https://lichess.org/1jqMGJOv",
6 | "status": "created",
7 | "challenger": {
8 | "id": "bobby",
9 | "name": "Bobby",
10 | "rating": 1612,
11 | "title": null
12 | },
13 | "destUser": {
14 | "id": "mary",
15 | "name": "Mary",
16 | "rating": 1064,
17 | "title": null,
18 | "flair": "objects.notebook"
19 | },
20 | "variant": {
21 | "key": "standard",
22 | "name": "Standard",
23 | "short": "Std"
24 | },
25 | "rated": false,
26 | "speed": "correspondence",
27 | "timeControl": {
28 | "type": "unlimited"
29 | },
30 | "color": "random",
31 | "finalColor": "white",
32 | "perf": {
33 | "icon": "",
34 | "name": "Correspondence"
35 | },
36 | "direction": "in"
37 | }
38 | ],
39 | "out": []
40 | }
41 |
--------------------------------------------------------------------------------
/doc/specs/examples/challenges-openEndedChallenge.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "XaP00j5r",
3 | "url": "https://lichess.org/XaP00j5r",
4 | "status": "created",
5 | "challenger": null,
6 | "destUser": null,
7 | "variant": {
8 | "key": "standard",
9 | "name": "Standard",
10 | "short": "Std"
11 | },
12 | "rated": false,
13 | "speed": "correspondence",
14 | "timeControl": {
15 | "type": "unlimited"
16 | },
17 | "color": "random",
18 | "finalColor": "black",
19 | "perf": {
20 | "icon": "",
21 | "name": "Correspondence"
22 | },
23 | "open": {},
24 | "urlWhite": "https://lichess.org/XaP00j5r?color=white",
25 | "urlBlack": "https://lichess.org/XaP00j5r?color=black"
26 | }
27 |
--------------------------------------------------------------------------------
/doc/specs/examples/challenges-showOneChallenge.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "1jqMGJOv",
3 | "url": "https://lichess.org/1jqMGJOv",
4 | "status": "created",
5 | "challenger": {
6 | "id": "bobby",
7 | "name": "Bobby",
8 | "rating": 1612,
9 | "title": null
10 | },
11 | "destUser": {
12 | "id": "mary",
13 | "name": "Mary",
14 | "rating": 1064,
15 | "title": null,
16 | "flair": "objects.notebook"
17 | },
18 | "variant": {
19 | "key": "standard",
20 | "name": "Standard",
21 | "short": "Std"
22 | },
23 | "rated": false,
24 | "speed": "correspondence",
25 | "timeControl": {
26 | "type": "unlimited"
27 | },
28 | "color": "random",
29 | "finalColor": "white",
30 | "perf": {
31 | "icon": "",
32 | "name": "Correspondence"
33 | },
34 | "direction": "in"
35 | }
36 |
--------------------------------------------------------------------------------
/doc/specs/examples/challenges-startClocks.json:
--------------------------------------------------------------------------------
1 | {
2 | "ok": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/externalEngine-acquireAnalysisRequest.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "CNI9hZcXle9phmV5",
3 | "work": {
4 | "sessionId": "1",
5 | "threads": 1,
6 | "hash": 2048,
7 | "depth": 1,
8 | "multiPv": 1,
9 | "variant": "chess",
10 | "initialFen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
11 | "moves": ["e2e4", "g8f6"]
12 | },
13 | "engine": {
14 | "id": "eei_n7icubLdRJYm",
15 | "name": "Stockfish 17.1",
16 | "clientSecret": "ees_rR288clqHjNElDiP",
17 | "userId": "bobby",
18 | "maxThreads": 8,
19 | "maxHash": 2048,
20 | "variants": ["chess"],
21 | "providerData": null
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/doc/specs/examples/externalEngine-analyseWithExternalEngine.json:
--------------------------------------------------------------------------------
1 | {
2 | "time": 2,
3 | "depth": 1,
4 | "nodes": 20,
5 | "pvs": [
6 | {
7 | "moves": [],
8 | "cp": 13,
9 | "depth": 1
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/doc/specs/examples/externalEngine-createExternalEngine.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "eei_n7icubLdRJYm",
3 | "name": "Stockfish 17",
4 | "userId": "bobby",
5 | "maxThreads": 8,
6 | "maxHash": 2048,
7 | "variants": ["chess"],
8 | "providerData": null,
9 | "clientSecret": "ees_rR288clqHjNElDiP"
10 | }
11 |
--------------------------------------------------------------------------------
/doc/specs/examples/externalEngine-deleteExternalEngine.json:
--------------------------------------------------------------------------------
1 | {
2 | "ok": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/externalEngine-getExternalEngine.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "eei_n7icubLdRJYm",
3 | "name": "Stockfish 17",
4 | "userId": "bobby",
5 | "maxThreads": 8,
6 | "maxHash": 2048,
7 | "variants": ["chess"],
8 | "providerData": null,
9 | "clientSecret": "ees_rR288clqHjNElDiP"
10 | }
11 |
--------------------------------------------------------------------------------
/doc/specs/examples/externalEngine-listExternalEngines.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "eei_n7icubLdRJYm",
4 | "name": "Stockfish 17",
5 | "userId": "bobby",
6 | "maxThreads": 8,
7 | "maxHash": 2048,
8 | "variants": ["chess"],
9 | "providerData": null,
10 | "clientSecret": "ees_rR288clqHjNElDiP"
11 | }
12 | ]
13 |
--------------------------------------------------------------------------------
/doc/specs/examples/externalEngine-updateExternalEngine.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "eei_n7icubLdRJYm",
3 | "name": "Stockfish 17.1",
4 | "userId": "bobby",
5 | "maxThreads": 8,
6 | "maxHash": 2048,
7 | "variants": ["chess"],
8 | "providerData": null,
9 | "clientSecret": "ees_rR288clqHjNElDiP"
10 | }
11 |
--------------------------------------------------------------------------------
/doc/specs/examples/fide-getFidePlayer-nullYear.json.yaml:
--------------------------------------------------------------------------------
1 | value: { "id": 8700761, "name": "Hampus, Sorensen", "federation": "ZAM", "year": null }
2 |
--------------------------------------------------------------------------------
/doc/specs/examples/fide-getFidePlayer.json.yaml:
--------------------------------------------------------------------------------
1 | value:
2 | {
3 | "id": 35009192,
4 | "name": "Erigaisi Arjun",
5 | "federation": "IND",
6 | "year": 2003,
7 | "title": "GM",
8 | "standard": 2782,
9 | "rapid": 2708,
10 | "blitz": 2738,
11 | }
12 |
--------------------------------------------------------------------------------
/doc/specs/examples/fide-searchFidePlayers.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": 35009192,
4 | "name": "Erigaisi Arjun",
5 | "federation": "IND",
6 | "year": 2003,
7 | "title": "GM",
8 | "standard": 2782,
9 | "rapid": 2708,
10 | "blitz": 2738
11 | },
12 | {
13 | "id": 35009060,
14 | "name": "Erigaisi Keerthana",
15 | "federation": "IND",
16 | "year": 2002
17 | }
18 | ]
19 |
--------------------------------------------------------------------------------
/doc/specs/examples/games-gamesExportIds.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "TJxUmbWK",
3 | "rated": true,
4 | "variant": "standard",
5 | "speed": "rapid",
6 | "perf": "rapid",
7 | "createdAt": 1504125627542,
8 | "lastMoveAt": 1504126012148,
9 | "status": "resign",
10 | "source": "arena",
11 | "players": {
12 | "white": {
13 | "user": {
14 | "name": "arex",
15 | "patron": true,
16 | "id": "arex"
17 | },
18 | "rating": 1627,
19 | "ratingDiff": 15
20 | },
21 | "black": {
22 | "user": {
23 | "name": "JERC-12Jesus",
24 | "id": "jerc-12jesus"
25 | },
26 | "rating": 1740,
27 | "ratingDiff": -15
28 | }
29 | },
30 | "winner": "white",
31 | "opening": {
32 | "eco": "B07",
33 | "name": "Pirc Defense",
34 | "ply": 6
35 | },
36 | "moves": "e4 d6 d4 Nf6 Nc3 g6 Bd3 Bg7 Be3 O-O Qd2 Ng4 O-O-O Nxe3 Qxe3 Nd7 f4 Nf6 h3 c6 g4 Qb6 Nf3 c5 dxc5 Qxc5 Qxc5 dxc5 e5 Nd7 Nd5 e6 Ne7+ Kh8 Bb5 a6 Bxd7 Bxd7 Rxd7 Rfe8 Rxb7",
37 | "tournament": "Xg7M4och",
38 | "clock": {
39 | "initial": 600,
40 | "increment": 0,
41 | "totalTime": 600
42 | },
43 | "division": {
44 | "middle": 22
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/doc/specs/examples/oauth-testMultipleOauthTokens-request.txt.yaml:
--------------------------------------------------------------------------------
1 | value: |
2 | lip_jose,lip_badToken
3 |
--------------------------------------------------------------------------------
/doc/specs/examples/oauth-testMultipleOauthTokens.json:
--------------------------------------------------------------------------------
1 | {
2 | "lip_jose": {
3 | "userId": "jose",
4 | "scopes": "preference:read,preference:write,email:read,challenge:read,challenge:write,challenge:bulk,study:read,study:write,tournament:write,racer:write,puzzle:read,puzzle:write,team:read,team:write,team:lead,follow:read,follow:write,msg:write,board:play,bot:play,engine:read,engine:write,web:login,web:mod",
5 | "expires": null
6 | },
7 | "lip_badToken": null
8 | }
9 |
--------------------------------------------------------------------------------
/doc/specs/examples/openingExplorer-otbMasterGame.pgn.yaml:
--------------------------------------------------------------------------------
1 | value: |
2 | [Event "Wch Blitz"]
3 | [Site "Astana"]
4 | [Date "2012.07.10"]
5 | [Round "23"]
6 | [White "Carlsen, Magnus"]
7 | [Black "Chadaev, Nikolay"]
8 | [Result "1-0"]
9 | [WhiteElo "2837"]
10 | [BlackElo "2580"]
11 |
12 | 1. e4 e5 2. f4 d5 3. exd5 exf4 4. Nf3 Nf6 5. c4 c6 6. d4 cxd5 7. c5 Nc6 8. Bb5 Be7 9. O-O O-O 10. Bxf4 Bg4 11. Nc3 Ne4 12. Qd3 Bf5 13. Qe3 Bf6 14. Bxc6 bxc6 15. Ne5 Bxe5 16. Bxe5 Bg6 17. Nxe4 Bxe4 18. Qg3 f6 19. Bd6 Re8 20. b4 Bg6 21. a4 a6 22. h4 Qd7 23. h5 Bxh5 24. Rxf6 Qg4 25. Qxg4 Bxg4 26. Rf4 Bh5 27. Raf1 h6 28. Be5 Ra7 29. b5 axb5 30. axb5 cxb5 31. c6 Raa8 32. c7 Kh7 33. Rb1 Be2 34. Rf7 Rg8 35. Re7 Bc4 36. Kh2 Rae8 37. Rd7 Ra8 38. Rb2 Raf8 39. g4 Ra8 40. Rf2 b4 41. Rff7 h5 42. Rxg7+ Rxg7 43. Rxg7+ 1-0
13 |
--------------------------------------------------------------------------------
/doc/specs/examples/puzzles-createAndJoinPuzzleRace.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "aU5t3",
3 | "url": "https://lichess.org/racer/aU5t3"
4 | }
5 |
--------------------------------------------------------------------------------
/doc/specs/examples/puzzles-getDailyPuzzle.json:
--------------------------------------------------------------------------------
1 | {
2 | "game": {
3 | "id": "HcVUWf38",
4 | "perf": {
5 | "key": "rapid",
6 | "name": "Rapid"
7 | },
8 | "rated": true,
9 | "players": [
10 | {
11 | "name": "ajdin_derlic",
12 | "id": "ajdin_derlic",
13 | "color": "white",
14 | "rating": 1908
15 | },
16 | {
17 | "name": "magnusrex",
18 | "id": "magnusrex",
19 | "color": "black",
20 | "rating": 1843
21 | }
22 | ],
23 | "pgn": "e4 d5 exd5 Nf6 c4 e6 dxe6 Bxe6 Nc3 Nc6 Nf3 Bc5 h3 Qe7 Be2 Bxc4 O-O O-O-O Bxc4 Nd4 Nxd4 Rxd4 Bb3 g5 Re1 Qd7 Bc2 g4 hxg4 Nxg4 Re4",
24 | "clock": "5+5"
25 | },
26 | "puzzle": {
27 | "id": "OT8q6",
28 | "rating": 1837,
29 | "plays": 105506,
30 | "solution": ["g4f2", "d1h5", "f2e4"],
31 | "themes": ["middlegame", "short", "advantage"],
32 | "initialPly": 30
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/doc/specs/examples/puzzles-getNewPuzzle.json:
--------------------------------------------------------------------------------
1 | {
2 | "game": {
3 | "id": "HCQantrf",
4 | "perf": {
5 | "key": "bullet",
6 | "name": "Bullet"
7 | },
8 | "rated": true,
9 | "players": [
10 | {
11 | "name": "AB123456",
12 | "id": "ab123456",
13 | "color": "white",
14 | "rating": 1998
15 | },
16 | {
17 | "name": "taha_arowana",
18 | "id": "taha_arowana",
19 | "color": "black",
20 | "rating": 1935
21 | }
22 | ],
23 | "pgn": "d4 Nf6 c4 e6 Nf3 Be7 Nc3 O-O g3 b6 Bg2 Bb7 O-O c6 Qc2 d5 Bg5 Nbd7 cxd5 Nxd5 Bxe7 Nxe7 Ng5 Ng6 h4 Rc8 Rac1 h6 Nge4 Nxh4 gxh4 Qxh4 Ng3 f5 Qb3 Rf6 e4 f4 e5 Rg6 Nce4 fxg3 fxg3 Qe7 Nd6 Rb8 Nxb7 Rxb7 Bxc6 Rb8 Be4 Rg5 Qf3 Rf8 Qe3 Rg4 Kg2 Qh4 Bb1 Qe7 Rxf8+ Nxf8 Rf1 h5 Qd3 h4",
24 | "clock": "2+1"
25 | },
26 | "puzzle": {
27 | "id": "oH5Ar",
28 | "rating": 1756,
29 | "plays": 11281,
30 | "solution": ["f1f8", "g8f8", "d3f3", "f8e8", "f3g4"],
31 | "themes": ["endgame", "crushing", "attraction", "fork", "long", "sacrifice"],
32 | "initialPly": 65
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/doc/specs/examples/puzzles-getPuzzleById.json:
--------------------------------------------------------------------------------
1 | {
2 | "game": {
3 | "id": "AHGPPS44",
4 | "perf": {
5 | "key": "blitz",
6 | "name": "Blitz"
7 | },
8 | "rated": true,
9 | "players": [
10 | {
11 | "name": "EricRosen",
12 | "title": "IM",
13 | "flair": "travel-places.ambulance",
14 | "patron": true,
15 | "id": "ericrosen",
16 | "color": "white",
17 | "rating": 2642
18 | },
19 | {
20 | "name": "Anton_Volovikov",
21 | "title": "FM",
22 | "id": "anton_volovikov",
23 | "color": "black",
24 | "rating": 2619
25 | }
26 | ],
27 | "pgn": "d4 d5 Bf4 Bf5 Nf3 e6 c4 Nf6 Nc3 Bd6 Bg3 Nbd7 e3 O-O c5 Bxg3 hxg3 h6 Bd3 Ne4 Qc2 Ndf6 Nd2 Nxc3 Bxf5 exf5 bxc3 Ne4 Nxe4 fxe4 Rb1 b6 Rh5 bxc5 Rb5 cxd4 cxd4 c6 Qxc6 Rc8 Qxd5 Qf6 Qxe4 Rc1+ Ke2 Qa6 Qd5 Rc2+ Kf3 g6 Rxh6 Qf6+ Ke4",
28 | "clock": "3+0"
29 | },
30 | "puzzle": {
31 | "id": "PSjmf",
32 | "rating": 2708,
33 | "plays": 674,
34 | "solution": ["g8g7", "d5e5", "f6e5"],
35 | "themes": ["endgame", "master", "short", "masterVsMaster", "crushing"],
36 | "initialPly": 52
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/doc/specs/examples/puzzles-getPuzzlesToReplay.json:
--------------------------------------------------------------------------------
1 | {
2 | "replay": {
3 | "days": 90,
4 | "theme": "mix",
5 | "nb": 6,
6 | "remaining": ["0e7Q3", "1EFXE", "C3VR4", "0UIdY", "E27v9", "3rPs6"]
7 | },
8 | "angle": {
9 | "key": "mix",
10 | "name": "Puzzle Themes",
11 | "desc": "A mix of everything. You don't know what to expect, so you remain ready for anything! Just like in real games."
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/doc/specs/examples/puzzles-getStormDashboardOfPlayer.json:
--------------------------------------------------------------------------------
1 | {
2 | "high": {
3 | "day": 0,
4 | "week": 0,
5 | "month": 0,
6 | "allTime": 33
7 | },
8 | "days": [
9 | {
10 | "_id": "2025/2/8",
11 | "moves": 1,
12 | "errors": 0,
13 | "highest": 1020,
14 | "score": 1,
15 | "runs": 1,
16 | "combo": 1,
17 | "time": 180
18 | },
19 | {
20 | "_id": "2025/1/23",
21 | "moves": 35,
22 | "errors": 3,
23 | "highest": 1314,
24 | "score": 17,
25 | "runs": 1,
26 | "combo": 17,
27 | "time": 164
28 | },
29 | {
30 | "_id": "2024/12/11",
31 | "moves": 41,
32 | "errors": 6,
33 | "highest": 1315,
34 | "score": 16,
35 | "runs": 1,
36 | "combo": 20,
37 | "time": 141
38 | }
39 | ]
40 | }
41 |
--------------------------------------------------------------------------------
/doc/specs/examples/puzzles-getYourPuzzleActivity.json:
--------------------------------------------------------------------------------
1 | {
2 | "date": 1745994457811,
3 | "win": true,
4 | "puzzle": {
5 | "id": "74O1b",
6 | "rating": 1362,
7 | "plays": 28182,
8 | "solution": ["e4e3", "h6g6", "g8g6"],
9 | "themes": ["middlegame", "short", "advantage"],
10 | "fen": "6rk/p3p2p/5pbQ/1B6/Pn1Pp3/1Pq5/2P2PP1/1KR4R b - - 1 1",
11 | "lastMove": "d1c1"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/doc/specs/examples/relations-blockPlayer.json:
--------------------------------------------------------------------------------
1 | {
2 | "ok": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/relations-followPlayer.json:
--------------------------------------------------------------------------------
1 | {
2 | "ok": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/relations-unblockPlayer.json:
--------------------------------------------------------------------------------
1 | {
2 | "ok": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/relations-unfollowPlayer.json:
--------------------------------------------------------------------------------
1 | {
2 | "ok": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/stream-challenge.json.yaml:
--------------------------------------------------------------------------------
1 | value:
2 | {
3 | "type": "challenge",
4 | "challenge":
5 | {
6 | "id": "HVGoj16M",
7 | "url": "https://lichess.org/HVGoj16M",
8 | "status": "created",
9 | "challenger": { "id": "adriana", "name": "Adriana", "rating": 584, "title": null },
10 | "destUser":
11 | {
12 | "id": "gabriela",
13 | "name": "Gabriela",
14 | "rating": 1569,
15 | "title": null,
16 | "flair": "people.pregnant-person-light-skin-tone",
17 | "online": true,
18 | },
19 | "variant": { "key": "standard", "name": "Standard", "short": "Std" },
20 | "rated": false,
21 | "speed": "correspondence",
22 | "timeControl": { "type": "unlimited" },
23 | "color": "random",
24 | "finalColor": "black",
25 | "perf": { "icon": "", "name": "Correspondence" },
26 | },
27 | "compat": { "bot": false, "board": true },
28 | }
29 |
--------------------------------------------------------------------------------
/doc/specs/examples/stream-challengeCanceled.json.yaml:
--------------------------------------------------------------------------------
1 | value:
2 | {
3 | "type": "challengeCanceled",
4 | "challenge":
5 | {
6 | "id": "vN6JvOli",
7 | "url": "https://lichess.org/vN6JvOli",
8 | "status": "canceled",
9 | "challenger": { "id": "elena", "name": "Elena", "rating": 2308, "title": "WIM", "patron": true },
10 | "destUser":
11 | {
12 | "id": "diego",
13 | "name": "Diego",
14 | "rating": 1941,
15 | "title": null,
16 | "flair": "smileys.winking-face-with-tongue",
17 | },
18 | "variant": { "key": "standard", "name": "Standard", "short": "Std" },
19 | "rated": false,
20 | "speed": "correspondence",
21 | "timeControl": { "type": "unlimited" },
22 | "color": "random",
23 | "finalColor": "white",
24 | "perf": { "icon": "", "name": "Correspondence" },
25 | },
26 | }
27 |
--------------------------------------------------------------------------------
/doc/specs/examples/stream-challengeDeclined.json.yaml:
--------------------------------------------------------------------------------
1 | value:
2 | {
3 | "type": "challengeDeclined",
4 | "challenge":
5 | {
6 | "id": "HVGoj16M",
7 | "url": "https://lichess.org/HVGoj16M",
8 | "status": "declined",
9 | "challenger": { "id": "adriana", "name": "Adriana", "rating": 584, "title": null },
10 | "destUser":
11 | {
12 | "id": "gabriela",
13 | "name": "Gabriela",
14 | "rating": 1569,
15 | "title": null,
16 | "flair": "people.pregnant-person-light-skin-tone",
17 | "online": true,
18 | },
19 | "variant": { "key": "standard", "name": "Standard", "short": "Std" },
20 | "rated": false,
21 | "speed": "correspondence",
22 | "timeControl": { "type": "unlimited" },
23 | "color": "random",
24 | "finalColor": "black",
25 | "perf": { "icon": "", "name": "Correspondence" },
26 | "declineReason": "I'm not accepting challenges at the moment.",
27 | "declineReasonKey": "generic",
28 | },
29 | }
30 |
--------------------------------------------------------------------------------
/doc/specs/examples/stream-gameFinish.json.yaml:
--------------------------------------------------------------------------------
1 | value:
2 | {
3 | "type": "gameFinish",
4 | "game":
5 | {
6 | "fullId": "n7qOcIQ8O6ED",
7 | "gameId": "n7qOcIQ8",
8 | "fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
9 | "color": "white",
10 | "lastMove": "",
11 | "source": "friend",
12 | "status": { "id": 25, "name": "aborted" },
13 | "variant": { "key": "standard", "name": "Standard" },
14 | "speed": "correspondence",
15 | "perf": "correspondence",
16 | "rated": false,
17 | "hasMoved": false,
18 | "opponent": { "id": "aaron", "username": "Aaron", "rating": 710 },
19 | "isMyTurn": false,
20 | "compat": { "bot": false, "board": true },
21 | "id": "n7qOcIQ8",
22 | },
23 | }
24 |
--------------------------------------------------------------------------------
/doc/specs/examples/stream-gameStart.json.yaml:
--------------------------------------------------------------------------------
1 | value:
2 | {
3 | "type": "gameStart",
4 | "game":
5 | {
6 | "fullId": "n7qOcIQ8O6ED",
7 | "gameId": "n7qOcIQ8",
8 | "fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
9 | "color": "white",
10 | "lastMove": "",
11 | "source": "friend",
12 | "status": { "id": 20, "name": "started" },
13 | "variant": { "key": "standard", "name": "Standard" },
14 | "speed": "correspondence",
15 | "perf": "correspondence",
16 | "rated": false,
17 | "hasMoved": false,
18 | "opponent": { "id": "aaron", "username": "Aaron", "rating": 710 },
19 | "isMyTurn": true,
20 | "compat": { "bot": false, "board": true },
21 | "id": "n7qOcIQ8",
22 | },
23 | }
24 |
--------------------------------------------------------------------------------
/doc/specs/examples/teams-getSingleTeam.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "lichess-swiss",
3 | "name": "Lichess Swiss",
4 | "description": "The official Lichess Swiss team. We organize regular swiss tournaments for all to join.",
5 | "open": true,
6 | "leader": {
7 | "name": "Lichess",
8 | "flair": "activity.lichess",
9 | "patron": true,
10 | "id": "lichess"
11 | },
12 | "nbMembers": 582195,
13 | "flair": "food-drink.cheese-wedge",
14 | "leaders": [
15 | {
16 | "name": "Lichess",
17 | "flair": "activity.lichess",
18 | "patron": true,
19 | "id": "lichess"
20 | },
21 | {
22 | "name": "thibault",
23 | "flair": "nature.seedling",
24 | "patron": true,
25 | "id": "thibault"
26 | }
27 | ],
28 | "joined": false,
29 | "requested": false
30 | }
31 |
--------------------------------------------------------------------------------
/doc/specs/examples/teams-getTeamSwissTournaments.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "y9si673R",
3 | "createdBy": "lichess",
4 | "startsAt": "2025-04-24T23:30:00Z",
5 | "name": "Rapid Increment",
6 | "clock": {
7 | "limit": 420,
8 | "increment": 2
9 | },
10 | "variant": "standard",
11 | "round": 0,
12 | "nbRounds": 7,
13 | "nbPlayers": 0,
14 | "nbOngoing": 0,
15 | "status": "created",
16 | "nextRound": {
17 | "at": "2025-04-24T23:30:00Z",
18 | "in": 341166
19 | },
20 | "verdicts": {
21 | "list": [
22 | {
23 | "condition": "≥ 8 Rapid rated games",
24 | "verdict": "ok"
25 | },
26 | {
27 | "condition": "Play your games",
28 | "verdict": "ok"
29 | }
30 | ],
31 | "accepted": true
32 | },
33 | "rated": true
34 | }
35 |
--------------------------------------------------------------------------------
/doc/specs/examples/tv-streamCurrentTvGame-move.json.yaml:
--------------------------------------------------------------------------------
1 | value:
2 | {
3 | "t": "fen",
4 | "d": { "fen": "q4r2/5ppk/b3p3/Q1b1P3/8/3n1N2/1P1N1PPP/2B2RK1 w - - 4 26", "lm": "e7c5", "wc": 119, "bc": 119 },
5 | }
6 |
--------------------------------------------------------------------------------
/doc/specs/examples/tv-streamCurrentTvGame-newGame.json.yaml:
--------------------------------------------------------------------------------
1 | value:
2 | {
3 | "t": "featured",
4 | "d":
5 | {
6 | "id": "xYfwLFIi",
7 | "orientation": "black",
8 | "players":
9 | [
10 | {
11 | "color": "white",
12 | "user":
13 | {
14 | "name": "chargemax23",
15 | "title": "IM",
16 | "flair": "objects.battery",
17 | "patron": true,
18 | "id": "chargemax23",
19 | },
20 | "rating": 2719,
21 | "seconds": 169,
22 | },
23 | {
24 | "color": "black",
25 | "user": { "name": "Olexiy_Bilych", "title": "IM", "flair": "activity.trophy", "id": "olexiy_bilych" },
26 | "rating": 2782,
27 | "seconds": 169,
28 | },
29 | ],
30 | "fen": "q4r2/4bppk/b3p3/Q3P3/8/3n1N2/1P1N1PPP/2B2RK1 b - - 3 25",
31 | },
32 | }
33 |
--------------------------------------------------------------------------------
/doc/specs/examples/users-addNoteForUser.json:
--------------------------------------------------------------------------------
1 | {
2 | "ok": true
3 | }
4 |
--------------------------------------------------------------------------------
/doc/specs/examples/users-autocompleteUsernames-list.json.yaml:
--------------------------------------------------------------------------------
1 | value: ["bobby"]
2 |
--------------------------------------------------------------------------------
/doc/specs/examples/users-autocompleteUsernames-object.json.yaml:
--------------------------------------------------------------------------------
1 | value: { "result": [{ "name": "Bobby", "id": "bobby" }] }
2 |
--------------------------------------------------------------------------------
/doc/specs/examples/users-getCrosstable.json:
--------------------------------------------------------------------------------
1 | {
2 | "users": {
3 | "drnykterstein": 752.5,
4 | "rebeccaharris": 458.5
5 | },
6 | "nbGames": 1211
7 | }
8 |
--------------------------------------------------------------------------------
/doc/specs/examples/users-getOneLeaderboard.json:
--------------------------------------------------------------------------------
1 | {
2 | "users": [
3 | {
4 | "id": "lola",
5 | "username": "Lola",
6 | "perfs": {
7 | "blitz": {
8 | "rating": 2466,
9 | "progress": 0
10 | }
11 | },
12 | "title": "IM"
13 | },
14 | {
15 | "id": "ana",
16 | "username": "Ana",
17 | "perfs": {
18 | "blitz": {
19 | "rating": 2396,
20 | "progress": 0
21 | }
22 | },
23 | "title": "GM"
24 | },
25 | {
26 | "id": "yulia",
27 | "username": "Yulia",
28 | "perfs": {
29 | "blitz": {
30 | "rating": 2390,
31 | "progress": 0
32 | }
33 | },
34 | "title": "FM"
35 | }
36 | ]
37 | }
38 |
--------------------------------------------------------------------------------
/doc/specs/examples/users-getRealTimeUsersStatus.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "Mary",
4 | "flair": "food-drink.coconut",
5 | "id": "mary"
6 | },
7 | {
8 | "name": "Ana",
9 | "title": "GM",
10 | "flair": "symbols.japanese-no-vacancy-button",
11 | "id": "ana"
12 | }
13 | ]
14 |
--------------------------------------------------------------------------------
/doc/specs/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lichess-org/api/745996d53ef773c2750c779e4e27a3a327b7b780/doc/specs/favicon.ico
--------------------------------------------------------------------------------
/doc/specs/schemas/ArenaPerf.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | key:
4 | $ref: "./PerfType.yaml"
5 | name:
6 | type: string
7 | example: "Blitz"
8 | position:
9 | type: integer
10 | example: 1
11 | icon:
12 | type: string
13 | example: ")"
14 |
15 | required:
16 | - key
17 | - name
18 | - position
19 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ArenaPosition.yaml:
--------------------------------------------------------------------------------
1 | oneOf:
2 | - type: object
3 | title: Thematic
4 | properties:
5 | eco:
6 | type: string
7 | example: "C41"
8 | name:
9 | type: string
10 | example: "Philidor Defense"
11 | fen:
12 | type: string
13 | example: "rnbqkbnr/ppp2ppp/3p4/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq -"
14 | url:
15 | type: string
16 | format: uri
17 | example: "https://lichess.org/opening/Philidor_Defense"
18 | - type: object
19 | title: Custom position
20 | properties:
21 | name:
22 | type: string
23 | const: "Custom position"
24 | fen:
25 | type: string
26 | example: "rnbq1bnr/ppppkppp/8/4p3/4P3/8/PPPPKPPP/RNBQ1BNR w - - 2 3"
27 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ArenaRatingObj.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | perf:
4 | $ref: "./PerfType.yaml"
5 | rating:
6 | type: integer
7 | example: 1700
8 |
9 | required:
10 | - rating
11 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ArenaSheet.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | required:
3 | - scores
4 | properties:
5 | scores:
6 | type: string
7 | fire:
8 | type: boolean
9 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ArenaStatus.yaml:
--------------------------------------------------------------------------------
1 | type: integer
2 | description: |
3 | 10: created, 20: started, 30: finished
4 | enum:
5 | - 10
6 | - 20
7 | - 30
8 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ArenaStatusName.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 | description: The current state of the arena tournament
3 | enum:
4 | - created
5 | - started
6 | - finished
7 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ArenaTournamentPlayed.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | tournament:
4 | $ref: "./ArenaTournament.yaml"
5 | player:
6 | $ref: "./ArenaTournamentPlayer.yaml"
7 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ArenaTournamentPlayer.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | games:
5 | type: integer
6 | score:
7 | type: integer
8 | rank:
9 | type: integer
10 | performance:
11 | type: integer
12 |
13 | required:
14 | - games
15 | - score
16 | - rank
17 |
18 | example: { "games": 10, "score": 14, "rank": 30, "performance": 1935 }
19 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ArenaTournaments.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | created:
4 | type: array
5 | items:
6 | $ref: "./ArenaTournament.yaml"
7 | started:
8 | type: array
9 | items:
10 | $ref: "./ArenaTournament.yaml"
11 | finished:
12 | type: array
13 | items:
14 | $ref: "./ArenaTournament.yaml"
15 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastByUser.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | tour:
5 | $ref: "./BroadcastTour.yaml"
6 |
7 | required:
8 | - tour
9 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastCustomPoints.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | win:
4 | type: number
5 | minimum: 0.0
6 | maximum: 10.0
7 | draw:
8 | type: number
9 | minimum: 0.0
10 | maximum: 10.0
11 |
12 | required:
13 | - win
14 | - draw
15 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastCustomScoring.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | description: Scoring overrides for wins or draws.
3 | properties:
4 | white:
5 | type: object
6 | $ref: "./BroadcastCustomPoints.yaml"
7 | black:
8 | type: object
9 | $ref: "./BroadcastCustomPoints.yaml"
10 |
11 | required:
12 | - white
13 | - black
14 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastGroup.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | name:
5 | type: string
6 | tours:
7 | type: array
8 | items:
9 | $ref: "./BroadcastGroupTour.yaml"
10 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastGroupTour.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | name:
5 | type: string
6 | id:
7 | type: string
8 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastMyRound.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | round:
5 | $ref: "./BroadcastRoundInfo.yaml"
6 | tour:
7 | $ref: "./BroadcastTour.yaml"
8 | study:
9 | $ref: "./BroadcastRoundStudyInfo.yaml"
10 |
11 | required:
12 | - round
13 | - tour
14 | - study
15 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastPgnPush.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | games:
5 | type: array
6 | items:
7 | type: object
8 | properties:
9 | tags:
10 | $ref: "./BroadcastPgnPushTags.yaml"
11 | moves:
12 | type: integer
13 | error:
14 | type: string
15 | required:
16 | - tags
17 |
18 | required:
19 | - games
20 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastPgnPushTags.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | additionalProperties:
4 | type: string
5 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastPlayerEntry.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | name:
4 | type: string
5 | example: Hernandez Riera, Jose
6 | score:
7 | type: number
8 | example: 2.5
9 | played:
10 | type: integer
11 | example: 7
12 | rating:
13 | type: integer
14 | example: 2149
15 | ratingDiff:
16 | type: integer
17 | example: -5
18 | performance:
19 | type: integer
20 | example: 2138
21 | title:
22 | $ref: "./Title.yaml"
23 | example: FM
24 | fideId:
25 | type: integer
26 | example: 3408230
27 | fed:
28 | type: string
29 | example: CHI
30 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastRound.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | round:
4 | $ref: "./BroadcastRoundInfo.yaml"
5 | tour:
6 | $ref: "./BroadcastTour.yaml"
7 | study:
8 | $ref: "./BroadcastRoundStudyInfo.yaml"
9 | games:
10 | type: array
11 | items:
12 | $ref: "./BroadcastRoundGame.yaml"
13 | group:
14 | $ref: "./BroadcastGroup.yaml"
15 |
16 | required:
17 | - round
18 | - tour
19 | - study
20 | - games
21 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastRoundFormName.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 |
3 | minLength: 3
4 | maxLength: 80
5 |
6 | description: |
7 | Name of the broadcast round.
8 | Example: `Round 1`
9 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastRoundGame.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | id:
5 | type: string
6 | name:
7 | type: string
8 | fen:
9 | type: string
10 | players:
11 | type: array
12 | items:
13 | type: object
14 | properties:
15 | name:
16 | type: string
17 | title:
18 | $ref: "./Title.yaml"
19 | rating:
20 | type: integer
21 | fideId:
22 | type: integer
23 | fed:
24 | type: string
25 | clock:
26 | type: integer
27 | lastMove:
28 | type: string
29 | thinkTime:
30 | type: integer
31 | status:
32 | description: The result of the game
33 | type: string
34 | enum:
35 | - "*"
36 | - "1-0"
37 | - "0-1"
38 | - "½-½"
39 |
40 | required:
41 | - id
42 | - name
43 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastRoundInfo.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | id:
5 | type: string
6 | name:
7 | type: string
8 | slug:
9 | type: string
10 | createdAt:
11 | type: integer
12 | format: int64
13 | rated:
14 | type: boolean
15 | description: "Whether the round is used for rating calculations"
16 | ongoing:
17 | type: boolean
18 | startsAt:
19 | type: integer
20 | format: int64
21 | startsAfterPrevious:
22 | type: boolean
23 | description: "The start date/time is unknown and the round will start automatically when the previous round completes"
24 | finishedAt:
25 | type: integer
26 | format: int64
27 | finished:
28 | type: boolean
29 | url:
30 | type: string
31 | format: uri
32 | delay:
33 | type: integer
34 | format: int64
35 | customScoring:
36 | type: object
37 | $ref: "./BroadcastCustomScoring.yaml"
38 |
39 | required:
40 | - id
41 | - name
42 | - slug
43 | - url
44 | - createdAt
45 | - rated
46 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastRoundNew.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | round:
5 | $ref: "./BroadcastRoundInfo.yaml"
6 | tour:
7 | $ref: "./BroadcastTour.yaml"
8 | study:
9 | $ref: "./BroadcastRoundStudyInfo.yaml"
10 |
11 | required:
12 | - round
13 | - tour
14 | - study
15 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastRoundStudyInfo.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | writeable:
5 | description: Whether the currently authenticated user has permission to update the study
6 | type: boolean
7 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastTop.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | active:
5 | type: array
6 | items:
7 | $ref: "./BroadcastWithLastRound.yaml"
8 | upcoming:
9 | type: array
10 | items:
11 | $ref: "./BroadcastWithLastRound.yaml"
12 | past:
13 | type: object
14 | properties:
15 | currentPage:
16 | type: number
17 | example: 4
18 | maxPerPage:
19 | type: number
20 | example: 20
21 | currentPageResults:
22 | type: array
23 | items:
24 | $ref: "./BroadcastWithLastRound.yaml"
25 | previousPage:
26 | type: [number, "null"]
27 | example: 3
28 | nextPage:
29 | type: [number, "null"]
30 | example: 5
31 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastWithLastRound.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | group:
5 | type: string
6 | tour:
7 | $ref: "./BroadcastTour.yaml"
8 | round:
9 | $ref: "./BroadcastRoundInfo.yaml"
10 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BroadcastWithRounds.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | tour:
5 | $ref: "./BroadcastTour.yaml"
6 | group:
7 | $ref: "./BroadcastGroup.yaml"
8 | rounds:
9 | type: array
10 | items:
11 | $ref: "./BroadcastRoundInfo.yaml"
12 | defaultRoundId:
13 | type: string
14 |
15 | required:
16 | - tour
17 | - rounds
18 |
--------------------------------------------------------------------------------
/doc/specs/schemas/BulkPairing.yaml:
--------------------------------------------------------------------------------
1 | example:
2 | {
3 | "id": "RVAcwgg7",
4 | "games":
5 | [
6 | { "id": "NKop9IyD", "black": "lizen1", "white": "thibault" },
7 | { "id": "KT8374ut", "black": "lizen3", "white": "lizen2" },
8 | { "id": "wInQr8Sk", "black": "lizen5", "white": "lizen4" },
9 | ],
10 | "variant": "standard",
11 | "clock": { "increment": 0, "limit": 300 },
12 | "pairAt": 1612289869919,
13 | "pairedAt": null,
14 | "rated": false,
15 | "startClocksAt": 1612200422971,
16 | "scheduledAt": 1612203514628,
17 | }
18 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ChallengeCanceledEvent.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | const: challengeCanceled
6 | challenge:
7 | $ref: "./ChallengeJson.yaml"
8 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ChallengeDeclinedEvent.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | const: challengeDeclined
6 | challenge:
7 | $ref: "./ChallengeDeclinedJson.yaml"
8 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ChallengeDeclinedJson.yaml:
--------------------------------------------------------------------------------
1 | allOf:
2 | - $ref: "./ChallengeJson.yaml"
3 | properties:
4 | declineReason:
5 | type: string
6 | description: Human readable, possibly translated reason why the challenge was declined.
7 | declineReasonKey:
8 | type: string
9 | description: Untranslated, computer-matchable reason why the challenge was declined.
10 | enum:
11 | - generic
12 | - later
13 | - tooFast
14 | - tooSlow
15 | - timeControl
16 | - rated
17 | - casual
18 | - standard
19 | - variant
20 | - noBot
21 | - onlyBot
22 | required:
23 | - declineReason
24 | - declineReasonKey
25 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ChallengeEvent.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | const: challenge
6 | challenge:
7 | $ref: "./ChallengeJson.yaml"
8 | compat:
9 | $ref: "./GameCompat.yaml"
10 |
11 | required:
12 | - type
13 | - challenge
14 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ChallengeStatus.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 | enum:
3 | - created
4 | - offline
5 | - canceled
6 | - declined
7 | - accepted
8 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ChallengeUser.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | id:
4 | type: string
5 | name:
6 | type: string
7 | rating:
8 | type: number
9 | title:
10 | oneOf:
11 | - $ref: "./Title.yaml"
12 | - type: "null"
13 | flair:
14 | $ref: "./Flair.yaml"
15 | patron:
16 | type: boolean
17 | provisional:
18 | type: boolean
19 | online:
20 | type: boolean
21 | lag:
22 | type: number
23 |
24 | required:
25 | - id
26 | - name
27 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ChatLineEvent.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | const: chatLine
6 | room:
7 | type: string
8 | enum:
9 | - player
10 | - spectator
11 | username:
12 | type: string
13 | text:
14 | type: string
15 | required:
16 | - type
17 | - room
18 | - username
19 | - text
20 | example: { "type": "chatLine", "username": "thibault", "text": "Good luck, have fun", "room": "player" }
21 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Clock.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | limit:
4 | type: integer
5 | increment:
6 | type: integer
7 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Count.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | all:
4 | type: integer
5 | rated:
6 | type: integer
7 | ai:
8 | type: integer
9 | draw:
10 | type: integer
11 | drawH:
12 | type: integer
13 | loss:
14 | type: integer
15 | lossH:
16 | type: integer
17 | win:
18 | type: integer
19 | winH:
20 | type: integer
21 | bookmark:
22 | type: integer
23 | playing:
24 | type: integer
25 | import:
26 | type: integer
27 | me:
28 | type: integer
29 |
30 | required:
31 | - all
32 | - rated
33 | - ai
34 | - draw
35 | - drawH
36 | - loss
37 | - lossH
38 | - win
39 | - winH
40 | - bookmark
41 | - playing
42 | - import
43 | - me
44 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Crosstable.yaml:
--------------------------------------------------------------------------------
1 | properties:
2 | users:
3 | additionalProperties:
4 | type: number
5 | nbGames:
6 | type: integer
7 | required:
8 | - users
9 | - nbGames
10 |
11 | example: { "users": { "neio": 201.5, "thibault": 144.5 }, "nbGames": 346 }
12 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Error.yaml:
--------------------------------------------------------------------------------
1 | properties:
2 | error:
3 | type: string
4 | description: The cause of the error.
5 | example:
6 | error: "This request is invalid because [...]"
7 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ExternalEngineWork.yaml:
--------------------------------------------------------------------------------
1 | oneOf:
2 | - allOf:
3 | - type: object
4 | title: Search by movetime
5 | properties:
6 | movetime:
7 | type: integer
8 | description: Amount of time to analyse the position, in milliseconds.
9 | minimum: 1
10 | required:
11 | - movetime
12 | - $ref: "./ExternalEngineWorkCommon.yaml"
13 | - allOf:
14 | - type: object
15 | title: Search by depth
16 | properties:
17 | depth:
18 | type: integer
19 | description: Analysis target depth
20 | minimum: 1
21 | required:
22 | - depth
23 | - $ref: "./ExternalEngineWorkCommon.yaml"
24 | - allOf:
25 | - type: object
26 | title: Search by nodes
27 | properties:
28 | nodes:
29 | type: integer
30 | description: Number of nodes to analyse in the position
31 | minimum: 1
32 | required:
33 | - nodes
34 | - $ref: "./ExternalEngineWorkCommon.yaml"
35 |
--------------------------------------------------------------------------------
/doc/specs/schemas/ExternalEngineWorkCommon.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | sessionId:
5 | type: string
6 | description: |
7 | Arbitary string that identifies the analysis session.
8 | Providers may wish to clear the hash table between sessions.
9 | threads:
10 | type: integer
11 | minimum: 1
12 | description: Number of threads to use for analysis.
13 | hash:
14 | type: integer
15 | minimum: 1
16 | description: Hash table size to use for analysis, in MiB.
17 | multiPv:
18 | type: integer
19 | minimum: 1
20 | maximum: 5
21 | description: Requested number of principal variations.
22 | variant:
23 | $ref: "./UciVariant.yaml"
24 | initialFen:
25 | type: string
26 | description: Initial position of the game.
27 | moves:
28 | type: array
29 | description: List of moves played from the initial position, in UCI notation.
30 | items:
31 | type: string
32 |
33 | required:
34 | - sessionId
35 | - threads
36 | - hash
37 | - multiPv
38 | - variant
39 | - initialFen
40 | - moves
41 |
--------------------------------------------------------------------------------
/doc/specs/schemas/FIDEPlayer.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | id:
4 | type: integer
5 | name:
6 | type: string
7 | title:
8 | $ref: "./Title.yaml"
9 | federation:
10 | type: string
11 | year:
12 | type: [number, "null"]
13 | inactive:
14 | type: integer
15 | standard:
16 | type: integer
17 | rapid:
18 | type: integer
19 | blitz:
20 | type: integer
21 |
22 | required:
23 | - id
24 | - name
25 | - federation
26 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Flair.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 |
3 | description: See [available flair list and images](https://github.com/lichess-org/lila/tree/master/public/flair)
4 |
--------------------------------------------------------------------------------
/doc/specs/schemas/FromPositionFEN.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 | description: Custom initial position (in FEN). Variant must be standard, fromPosition, or chess960 (if a valid 960 starting position), and the game cannot be rated.
3 | default: "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
4 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameChat.yaml:
--------------------------------------------------------------------------------
1 | type: array
2 | items:
3 | type: object
4 | properties:
5 | text:
6 | type: string
7 | user:
8 | type: string
9 |
10 | example:
11 | [
12 | { "text": "Takeback sent", "user": "lichess" },
13 | { "text": "Takeback accepted", "user": "lichess" },
14 | { "text": "Good game, well played", "user": "thibault" },
15 | ]
16 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameColor.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 | enum:
3 | - white
4 | - black
5 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameCompat.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | bot:
5 | type: boolean
6 | description: Compatible with Bot API
7 | board:
8 | type: boolean
9 | description: Compatible with Board API
10 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameEventInfo.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | fullId:
4 | type: string
5 | gameId:
6 | type: string
7 | fen:
8 | type: string
9 | color:
10 | $ref: "./GameColor.yaml"
11 | lastMove:
12 | type: string
13 | source:
14 | $ref: "./GameSource.yaml"
15 | status:
16 | $ref: "./GameStatus.yaml"
17 | variant:
18 | $ref: "./Variant.yaml"
19 | speed:
20 | $ref: "./Speed.yaml"
21 | perf:
22 | type: string
23 | rated:
24 | type: boolean
25 | hasMoved:
26 | type: boolean
27 | opponent:
28 | $ref: "./GameEventOpponent.yaml"
29 | isMyTurn:
30 | type: boolean
31 | secondsLeft:
32 | type: integer
33 | compat:
34 | $ref: "./GameCompat.yaml"
35 | id:
36 | type: string
37 |
38 | required:
39 | - fullId
40 | - gameId
41 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameEventOpponent.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | id:
4 | type: string
5 | username:
6 | type: string
7 | rating:
8 | type: integer
9 |
10 | required:
11 | - id
12 | - username
13 | - rating
14 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameEventPlayer.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | aiLevel:
4 | type: integer
5 | id:
6 | type: string
7 | name:
8 | type: string
9 | title:
10 | oneOf:
11 | - $ref: "./Title.yaml"
12 | - type: "null"
13 | rating:
14 | type: integer
15 | provisional:
16 | type: boolean
17 |
18 | required:
19 | - id
20 | - name
21 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameFinishEvent.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | const: gameFinish
6 | game:
7 | $ref: "./GameEventInfo.yaml"
8 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameMoveAnalysis.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | eval:
5 | type: number
6 | description: Evaluation in centipawns
7 | mate:
8 | type: number
9 | description: Number of moves until forced mate
10 | best:
11 | type: string
12 | example: c2c3
13 | description: Best move in UCI notation (only if played move was inaccurate)
14 | variation:
15 | type: string
16 | example: c3 Nc6 d4 Qb6 Be2 Nge7 Na3 cxd4 cxd4 Nf5
17 | description: Best variation in SAN notation (only if played move was inaccurate)
18 | judgment:
19 | type: object
20 | description: Judgment annotation (only if played move was inaccurate)
21 | properties:
22 | name:
23 | type: string
24 | enum:
25 | - Inaccuracy
26 | - Mistake
27 | - Blunder
28 | comment:
29 | type: string
30 | example: Blunder. Nxg6 was best.
31 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameOpening.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | eco:
4 | type: string
5 | name:
6 | type: string
7 | ply:
8 | type: integer
9 |
10 | required:
11 | - eco
12 | - name
13 | - ply
14 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GamePgn.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 | example: |
3 | [Event "Rated Blitz game"]
4 | [Site "https://lichess.org/fY44h4OY"]
5 | [Date "2018.03.29"]
6 | [Round "-"]
7 | [White "pveldman"]
8 | [Black "thibault"]
9 | [Result "1-0"]
10 | [UTCDate "2018.03.29"]
11 | [UTCTime "01:38:15"]
12 | [WhiteElo "1610"]
13 | [BlackElo "1601"]
14 | [WhiteRatingDiff "+10"]
15 | [BlackRatingDiff "-10"]
16 | [Variant "Standard"]
17 | [TimeControl "180+0"]
18 | [ECO "C62"]
19 | [Opening "Ruy Lopez: Steinitz Defense"]
20 | [Termination "Normal"]
21 |
22 | 1. e4 { [%clk 0:03:00] } e5 { [%clk 0:03:00] } 2. Nf3 { [%clk 0:02:59] } Nc6 { [%clk 0:02:58] } 3. Bb5 { [%clk 0:02:57] } d6 { [%clk 0:02:55] } 4. h3 { [%clk 0:02:54] } Nf6 { [%clk 0:02:52] } 5. Bxc6+ { [%clk 0:02:52] } bxc6 { [%clk 0:02:49] } 6. d3 { [%clk 0:02:51] } Be7 { [%clk 0:02:46] } 7. O-O { [%clk 0:02:47] } O-O { [%clk 0:02:45] } 8. b3 { [%clk 0:02:45] } d5 { [%clk 0:02:45] } 9. exd5 { [%clk 0:02:33] } cxd5 { [%clk 0:02:40] } 10. Nxe5 { [%clk 0:02:31] } Qd6 { [%clk 0:02:38] } 1-0
23 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameSource.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 | enum:
3 | - lobby
4 | - friend
5 | - ai
6 | - api
7 | - tournament
8 | - position
9 | - import
10 | - importlive
11 | - simul
12 | - relay
13 | - pool
14 | - swiss
15 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameStartEvent.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | const: gameStart
6 | game:
7 | $ref: "./GameEventInfo.yaml"
8 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameStatus.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | id:
4 | $ref: "./GameStatusId.yaml"
5 | name:
6 | $ref: "./GameStatusName.yaml"
7 |
8 | required:
9 | - id
10 | - name
11 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameStatusId.yaml:
--------------------------------------------------------------------------------
1 | type: integer
2 | enum: [10, 20, 25, 30, 31, 32, 33, 34, 35, 36, 37, 38, 60]
3 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameStatusName.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 | enum:
3 | - created
4 | - started
5 | - aborted
6 | - mate
7 | - resign
8 | - stalemate
9 | - timeout
10 | - draw
11 | - outoftime
12 | - cheat
13 | - noStart
14 | - unknownFinish
15 | - variantEnd
16 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameStream.yaml:
--------------------------------------------------------------------------------
1 | example:
2 | [
3 | {
4 | "id": "A5fcMO3k",
5 | "rated": true,
6 | "variant": "standard",
7 | "speed": "bullet",
8 | "perf": "bullet",
9 | "createdAt": 1525789431889,
10 | "status": 20,
11 | "statusName": "started",
12 | "clock": { "initial": 60, "increment": 0, "totalTime": 60 },
13 | "players":
14 | { "white": { "userId": "kastorcito", "rating": 2617 }, "black": { "userId": "er_or", "rating": 2288 } },
15 | },
16 | {
17 | "id": "A5fcMO3k",
18 | "rated": true,
19 | "variant": "standard",
20 | "speed": "bullet",
21 | "perf": "bullet",
22 | "createdAt": 1525789431889,
23 | "status": 31,
24 | "statusName": "resign",
25 | "clock": { "initial": 60, "increment": 0, "totalTime": 60 },
26 | "players":
27 | { "white": { "userId": "kastorcito", "rating": 2617 }, "black": { "userId": "er_or", "rating": 2288 } },
28 | "winner": "white",
29 | },
30 | ]
31 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameUser.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | user:
4 | $ref: "./LightUser.yaml"
5 | rating:
6 | type: integer
7 | ratingDiff:
8 | type: integer
9 | name:
10 | type: string
11 | provisional:
12 | type: boolean
13 | aiLevel:
14 | type: integer
15 | analysis:
16 | type: object
17 | properties:
18 | inaccuracy:
19 | type: number
20 | mistake:
21 | type: number
22 | blunder:
23 | type: number
24 | acpl:
25 | type: number
26 | accuracy:
27 | type: number
28 | required: [inaccuracy, mistake, blunder, acpl]
29 | team:
30 | type: string
31 |
32 | required:
33 | - user
34 | - rating
35 |
--------------------------------------------------------------------------------
/doc/specs/schemas/GameUsers.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | white:
4 | $ref: "./GameUser.yaml"
5 | black:
6 | $ref: "./GameUser.yaml"
7 |
8 | required:
9 | - white
10 | - black
11 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Leaderboard.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | users:
4 | type: array
5 | items:
6 | $ref: "./TopUser.yaml"
7 |
8 | required:
9 | - users
10 |
--------------------------------------------------------------------------------
/doc/specs/schemas/LightUser.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | id:
4 | type: string
5 | name:
6 | type: string
7 | flair:
8 | $ref: "./Flair.yaml"
9 | title:
10 | $ref: "./Title.yaml"
11 | patron:
12 | type: boolean
13 | required:
14 | - id
15 | - name
16 |
--------------------------------------------------------------------------------
/doc/specs/schemas/LightUserOnline.yaml:
--------------------------------------------------------------------------------
1 | allOf:
2 | - $ref: "./LightUser.yaml"
3 | - properties:
4 | online:
5 | type: boolean
6 |
--------------------------------------------------------------------------------
/doc/specs/schemas/NotFound.yaml:
--------------------------------------------------------------------------------
1 | properties:
2 | error:
3 | type: string
4 | example:
5 | error: "Not found."
6 |
--------------------------------------------------------------------------------
/doc/specs/schemas/OAuthError.yaml:
--------------------------------------------------------------------------------
1 | properties:
2 | error:
3 | type: string
4 | description: The cause of the error.
5 | error_description:
6 | type: string
7 | description: The reason why the request was rejected.
8 | example:
9 | error: "invalid_grant"
10 | error_description: "hash of code_verifier does not match code_challenge"
11 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Ok.yaml:
--------------------------------------------------------------------------------
1 | properties:
2 | ok:
3 | type: boolean
4 |
--------------------------------------------------------------------------------
/doc/specs/schemas/OpeningExplorerGamePlayer.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | name:
4 | type: string
5 | rating:
6 | type: integer
7 |
8 | required:
9 | - name
10 | - rating
11 |
--------------------------------------------------------------------------------
/doc/specs/schemas/OpeningExplorerLichessGame.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | id:
4 | type: string
5 | winner:
6 | type: [string, "null"]
7 | enum:
8 | - white
9 | - black
10 | - null
11 | speed:
12 | $ref: "./Speed.yaml"
13 | white:
14 | $ref: "./OpeningExplorerGamePlayer.yaml"
15 | black:
16 | $ref: "./OpeningExplorerGamePlayer.yaml"
17 | year:
18 | type: number
19 | month:
20 | type: [string, "null"]
21 | required:
22 | - id
23 | - winner
24 | - white
25 | - black
26 | - year
27 | - month
28 |
--------------------------------------------------------------------------------
/doc/specs/schemas/OpeningExplorerMastersGame.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | id:
4 | type: string
5 | winner:
6 | type: [string, "null"]
7 | enum:
8 | - white
9 | - black
10 | - null
11 | white:
12 | $ref: "./OpeningExplorerGamePlayer.yaml"
13 | black:
14 | $ref: "./OpeningExplorerGamePlayer.yaml"
15 | year:
16 | type: number
17 | month:
18 | type: string
19 | required:
20 | - id
21 | - winner
22 | - white
23 | - black
24 | - year
25 |
--------------------------------------------------------------------------------
/doc/specs/schemas/OpeningExplorerOpening.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | eco:
4 | type: string
5 | name:
6 | type: string
7 | required:
8 | - eco
9 | - name
10 |
--------------------------------------------------------------------------------
/doc/specs/schemas/OpeningExplorerPlayerGame.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | id:
4 | type: string
5 | winner:
6 | type: [string, "null"]
7 | enum:
8 | - white
9 | - black
10 | speed:
11 | $ref: "./Speed.yaml"
12 | mode:
13 | type: string
14 | enum:
15 | - rated
16 | - casual
17 | white:
18 | $ref: "./OpeningExplorerGamePlayer.yaml"
19 | black:
20 | $ref: "./OpeningExplorerGamePlayer.yaml"
21 | year:
22 | type: number
23 | month:
24 | type: string
25 | required:
26 | - id
27 | - winner
28 | - speed
29 | - mode
30 | - white
31 | - black
32 | - year
33 | - month
34 |
--------------------------------------------------------------------------------
/doc/specs/schemas/OpponentGoneEvent.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | const: opponentGone
6 | gone:
7 | type: boolean
8 | claimWinInSeconds:
9 | type: integer
10 |
11 | required:
12 | - type
13 | - gone
14 |
15 | example: { "type": "opponentGone", "gone": true, "claimWinInSeconds": 8 }
16 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Perf.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | games:
4 | type: integer
5 | rating:
6 | type: integer
7 | rd:
8 | type: integer
9 | description: rating deviation
10 | prog:
11 | type: integer
12 | prov:
13 | type: boolean
14 | description: only appears if a user's perf rating are [provisional](https://lichess.org/faq#provisional)
15 |
16 | required:
17 | - games
18 | - rating
19 | - rd
20 | - prog
21 |
--------------------------------------------------------------------------------
/doc/specs/schemas/PerfTop10.yaml:
--------------------------------------------------------------------------------
1 | type: array
2 |
3 | minItems: 10
4 | maxItems: 10
5 |
6 | items:
7 | $ref: "./TopUser.yaml"
8 |
--------------------------------------------------------------------------------
/doc/specs/schemas/PerfType.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 | enum:
3 | - ultraBullet
4 | - bullet
5 | - blitz
6 | - rapid
7 | - classical
8 | - correspondence
9 | - chess960
10 | - crazyhouse
11 | - antichess
12 | - atomic
13 | - horde
14 | - kingOfTheHill
15 | - racingKings
16 | - threeCheck
17 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Perfs.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | chess960:
4 | $ref: "./Perf.yaml"
5 | atomic:
6 | $ref: "./Perf.yaml"
7 | racingKings:
8 | $ref: "./Perf.yaml"
9 | ultraBullet:
10 | $ref: "./Perf.yaml"
11 | blitz:
12 | $ref: "./Perf.yaml"
13 | kingOfTheHill:
14 | $ref: "./Perf.yaml"
15 | threeCheck:
16 | $ref: "./Perf.yaml"
17 | antichess:
18 | $ref: "./Perf.yaml"
19 | crazyhouse:
20 | $ref: "./Perf.yaml"
21 | bullet:
22 | $ref: "./Perf.yaml"
23 | correspondence:
24 | $ref: "./Perf.yaml"
25 | horde:
26 | $ref: "./Perf.yaml"
27 | puzzle:
28 | $ref: "./Perf.yaml"
29 | classical:
30 | $ref: "./Perf.yaml"
31 | rapid:
32 | $ref: "./Perf.yaml"
33 | storm:
34 | $ref: "./PuzzleModePerf.yaml"
35 | racer:
36 | $ref: "./PuzzleModePerf.yaml"
37 | streak:
38 | $ref: "./PuzzleModePerf.yaml"
39 |
--------------------------------------------------------------------------------
/doc/specs/schemas/PlayTime.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | total:
4 | type: integer
5 | tv:
6 | type: integer
7 |
8 | required:
9 | - total
10 | - tv
11 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Profile.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | flag:
4 | type: string
5 | example: EC
6 | location:
7 | type: string
8 | bio:
9 | type: string
10 | example: Free bugs!
11 | realName:
12 | type: string
13 | example: Thibault Duplessis
14 | fideRating:
15 | type: integer
16 | example: 1500
17 | description: only appears if a user has set them
18 | uscfRating:
19 | type: integer
20 | example: 1500
21 | description: only appears if a user has set them
22 | ecfRating:
23 | type: integer
24 | example: 1500
25 | description: only appears if a user has set them
26 | cfcRating:
27 | type: integer
28 | example: 1500
29 | description: only appears if a user has set them
30 | rcfRating:
31 | type: integer
32 | example: 1500
33 | description: only appears if a user has set them
34 | dsbRating:
35 | type: integer
36 | example: 1500
37 | description: only appears if a user has set them
38 | links:
39 | type: string
40 | example: "github.com/ornicar\r\nmas.to/@thibault"
41 |
--------------------------------------------------------------------------------
/doc/specs/schemas/PuzzleActivity.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | date:
5 | type: integer
6 | puzzle:
7 | type: object
8 | properties:
9 | fen:
10 | type: string
11 | id:
12 | type: string
13 | lastMove:
14 | type: string
15 | plays:
16 | type: integer
17 | rating:
18 | type: integer
19 | solution:
20 | type: array
21 | items:
22 | type: string
23 | themes:
24 | type: array
25 | items:
26 | type: string
27 | required:
28 | - fen
29 | - id
30 | - lastMove
31 | - plays
32 | - rating
33 | - solution
34 | - themes
35 | win:
36 | type: boolean
37 |
38 | required:
39 | - date
40 | - puzzle
41 | - win
42 |
--------------------------------------------------------------------------------
/doc/specs/schemas/PuzzleDashboard.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | days:
5 | type: integer
6 | global:
7 | $ref: "./PuzzlePerformance.yaml"
8 | themes:
9 | type: object
10 | additionalProperties:
11 | type: object
12 | properties:
13 | results:
14 | $ref: "./PuzzlePerformance.yaml"
15 | theme:
16 | type: string
17 | required:
18 | - results
19 | - theme
20 |
21 | required:
22 | - days
23 | - global
24 | - themes
25 |
--------------------------------------------------------------------------------
/doc/specs/schemas/PuzzleModePerf.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | runs:
4 | type: integer
5 | score:
6 | type: integer
7 |
8 | required:
9 | - runs
10 | - score
11 |
--------------------------------------------------------------------------------
/doc/specs/schemas/PuzzlePerformance.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | firstWins:
5 | type: integer
6 | nb:
7 | type: integer
8 | performance:
9 | type: integer
10 | puzzleRatingAvg:
11 | type: integer
12 | replayWins:
13 | type: integer
14 |
15 | required:
16 | - firstWins
17 | - nb
18 | - performance
19 | - puzzleRatingAvg
20 | - replayWins
21 |
--------------------------------------------------------------------------------
/doc/specs/schemas/PuzzleRacer.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | id:
5 | type: string
6 | url:
7 | type: string
8 | format: uri
9 |
10 | required:
11 | - id
12 | - url
13 |
--------------------------------------------------------------------------------
/doc/specs/schemas/PuzzleReplay.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | replay:
5 | type: object
6 | properties:
7 | days:
8 | type: number
9 | theme:
10 | type: string
11 | nb:
12 | type: number
13 | remaining:
14 | type: array
15 | items:
16 | type: string
17 | required:
18 | - days
19 | - theme
20 | - nb
21 | - remaining
22 | angle:
23 | type: object
24 | properties:
25 | key:
26 | type: string
27 | name:
28 | type: string
29 | desc:
30 | type: string
31 | required:
32 | - key
33 | - name
34 | - desc
35 |
36 | required:
37 | - replay
38 | - angle
39 |
--------------------------------------------------------------------------------
/doc/specs/schemas/PuzzleStormDashboard.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | days:
5 | type: array
6 | items:
7 | type: object
8 | properties:
9 | _id:
10 | type: string
11 | combo:
12 | type: integer
13 | errors:
14 | type: integer
15 | highest:
16 | type: integer
17 | moves:
18 | type: integer
19 | runs:
20 | type: integer
21 | score:
22 | type: integer
23 | time:
24 | type: integer
25 | required:
26 | - _id
27 | - combo
28 | - errors
29 | - highest
30 | - moves
31 | - runs
32 | - score
33 | - time
34 | high:
35 | type: object
36 | properties:
37 | allTime:
38 | type: integer
39 | day:
40 | type: integer
41 | month:
42 | type: integer
43 | week:
44 | type: integer
45 | required:
46 | - allTime
47 | - day
48 | - month
49 | - week
50 |
51 | required:
52 | - days
53 | - high
54 |
--------------------------------------------------------------------------------
/doc/specs/schemas/RatingHistory.yaml:
--------------------------------------------------------------------------------
1 | example:
2 | [
3 | { "name": "Bullet", "points": [[2011, 0, 8, 1472], [2011, 0, 9, 1332], [2011, 8, 12, 1314]] },
4 | { "name": "Blitz", "points": [[2011, 7, 29, 1332]] },
5 | ]
6 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Simul.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | required:
3 | - id
4 | - host
5 | - name
6 | - fullName
7 | - variants
8 | - isCreated
9 | - isFinished
10 | - isRunning
11 | - nbApplicants
12 | - nbPairings
13 | properties:
14 | id:
15 | type: string
16 | host:
17 | type: object
18 | allOf:
19 | - $ref: "./LightUser.yaml"
20 | - type: object
21 | properties:
22 | rating:
23 | type: integer
24 | provisional:
25 | type: boolean
26 | gameId:
27 | type: string
28 | online:
29 | type: boolean
30 | name:
31 | type: string
32 | fullName:
33 | type: string
34 | variants:
35 | type: array
36 | items:
37 | type: object
38 | properties:
39 | key:
40 | $ref: "./VariantKey.yaml"
41 | icon:
42 | type: string
43 | name:
44 | type: string
45 | isCreated:
46 | type: boolean
47 | isFinished:
48 | type: boolean
49 | isRunning:
50 | type: boolean
51 | text:
52 | type: string
53 | estimatedStartAt:
54 | type: integer
55 | startedAt:
56 | type: integer
57 | finishedAt:
58 | type: integer
59 | nbApplicants:
60 | type: integer
61 | nbPairings:
62 | type: integer
63 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Speed.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 | enum:
3 | - ultraBullet
4 | - bullet
5 | - blitz
6 | - rapid
7 | - classical
8 | - correspondence
9 |
--------------------------------------------------------------------------------
/doc/specs/schemas/StudyImportPgnChapters.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | chapters:
5 | type: array
6 | items:
7 | type: object
8 | properties:
9 | id:
10 | type: string
11 | description: The chapter ID
12 | name:
13 | type: string
14 | description: The chapter name
15 | players:
16 | type: array
17 | minItems: 2
18 | maxItems: 2
19 | items:
20 | type: object
21 | properties:
22 | name:
23 | type:
24 | - string
25 | - "null"
26 | description: The player name
27 | rating:
28 | type: integer
29 | description: The player rating
30 | status:
31 | type: string
32 | description: The chapter status
33 |
34 | example:
35 | {
36 | "chapters":
37 | [
38 | {
39 | "id": "iBjmYBya",
40 | "name": "test 2",
41 | "players": [{ "name": "Carlsen, Magnus", "rating": 2837 }, { "name": "Chadaev, Nikolay", "rating": 2580 }],
42 | "status": "1-0",
43 | },
44 | ],
45 | }
46 |
--------------------------------------------------------------------------------
/doc/specs/schemas/StudyMetadata.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | id:
5 | type: string
6 | description: The study ID
7 | name:
8 | type: string
9 | description: The study name
10 | createdAt:
11 | type: integer
12 | format: int64
13 | description: The study creation date
14 | updatedAt:
15 | type: integer
16 | format: int64
17 | description: The study last update date
18 |
19 | required:
20 | - id
21 | - name
22 | - createdAt
23 | - updatedAt
24 |
25 | example: { "id": "WTvnkWAL", "name": "Guess the move", "createdAt": 1463756350225, "updatedAt": 1469965025205 }
26 |
--------------------------------------------------------------------------------
/doc/specs/schemas/SwissFromPositionFEN.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 | description: Custom initial position (in FEN). Variant must be standard and the game cannot be rated.
3 | default: "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
4 |
--------------------------------------------------------------------------------
/doc/specs/schemas/SwissStatus.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 | description: The current state of the swiss tournament
3 | enum:
4 | - created
5 | - started
6 | - finished
7 |
--------------------------------------------------------------------------------
/doc/specs/schemas/SwissUnauthorisedEdit.yaml:
--------------------------------------------------------------------------------
1 | properties:
2 | error:
3 | type: string
4 | example:
5 | error: "This user cannot edit this swiss"
6 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Team.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | id:
5 | type: string
6 | name:
7 | type: string
8 | description:
9 | type: string
10 | flair:
11 | $ref: "./Flair.yaml"
12 | leader:
13 | $ref: "./LightUser.yaml"
14 | leaders:
15 | type: array
16 | items:
17 | $ref: "./LightUser.yaml"
18 | nbMembers:
19 | type: integer
20 | open:
21 | type: boolean
22 | joined:
23 | type: boolean
24 | requested:
25 | type: boolean
26 |
27 | required:
28 | - id
29 | - name
30 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TeamPaginatorJson.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | currentPage:
4 | type: number
5 | example: 4
6 | maxPerPage:
7 | type: number
8 | example: 15
9 | currentPageResults:
10 | type: array
11 | items:
12 | $ref: "./Team.yaml"
13 | previousPage:
14 | type: [number, "null"]
15 | example: 3
16 | nextPage:
17 | type: [number, "null"]
18 | example: 5
19 | nbResults:
20 | type: number
21 | nbPages:
22 | type: number
23 |
24 | required:
25 | - currentPage
26 | - maxPerPage
27 | - currentPageResults
28 | - previousPage
29 | - nextPage
30 | - nbResults
31 | - nbPages
32 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TeamRequest.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | teamId:
4 | type: string
5 | example: coders
6 | userId:
7 | type: string
8 | example: thibault
9 | date:
10 | type: number
11 | example: 1514505150384
12 | message:
13 | type: string
14 | example: "Hello, I would like to join the team!"
15 |
16 | required:
17 | - teamId
18 | - userId
19 | - date
20 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TeamRequestWithUser.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | request:
4 | $ref: "./TeamRequest.yaml"
5 | user:
6 | $ref: "./User.yaml"
7 |
8 | required:
9 | - request
10 | - user
11 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimeControl.yaml:
--------------------------------------------------------------------------------
1 | oneOf:
2 | - type: object
3 | title: Real-time
4 | properties:
5 | type:
6 | type: string
7 | const: clock
8 | limit:
9 | type: number
10 | increment:
11 | type: number
12 | show:
13 | example: 5+2
14 | type: string
15 | additionalProperties: false
16 | - type: object
17 | title: Correspondence
18 | properties:
19 | type:
20 | type: string
21 | const: correspondence
22 | daysPerTurn:
23 | type: number
24 | additionalProperties: false
25 | - type: object
26 | title: Unlimited
27 | properties:
28 | type:
29 | type: string
30 | const: unlimited
31 | additionalProperties: false
32 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimelineEntryBlogPost.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | enum:
6 | - blog-post
7 | date:
8 | type: number
9 | data:
10 | type: object
11 | properties:
12 | id:
13 | type: string
14 | slug:
15 | type: string
16 | title:
17 | type: string
18 | required:
19 | - id
20 | - slug
21 | - title
22 | required:
23 | - type
24 | - date
25 | - data
26 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimelineEntryFollow.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | enum:
6 | - follow
7 | date:
8 | type: number
9 | data:
10 | type: object
11 | properties:
12 | u1:
13 | type: string
14 | u2:
15 | type: string
16 | required:
17 | - u1
18 | - u2
19 | required:
20 | - type
21 | - date
22 | - data
23 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimelineEntryForumPost.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | enum:
6 | - forum-post
7 | date:
8 | type: number
9 | data:
10 | type: object
11 | properties:
12 | userId:
13 | type: string
14 | topicId:
15 | type: string
16 | topicName:
17 | type: string
18 | postId:
19 | type: string
20 | required:
21 | - userId
22 | - topicId
23 | - topicName
24 | - postId
25 | required:
26 | - type
27 | - date
28 | - data
29 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimelineEntryGameEnd.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | enum:
6 | - game-end
7 | date:
8 | type: number
9 | data:
10 | type: object
11 | properties:
12 | fullId:
13 | type: string
14 | opponent:
15 | type: string
16 | win:
17 | type: boolean
18 | perf:
19 | $ref: "./PerfType.yaml"
20 | required:
21 | - fullId
22 | - opponent
23 | - win
24 | - perf
25 | required:
26 | - type
27 | - date
28 | - data
29 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimelineEntryPlanRenew.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | enum:
6 | - plan-renew
7 | date:
8 | type: number
9 | data:
10 | type: object
11 | properties:
12 | userId:
13 | type: string
14 | months:
15 | type: number
16 | required:
17 | - userId
18 | - months
19 | required:
20 | - type
21 | - date
22 | - data
23 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimelineEntryPlanStart.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | enum:
6 | - plan-start
7 | date:
8 | type: number
9 | data:
10 | type: object
11 | properties:
12 | userId:
13 | type: string
14 | required:
15 | - userId
16 | required:
17 | - type
18 | - date
19 | - data
20 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimelineEntrySimul.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | enum:
6 | - simul-create
7 | - simul-join
8 | date:
9 | type: number
10 | data:
11 | type: object
12 | properties:
13 | userId:
14 | type: string
15 | simulId:
16 | type: string
17 | simulName:
18 | type: string
19 | required:
20 | - userId
21 | - simulId
22 | - simulName
23 | required:
24 | - type
25 | - date
26 | - data
27 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimelineEntryStreamStart.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | enum:
6 | - stream-start
7 | date:
8 | type: number
9 | data:
10 | type: object
11 | properties:
12 | id:
13 | type: string
14 | title:
15 | type: string
16 | required:
17 | - id
18 | required:
19 | - type
20 | - date
21 | - data
22 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimelineEntryStudyLike.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | enum:
6 | - study-like
7 | date:
8 | type: number
9 | data:
10 | type: object
11 | properties:
12 | userId:
13 | type: string
14 | studyId:
15 | type: string
16 | studyName:
17 | type: string
18 | required:
19 | - userId
20 | - studyId
21 | - studyName
22 | required:
23 | - type
24 | - date
25 | - data
26 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimelineEntryTeamCreate.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | enum:
6 | - team-create
7 | date:
8 | type: number
9 | data:
10 | type: object
11 | properties:
12 | userId:
13 | type: string
14 | teamId:
15 | type: string
16 | required:
17 | - userId
18 | - teamId
19 | required:
20 | - type
21 | - date
22 | - data
23 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimelineEntryTeamJoin.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | enum:
6 | - team-join
7 | date:
8 | type: number
9 | data:
10 | type: object
11 | properties:
12 | userId:
13 | type: string
14 | teamId:
15 | type: string
16 | required:
17 | - userId
18 | - teamId
19 | required:
20 | - type
21 | - date
22 | - data
23 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimelineEntryTourJoin.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | enum:
6 | - tour-join
7 | date:
8 | type: number
9 | data:
10 | type: object
11 | properties:
12 | userId:
13 | type: string
14 | tourId:
15 | type: string
16 | tourName:
17 | type: string
18 | required:
19 | - userId
20 | - tourId
21 | - tourName
22 | required:
23 | - type
24 | - date
25 | - data
26 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimelineEntryUblogPost.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | enum:
6 | - ublog-post
7 | date:
8 | type: number
9 | data:
10 | type: object
11 | properties:
12 | userId:
13 | type: string
14 | id:
15 | type: string
16 | slug:
17 | type: string
18 | title:
19 | type: string
20 | required:
21 | - userId
22 | - id
23 | - slug
24 | - title
25 | required:
26 | - type
27 | - date
28 | - data
29 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TimelineEntryUblogPostLike.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | type:
4 | type: string
5 | enum:
6 | - ublog-post-like
7 | date:
8 | type: number
9 | data:
10 | type: object
11 | properties:
12 | userId:
13 | type: string
14 | id:
15 | type: string
16 | title:
17 | type: string
18 | required:
19 | - userId
20 | - id
21 | - title
22 | required:
23 | - type
24 | - date
25 | - data
26 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Title.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 | enum: [GM, WGM, IM, WIM, FM, WFM, NM, CM, WCM, WNM, LM, BOT]
3 | description: only appears if the user is a titled player or a bot user
4 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Top10s.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | bullet:
5 | $ref: "./PerfTop10.yaml"
6 | blitz:
7 | $ref: "./PerfTop10.yaml"
8 | rapid:
9 | $ref: "./PerfTop10.yaml"
10 | classical:
11 | $ref: "./PerfTop10.yaml"
12 | ultraBullet:
13 | $ref: "./PerfTop10.yaml"
14 | crazyhouse:
15 | $ref: "./PerfTop10.yaml"
16 | chess960:
17 | $ref: "./PerfTop10.yaml"
18 | kingOfTheHill:
19 | $ref: "./PerfTop10.yaml"
20 | threeCheck:
21 | $ref: "./PerfTop10.yaml"
22 | antichess:
23 | $ref: "./PerfTop10.yaml"
24 | atomic:
25 | $ref: "./PerfTop10.yaml"
26 | horde:
27 | $ref: "./PerfTop10.yaml"
28 | racingKings:
29 | $ref: "./PerfTop10.yaml"
30 |
31 | required:
32 | - bullet
33 | - blitz
34 | - rapid
35 | - classical
36 | - ultraBullet
37 | - crazyhouse
38 | - chess960
39 | - kingOfTheHill
40 | - threeCheck
41 | - antichess
42 | - atomic
43 | - horde
44 | - racingKings
45 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TopUser.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | id:
5 | type: string
6 | username:
7 | type: string
8 | perfs:
9 | type: object
10 | additionalProperties:
11 | type: object
12 | properties:
13 | rating:
14 | type: integer
15 | progress:
16 | type: integer
17 | required:
18 | - rating
19 | - progress
20 | title:
21 | $ref: "./Title.yaml"
22 | patron:
23 | type: boolean
24 | online:
25 | type: boolean
26 |
27 | required:
28 | - id
29 | - username
30 |
--------------------------------------------------------------------------------
/doc/specs/schemas/TvGame.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | user:
5 | $ref: "./LightUser.yaml"
6 | rating:
7 | type: number
8 | gameId:
9 | type: string
10 | color:
11 | $ref: "./GameColor.yaml"
12 |
13 | required:
14 | - user
15 | - rating
16 | - gameId
17 | - color
18 |
--------------------------------------------------------------------------------
/doc/specs/schemas/UciVariant.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 | enum:
3 | - chess
4 | - crazyhouse
5 | - antichess
6 | - atomic
7 | - horde
8 | - kingofthehill
9 | - racingkings
10 | - 3check
11 | example: chess
12 | default: chess
13 |
--------------------------------------------------------------------------------
/doc/specs/schemas/User.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | id:
5 | type: string
6 | example: georges
7 | username:
8 | type: string
9 | example: Georges
10 | perfs:
11 | $ref: "./Perfs.yaml"
12 | title:
13 | $ref: "./Title.yaml"
14 | flair:
15 | $ref: "./Flair.yaml"
16 | createdAt:
17 | type: integer
18 | format: int64
19 | example: 1290415680000
20 | disabled:
21 | type: boolean
22 | example: false
23 | description: only appears if a user's account is closed
24 | tosViolation:
25 | type: boolean
26 | example: false
27 | description: only appears if a user's account is marked for the violation of [Lichess TOS](https://lichess.org/terms-of-service)
28 | profile:
29 | $ref: "./Profile.yaml"
30 | seenAt:
31 | type: integer
32 | format: int64
33 | example: 1522636452014
34 | playTime:
35 | $ref: "./PlayTime.yaml"
36 | patron:
37 | type: boolean
38 | example: true
39 | verified:
40 | type: boolean
41 | example: true
42 |
43 | required:
44 | - id
45 | - username
46 |
--------------------------------------------------------------------------------
/doc/specs/schemas/UserActivityCorrespondenceGame.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | id:
5 | type: string
6 | color:
7 | $ref: "./GameColor.yaml"
8 | url:
9 | type: string
10 | variant:
11 | $ref: "./VariantKey.yaml"
12 | speed:
13 | type: string
14 | const: correspondence
15 | perf:
16 | type: string
17 | const: correspondence
18 | rated:
19 | type: boolean
20 | opponent:
21 | type: object
22 | required:
23 | - user
24 | - rating
25 | properties:
26 | user:
27 | type: string
28 | rating:
29 | type: number
30 |
31 | required:
32 | - id
33 | - color
34 | - url
35 | - variant
36 | - speed
37 | - perf
38 | - rated
39 | - opponent
40 |
--------------------------------------------------------------------------------
/doc/specs/schemas/UserActivityFollowList.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | ids:
5 | type: array
6 | items:
7 | type: string
8 | nb:
9 | type: number
10 |
11 | required:
12 | - ids
13 |
--------------------------------------------------------------------------------
/doc/specs/schemas/UserActivityScore.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | win:
5 | type: number
6 | loss:
7 | type: number
8 | draw:
9 | type: number
10 | rp:
11 | type: object
12 | properties:
13 | before:
14 | type: number
15 | after:
16 | type: number
17 |
18 | required:
19 | - win
20 | - loss
21 | - draw
22 | - rp
23 |
--------------------------------------------------------------------------------
/doc/specs/schemas/UserExtended.yaml:
--------------------------------------------------------------------------------
1 | allOf:
2 | - $ref: "./User.yaml"
3 |
4 | - properties:
5 | url:
6 | type: string
7 | format: uri
8 | example: https://lichess.org/@/georges
9 | playing:
10 | type: string
11 | format: uri
12 | example: https://lichess.org/yqfLYJ5E/black
13 | count:
14 | $ref: "./Count.yaml"
15 | streaming:
16 | type: boolean
17 | example: false
18 | streamer:
19 | $ref: "./UserStreamer.yaml"
20 | followable:
21 | type: boolean
22 | example: true
23 | description: only appears if the request is [authenticated with OAuth2](#section/Introduction/Authentication)
24 | following:
25 | type: boolean
26 | example: false
27 | description: only appears if the request is [authenticated with OAuth2](#section/Introduction/Authentication)
28 | blocking:
29 | type: boolean
30 | example: false
31 | description: only appears if the request is [authenticated with OAuth2](#section/Introduction/Authentication)
32 |
33 | required:
34 | - url
35 |
--------------------------------------------------------------------------------
/doc/specs/schemas/UserNote.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | from:
4 | $ref: "./LightUser.yaml"
5 | to:
6 | $ref: "./LightUser.yaml"
7 | text:
8 | type: string
9 | example: "This is a note"
10 | date:
11 | type: integer
12 | format: int64
13 | example: 1290415680000
14 |
--------------------------------------------------------------------------------
/doc/specs/schemas/UserStreamer.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | twitch:
4 | type: object
5 | properties:
6 | channel:
7 | type: string
8 | format: uri
9 | example: https://www.twitch.tv/lichessdotorg
10 | youTube:
11 | type: object
12 | properties:
13 | channel:
14 | type: string
15 | format: uri
16 | example: https://www.youtube.com/c/LichessDotOrg
17 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Variant.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | key:
4 | $ref: "./VariantKey.yaml"
5 | name:
6 | type: string
7 | short:
8 | type: string
9 |
10 | required:
11 | - key
12 | - name
13 |
--------------------------------------------------------------------------------
/doc/specs/schemas/VariantKey.yaml:
--------------------------------------------------------------------------------
1 | type: string
2 | enum:
3 | - standard
4 | - chess960
5 | - crazyhouse
6 | - antichess
7 | - atomic
8 | - horde
9 | - kingOfTheHill
10 | - racingKings
11 | - threeCheck
12 | - fromPosition
13 | example: standard
14 | default: standard
15 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Verdict.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 | properties:
3 | condition:
4 | type: string
5 | verdict:
6 | type: string
7 |
8 | required:
9 | - condition
10 | - verdict
11 |
--------------------------------------------------------------------------------
/doc/specs/schemas/Verdicts.yaml:
--------------------------------------------------------------------------------
1 | type: object
2 |
3 | properties:
4 | accepted:
5 | type: boolean
6 | list:
7 | type: array
8 | items:
9 | $ref: "./Verdict.yaml"
10 |
11 | required:
12 | - accepted
13 | - list
14 |
--------------------------------------------------------------------------------
/doc/specs/tags/account/api-account-email.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: accountEmail
3 | summary: Get my email address
4 | description: |
5 | Read the email address of the logged in user.
6 | tags:
7 | - Account
8 | security:
9 | - OAuth2: ["email:read"]
10 | responses:
11 | "200":
12 | description: The email address of the logged in user.
13 | headers:
14 | Access-Control-Allow-Origin:
15 | schema:
16 | type: string
17 | default: "'*'"
18 | content:
19 | application/json:
20 | schema:
21 | properties:
22 | email:
23 | type: string
24 | example:
25 | $ref: "../../examples/account-getMyEmailAddress.json"
26 |
--------------------------------------------------------------------------------
/doc/specs/tags/account/api-account-preferences.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: account
3 | summary: Get my preferences
4 | description: |
5 | Read the preferences of the logged in user.
6 | -
7 | -
8 | tags:
9 | - Account
10 | security:
11 | - OAuth2: ["preference:read"]
12 | responses:
13 | "200":
14 | description: The preferences of the logged in user.
15 | headers:
16 | Access-Control-Allow-Origin:
17 | schema:
18 | type: string
19 | default: "'*'"
20 | content:
21 | application/json:
22 | schema:
23 | properties:
24 | prefs:
25 | $ref: "../../schemas/UserPreferences.yaml"
26 | language:
27 | type: string
28 | example: en-GB
29 | example:
30 | $ref: "../../examples/account-getMyPreferences.json"
31 |
--------------------------------------------------------------------------------
/doc/specs/tags/account/api-account.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: accountMe
3 | summary: Get my profile
4 | description: |
5 | Public information about the logged in user.
6 | tags:
7 | - Account
8 | security:
9 | - OAuth2: []
10 | responses:
11 | "200":
12 | description: The public information about the logged in user.
13 | headers:
14 | Access-Control-Allow-Origin:
15 | schema:
16 | type: string
17 | default: "'*'"
18 | content:
19 | application/json:
20 | schema:
21 | $ref: "../../schemas/UserExtended.yaml"
22 | example:
23 | $ref: "../../examples/account-getMyProfile.json"
24 |
--------------------------------------------------------------------------------
/doc/specs/tags/account/api-timeline.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: timeline
3 | summary: Get my timeline
4 | description: |
5 | Get the timeline events of the logged in user.
6 | tags:
7 | - Account
8 | security:
9 | - OAuth2: []
10 | parameters:
11 | - in: query
12 | name: since
13 | description: Show events since this timestamp.
14 | schema:
15 | type: integer
16 | minimum: 1356998400070
17 | - in: query
18 | name: nb
19 | description: Max number of events to fetch.
20 | schema:
21 | type: integer
22 | default: 15
23 | minimum: 1
24 | maximum: 30
25 | responses:
26 | "200":
27 | description: The events in the timeline of the logged in user.
28 | headers:
29 | Access-Control-Allow-Origin:
30 | schema:
31 | type: string
32 | default: "'*'"
33 | content:
34 | application/json:
35 | schema:
36 | $ref: "../../schemas/Timeline.yaml"
37 | example:
38 | $ref: "../../examples/account-getMyTimeline.json"
39 |
--------------------------------------------------------------------------------
/doc/specs/tags/arenatournaments/api-tournament-id-terminate.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: apiTournamentTerminate
3 | summary: Terminate an Arena tournament
4 | description: |
5 | Terminate an Arena tournament
6 | tags:
7 | - "Arena tournaments"
8 | security:
9 | - OAuth2: ["tournament:write"]
10 | parameters:
11 | - in: path
12 | name: id
13 | description: The tournament ID.
14 | schema:
15 | type: string
16 | example: "hL7vMrFQ"
17 | required: true
18 | responses:
19 | "200":
20 | description: The tournament was successfully terminated.
21 | headers:
22 | Access-Control-Allow-Origin:
23 | schema:
24 | type: string
25 | default: "'*'"
26 | content:
27 | application/json:
28 | schema:
29 | $ref: "../../schemas/Ok.yaml"
30 | "400":
31 | description: Terminating the tournament failed.
32 | content:
33 | application/json:
34 | schema:
35 | $ref: "../../schemas/Error.yaml"
36 |
--------------------------------------------------------------------------------
/doc/specs/tags/arenatournaments/api-tournament-id-withdraw.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: apiTournamentWithdraw
3 | summary: Pause or leave an Arena tournament
4 | description: |
5 | Leave a future Arena tournament, or take a break on an ongoing Arena tournament.
6 | It's possible to join again later. Points and streaks are preserved.
7 | tags:
8 | - "Arena tournaments"
9 | security:
10 | - OAuth2: ["tournament:write"]
11 | parameters:
12 | - in: path
13 | name: id
14 | description: The tournament ID.
15 | schema:
16 | type: string
17 | example: "hL7vMrFQ"
18 | required: true
19 | responses:
20 | "200":
21 | description: The tournament was successfully paused or left.
22 | headers:
23 | Access-Control-Allow-Origin:
24 | schema:
25 | type: string
26 | default: "'*'"
27 | content:
28 | application/json:
29 | schema:
30 | $ref: "../../schemas/Ok.yaml"
31 | "400":
32 | description: Pausing/leaving the tournament failed.
33 | content:
34 | application/json:
35 | schema:
36 | $ref: "../../schemas/Error.yaml"
37 |
--------------------------------------------------------------------------------
/doc/specs/tags/board/api-board-game-gameId-abort.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: boardGameAbort
3 | summary: Abort a game
4 | description: |
5 | Abort a game being played with the Board API.
6 | tags:
7 | - Board
8 | security:
9 | - OAuth2: ["board:play"]
10 | parameters:
11 | - in: path
12 | name: gameId
13 | schema:
14 | type: string
15 | example: "5IrD6Gzz"
16 | required: true
17 | responses:
18 | "200":
19 | description: The game successfully aborted.
20 | headers:
21 | Access-Control-Allow-Origin:
22 | schema:
23 | type: string
24 | default: "'*'"
25 | content:
26 | application/json:
27 | schema:
28 | $ref: "../../schemas/Ok.yaml"
29 | "400":
30 | description: The abortion of the game failed.
31 | content:
32 | application/json:
33 | schema:
34 | $ref: "../../schemas/Error.yaml"
35 |
--------------------------------------------------------------------------------
/doc/specs/tags/board/api-board-game-gameId-berserk.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: boardGameBerserk
3 | summary: Berserk a tournament game
4 | description: |
5 | Go berserk on an arena tournament game. Halves the clock time, grants an extra point upon winning.
6 | Only available in arena tournaments that allow berserk, and before each player has made a move.
7 | tags:
8 | - Board
9 | security:
10 | - OAuth2: ["board:play"]
11 | parameters:
12 | - in: path
13 | name: gameId
14 | schema:
15 | type: string
16 | example: "5IrD6Gzz"
17 | required: true
18 | responses:
19 | "200":
20 | description: The player successfully went berserk.
21 | headers:
22 | Access-Control-Allow-Origin:
23 | schema:
24 | type: string
25 | default: "'*'"
26 | content:
27 | application/json:
28 | schema:
29 | $ref: "../../schemas/Ok.yaml"
30 | "400":
31 | description: The berserk has failed.
32 | content:
33 | application/json:
34 | schema:
35 | $ref: "../../schemas/Error.yaml"
36 |
--------------------------------------------------------------------------------
/doc/specs/tags/board/api-board-game-gameId-claim-victory.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: boardGameClaimVictory
3 | summary: Claim victory of a game
4 | description: |
5 | Claim victory when the opponent has left the game for a while.
6 | tags:
7 | - Board
8 | security:
9 | - OAuth2: ["board:play"]
10 | parameters:
11 | - in: path
12 | name: gameId
13 | schema:
14 | type: string
15 | example: "5IrD6Gzz"
16 | required: true
17 | responses:
18 | "200":
19 | description: The victory was successfully claimed.
20 | headers:
21 | Access-Control-Allow-Origin:
22 | schema:
23 | type: string
24 | default: "'*'"
25 | content:
26 | application/json:
27 | schema:
28 | $ref: "../../schemas/Ok.yaml"
29 | "400":
30 | description: The victory claim has failed.
31 | content:
32 | application/json:
33 | schema:
34 | $ref: "../../schemas/Error.yaml"
35 |
--------------------------------------------------------------------------------
/doc/specs/tags/board/api-board-game-gameId-draw-accept.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: boardGameDraw
3 | summary: Handle draw offers
4 | description: |
5 | Create/accept/decline draw offers.
6 | - `yes`: Offer a draw, or accept the opponent's draw offer.
7 | - `no`: Decline a draw offer from the opponent.
8 | tags:
9 | - Board
10 | security:
11 | - OAuth2: ["board:play"]
12 | parameters:
13 | - in: path
14 | name: gameId
15 | schema:
16 | type: string
17 | example: "5IrD6Gzz"
18 | required: true
19 | - in: path
20 | name: accept
21 | schema:
22 | anyOf:
23 | - type: boolean
24 | - type: string
25 | const: yes
26 | example: "yes"
27 | required: true
28 | responses:
29 | "200":
30 | description: The draw offer was successfully sent.
31 | headers:
32 | Access-Control-Allow-Origin:
33 | schema:
34 | type: string
35 | default: "'*'"
36 | content:
37 | application/json:
38 | schema:
39 | $ref: "../../schemas/Ok.yaml"
40 | "400":
41 | description: The draw offering failed.
42 | content:
43 | application/json:
44 | schema:
45 | $ref: "../../schemas/Error.yaml"
46 |
--------------------------------------------------------------------------------
/doc/specs/tags/board/api-board-game-gameId-resign.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: boardGameResign
3 | summary: Resign a game
4 | description: |
5 | Resign a game being played with the Board API.
6 | tags:
7 | - Board
8 | security:
9 | - OAuth2: ["board:play"]
10 | parameters:
11 | - in: path
12 | name: gameId
13 | schema:
14 | type: string
15 | example: "5IrD6Gzz"
16 | required: true
17 | responses:
18 | "200":
19 | description: The game was successfully resigned.
20 | headers:
21 | Access-Control-Allow-Origin:
22 | schema:
23 | type: string
24 | default: "'*'"
25 | content:
26 | application/json:
27 | schema:
28 | $ref: "../../schemas/Ok.yaml"
29 | "400":
30 | description: The resigning from the game failed.
31 | content:
32 | application/json:
33 | schema:
34 | $ref: "../../schemas/Error.yaml"
35 |
--------------------------------------------------------------------------------
/doc/specs/tags/bot/api-bot-game-gameId-abort.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: botGameAbort
3 | summary: Abort a game
4 | description: |
5 | Abort a game being played with the Bot API.
6 | tags:
7 | - Bot
8 | security:
9 | - OAuth2: ["bot:play"]
10 | parameters:
11 | - in: path
12 | name: gameId
13 | schema:
14 | type: string
15 | example: "5IrD6Gzz"
16 | required: true
17 | responses:
18 | "200":
19 | description: The game was successfully aborted.
20 | headers:
21 | Access-Control-Allow-Origin:
22 | schema:
23 | type: string
24 | default: "'*'"
25 | content:
26 | application/json:
27 | schema:
28 | $ref: "../../schemas/Ok.yaml"
29 | "400":
30 | description: The abortion of the game failed.
31 | content:
32 | application/json:
33 | schema:
34 | $ref: "../../schemas/Error.yaml"
35 |
--------------------------------------------------------------------------------
/doc/specs/tags/bot/api-bot-game-gameId-claim-victory.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: botGameClaimVictory
3 | summary: Claim victory of a game
4 | description: |
5 | Claim victory when the opponent has left the game for a while.
6 | tags:
7 | - Bot
8 | security:
9 | - OAuth2: ["bot:play"]
10 | parameters:
11 | - in: path
12 | name: gameId
13 | schema:
14 | type: string
15 | example: "5IrD6Gzz"
16 | required: true
17 | responses:
18 | "200":
19 | description: The victory was successfully claimed.
20 | headers:
21 | Access-Control-Allow-Origin:
22 | schema:
23 | type: string
24 | default: "'*'"
25 | content:
26 | application/json:
27 | schema:
28 | $ref: "../../schemas/Ok.yaml"
29 | "400":
30 | description: The victory claim has failed.
31 | content:
32 | application/json:
33 | schema:
34 | $ref: "../../schemas/Error.yaml"
35 |
--------------------------------------------------------------------------------
/doc/specs/tags/bot/api-bot-game-gameId-draw-accept.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: botGameDraw
3 | summary: Handle draw offers
4 | description: |
5 | Create/accept/decline draw offers with the Bot API.
6 | - `yes`: Offer a draw, or accept the opponent's draw offer.
7 | - `no`: Decline a draw offer from the opponent.
8 | tags:
9 | - Bot
10 | security:
11 | - OAuth2: ["bot:play"]
12 | parameters:
13 | - in: path
14 | name: gameId
15 | schema:
16 | type: string
17 | example: "5IrD6Gzz"
18 | required: true
19 | - in: path
20 | name: accept
21 | schema:
22 | anyOf:
23 | - type: boolean
24 | - type: string
25 | const: yes
26 | example: "yes"
27 | required: true
28 | responses:
29 | "200":
30 | description: The draw offer was successfully sent.
31 | headers:
32 | Access-Control-Allow-Origin:
33 | schema:
34 | type: string
35 | default: "'*'"
36 | content:
37 | application/json:
38 | schema:
39 | $ref: "../../schemas/Ok.yaml"
40 | "400":
41 | description: The draw offering failed.
42 | content:
43 | application/json:
44 | schema:
45 | $ref: "../../schemas/Error.yaml"
46 |
--------------------------------------------------------------------------------
/doc/specs/tags/bot/api-bot-game-gameId-resign.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: botGameResign
3 | summary: Resign a game
4 | description: |
5 | Resign a game being played with the Bot API.
6 | tags:
7 | - Bot
8 | security:
9 | - OAuth2: ["bot:play"]
10 | parameters:
11 | - in: path
12 | name: gameId
13 | schema:
14 | type: string
15 | example: "5IrD6Gzz"
16 | required: true
17 | responses:
18 | "200":
19 | description: The game was successfully resigned from.
20 | headers:
21 | Access-Control-Allow-Origin:
22 | schema:
23 | type: string
24 | default: "'*'"
25 | content:
26 | application/json:
27 | schema:
28 | $ref: "../../schemas/Ok.yaml"
29 | "400":
30 | description: Resigning the game failed.
31 | content:
32 | application/json:
33 | schema:
34 | $ref: "../../schemas/Error.yaml"
35 |
--------------------------------------------------------------------------------
/doc/specs/tags/bot/api-bot-online.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: apiBotOnline
3 | summary: Get online bots
4 | tags:
5 | - Bot
6 | security: []
7 | description: Stream the [online bot users](https://lichess.org/player/bots), as [ndjson](#section/Introduction/Streaming-with-ND-JSON). Throttled to 50 bot users per second.
8 | parameters:
9 | - in: query
10 | name: nb
11 | description: How many bot users to fetch
12 | schema:
13 | type: integer
14 | minimum: 1
15 | example: 20
16 | responses:
17 | "200":
18 | description: The list of online bot users
19 | headers:
20 | Access-Control-Allow-Origin:
21 | schema:
22 | type: string
23 | default: "'*'"
24 | content:
25 | application/x-ndjson:
26 | schema:
27 | $ref: "../../schemas/User.yaml"
28 | example:
29 | $ref: "../../examples/bot-getOnlineBots.json"
30 |
--------------------------------------------------------------------------------
/doc/specs/tags/broadcasts/api-broadcast-broadcastTournamentId-pgn.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: broadcastAllRoundsPgn
3 | summary: Export all rounds as PGN
4 | description: |
5 | Download all games of all rounds of a broadcast in PGN format.
6 | If a `study:read` [OAuth token](#tag/OAuth) is provided,
7 | the private rounds where the user is a contributor will be available.
8 | You may want to [download only the games of a single round](#operation/broadcastRoundPgn) instead.
9 | tags:
10 | - Broadcasts
11 | security:
12 | - OAuth2: ["study:read"]
13 | parameters:
14 | - in: path
15 | name: broadcastTournamentId
16 | description: The broadcast tournament ID
17 | required: true
18 | schema:
19 | type: string
20 | minLength: 8
21 | maxLength: 8
22 | responses:
23 | "200":
24 | description: The PGN representation of the broadcast.
25 | headers:
26 | Access-Control-Allow-Origin:
27 | schema:
28 | type: string
29 | default: "'*'"
30 | content:
31 | application/x-chess-pgn:
32 | schema:
33 | $ref: "../../schemas/StudyPgn.yaml"
34 | examples:
35 | pgn:
36 | $ref: "../../examples/broadcasts-exportAllRoundsAsPgn.pgn.yaml"
37 |
--------------------------------------------------------------------------------
/doc/specs/tags/broadcasts/api-broadcast-my-rounds.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: broadcastMyRoundsGet
3 | summary: Get your broadcast rounds
4 | description: |
5 | Stream all broadcast rounds you are a member of.
6 | Also includes broadcasts rounds you did not create, but were invited to.
7 | Also includes broadcasts rounds where you're a non-writing member. See the `writeable` flag in the response.
8 | Rounds are ordered by rank, which is roughly chronological, most recent first, slightly pondered with popularity.
9 | tags:
10 | - Broadcasts
11 | security:
12 | - OAuth2: ["study:read"]
13 | parameters:
14 | - in: query
15 | name: nb
16 | description: How many rounds to get
17 | schema:
18 | type: integer
19 | minimum: 1
20 | example: 20
21 | responses:
22 | "200":
23 | description: The broadcast rounds with their tournament and a `study.writeable` flag.
24 | content:
25 | application/x-ndjson:
26 | schema:
27 | $ref: "../../schemas/BroadcastMyRound.yaml"
28 | example:
29 | $ref: "../../examples/broadcasts-getYourBroadcastRounds.json"
30 |
--------------------------------------------------------------------------------
/doc/specs/tags/broadcasts/api-broadcast-round-broadcastRoundId-pgn.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: broadcastRoundPgn
3 | summary: Export one round as PGN
4 | description: |
5 | Download all games of a single round of a broadcast tournament in PGN format.
6 | You *could* poll this endpoint to get updates about a tournament, but it would be slow,
7 | and very inefficient.
8 | Instead, consider [streaming the tournament](#operation/broadcastStreamRoundPgn) to get
9 | a new PGN every time a game is updated, in real-time.
10 | tags:
11 | - Broadcasts
12 | security: []
13 | parameters:
14 | - in: path
15 | name: broadcastRoundId
16 | description: The round ID
17 | required: true
18 | schema:
19 | type: string
20 | minLength: 8
21 | maxLength: 8
22 | responses:
23 | "200":
24 | description: The PGN representation of the round.
25 | headers:
26 | Access-Control-Allow-Origin:
27 | schema:
28 | type: string
29 | default: "'*'"
30 | content:
31 | application/x-chess-pgn:
32 | schema:
33 | $ref: "../../schemas/StudyPgn.yaml"
34 | examples:
35 | pgn:
36 | $ref: "../../examples/broadcasts-exportOneRoundAsPgn.pgn.yaml"
37 |
--------------------------------------------------------------------------------
/doc/specs/tags/broadcasts/api-broadcasts-official.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: broadcastsOfficial
3 | summary: Get official broadcasts
4 | description: |
5 | Get all incoming, ongoing, and finished official broadcasts.
6 | The broadcasts are sorted by start date, most recent first.
7 | Broadcasts are streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON).
8 | tags:
9 | - Broadcasts
10 | security: []
11 | parameters:
12 | - in: query
13 | name: nb
14 | description: Max number of broadcasts to fetch
15 | schema:
16 | type: integer
17 | default: 20
18 | minimum: 1
19 | - in: query
20 | name: html
21 | description: Convert the "description" field from markdown to HTML
22 | schema:
23 | type: boolean
24 | example: true
25 | responses:
26 | "200":
27 | description: The list of official broadcasts.
28 | headers:
29 | Access-Control-Allow-Origin:
30 | schema:
31 | type: string
32 | default: "'*'"
33 | content:
34 | application/x-ndjson:
35 | schema:
36 | $ref: "../../schemas/BroadcastWithRounds.yaml"
37 | example:
38 | $ref: "../../examples/broadcasts-getOfficialBroadcasts.json"
39 |
--------------------------------------------------------------------------------
/doc/specs/tags/broadcasts/api-broadcasts-top.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: broadcastsTop
3 | summary: Get paginated top broadcast previews
4 | description: |
5 | The same data, in the same order, as can be seen on [https://lichess.org/broadcast](/broadcast).
6 | tags:
7 | - Broadcasts
8 | security: []
9 | parameters:
10 | - in: query
11 | name: page
12 | description: Which page to fetch. Only page 1 has "active" broadcasts.
13 | schema:
14 | type: integer
15 | default: 1
16 | minimum: 1
17 | maximum: 20
18 | - in: query
19 | name: html
20 | description: Convert the "description" field from markdown to HTML
21 | schema:
22 | type: boolean
23 | example: true
24 | responses:
25 | "200":
26 | description: Paginated top broadcast previews.
27 | headers:
28 | Access-Control-Allow-Origin:
29 | schema:
30 | type: string
31 | default: "'*'"
32 | content:
33 | application/json:
34 | schema:
35 | $ref: "../../schemas/BroadcastTop.yaml"
36 | example:
37 | $ref: "../../examples/broadcasts-getPaginatedToBroadcastPreviews.json"
38 |
--------------------------------------------------------------------------------
/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId-players.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: broadcastPlayersGet
3 | summary: Get players of a broadcast
4 | description: |
5 | Get the list of players of a broadcast tournament, if available.
6 | tags:
7 | - Broadcasts
8 | security: []
9 | parameters:
10 | - in: path
11 | name: broadcastTournamentId
12 | description: The broadcast tournament ID
13 | required: true
14 | schema:
15 | type: string
16 | minLength: 8
17 | maxLength: 8
18 | responses:
19 | "200":
20 | description: The broadcast players
21 | content:
22 | application/json:
23 | schema:
24 | type: array
25 | items:
26 | $ref: "../../schemas/BroadcastPlayerEntry.yaml"
27 | example:
28 | $ref: "../../examples/broadcasts-getPlayersOfBroadcastTournament.json"
29 |
--------------------------------------------------------------------------------
/doc/specs/tags/broadcasts/broadcast-broadcastTournamentId.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: broadcastTourGet
3 | summary: Get a broadcast tournament
4 | description: |
5 | Get information about a broadcast tournament.
6 | tags:
7 | - Broadcasts
8 | security: []
9 | parameters:
10 | - in: path
11 | name: broadcastTournamentId
12 | description: The broadcast tournament ID
13 | required: true
14 | schema:
15 | type: string
16 | minLength: 8
17 | maxLength: 8
18 | responses:
19 | "200":
20 | description: The information about the broadcast tournament.
21 | content:
22 | application/json:
23 | schema:
24 | $ref: "../../schemas/BroadcastWithRounds.yaml"
25 | example:
26 | $ref: "../../examples/broadcasts-getBroadcastTournament.json"
27 |
--------------------------------------------------------------------------------
/doc/specs/tags/broadcasts/broadcast-new.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: broadcastTourCreate
3 | summary: Create a broadcast tournament
4 | description: |
5 | Create a new broadcast tournament to relay external games.
6 | This endpoint accepts the same form data as the [web form](https://lichess.org/broadcast/new).
7 | tags:
8 | - Broadcasts
9 | security:
10 | - OAuth2: ["study:write"]
11 | requestBody:
12 | required: true
13 | content:
14 | application/x-www-form-urlencoded:
15 | schema:
16 | $ref: "../../schemas/BroadcastForm.yaml"
17 | responses:
18 | "200":
19 | description: The broadcast tournament was successfully created.
20 | headers:
21 | Access-Control-Allow-Origin:
22 | schema:
23 | type: string
24 | default: "'*'"
25 | content:
26 | application/json:
27 | schema:
28 | $ref: "../../schemas/BroadcastWithRounds.yaml"
29 | example:
30 | $ref: "../../examples/broadcasts-createBroadcastTournament.json"
31 | "400":
32 | description: The creation of the broadcast tournament failed.
33 | content:
34 | application/json:
35 | schema:
36 | $ref: "../../schemas/Error.yaml"
37 |
--------------------------------------------------------------------------------
/doc/specs/tags/broadcasts/broadcast-round-broadcastRoundId-reset.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: broadcastRoundReset
3 | summary: Reset a broadcast round
4 | description: |
5 | Remove any games from the broadcast round and reset it to its initial state.
6 | tags:
7 | - Broadcasts
8 | security:
9 | - OAuth2: ["study:write"]
10 | parameters:
11 | - in: path
12 | name: broadcastRoundId
13 | description: The broadcast round ID
14 | required: true
15 | schema:
16 | type: string
17 | minLength: 8
18 | maxLength: 8
19 | responses:
20 | "200":
21 | description: The broadcast round was successfully reset.
22 | headers:
23 | Access-Control-Allow-Origin:
24 | schema:
25 | type: string
26 | default: "'*'"
27 | content:
28 | application/json:
29 | schema:
30 | $ref: "../../schemas/Ok.yaml"
31 | example:
32 | $ref: "../../examples/broadcasts-resetBroadcastRound.json"
33 |
--------------------------------------------------------------------------------
/doc/specs/tags/challenges/api-challenge-challengeId-accept.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: challengeAccept
3 | summary: Accept a challenge
4 | description: |
5 | Accept an incoming challenge.
6 | You should receive a `gameStart` event on the [incoming events stream](#operation/apiStreamEvent).
7 | tags:
8 | - Challenges
9 | security:
10 | - OAuth2: ["challenge:write", "bot:play", "board:play"]
11 | parameters:
12 | - in: path
13 | name: challengeId
14 | schema:
15 | type: string
16 | example: "5IrD6Gzz"
17 | required: true
18 | responses:
19 | "200":
20 | description: The challenge was successfully accepted.
21 | headers:
22 | Access-Control-Allow-Origin:
23 | schema:
24 | type: string
25 | default: "'*'"
26 | content:
27 | application/json:
28 | schema:
29 | $ref: "../../schemas/Ok.yaml"
30 | example:
31 | $ref: "../../examples/challenges-acceptChallenge.json"
32 | "404":
33 | description: The challenge to accept was not found.
34 | content:
35 | application/json:
36 | schema:
37 | $ref: "../../schemas/NotFound.yaml"
38 |
--------------------------------------------------------------------------------
/doc/specs/tags/challenges/api-challenge-id-show.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: challengeShow
3 | summary: Show one challenge
4 | description: |
5 | Get details about a challenge, even if it has been recently accepted, canceled or declined.
6 | tags:
7 | - Challenges
8 | security:
9 | - OAuth2: ["challenge:read"]
10 | parameters:
11 | - in: path
12 | name: challengeId
13 | required: true
14 | description: The challenge ID
15 | schema:
16 | type: string
17 | responses:
18 | "200":
19 | description: The challenge for that ID.
20 | headers:
21 | Access-Control-Allow-Origin:
22 | schema:
23 | type: string
24 | default: "'*'"
25 | content:
26 | application/json:
27 | schema:
28 | $ref: "../../schemas/ChallengeJson.yaml"
29 | example:
30 | $ref: "../../examples/challenges-showOneChallenge.json"
31 |
--------------------------------------------------------------------------------
/doc/specs/tags/challenges/api-challenge.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: challengeList
3 | summary: List your challenges
4 | description: |
5 | Get a list of challenges created by or targeted at you.
6 | tags:
7 | - Challenges
8 | security:
9 | - OAuth2: ["challenge:read"]
10 | responses:
11 | "200":
12 | description: The list of challenges created by or targeted at the logged in user.
13 | headers:
14 | Access-Control-Allow-Origin:
15 | schema:
16 | type: string
17 | default: "'*'"
18 | content:
19 | application/json:
20 | schema:
21 | type: object
22 | properties:
23 | in:
24 | type: array
25 | description: Incoming challenges i.e. targeted at you
26 | items:
27 | $ref: "../../schemas/ChallengeJson.yaml"
28 | out:
29 | type: array
30 | description: Outgoing challenges i.e. created by you
31 | items:
32 | $ref: "../../schemas/ChallengeJson.yaml"
33 | example:
34 | $ref: "../../examples/challenges-listYourChallenges.json"
35 |
--------------------------------------------------------------------------------
/doc/specs/tags/challenges/api-round-gameId-add-time-seconds.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: roundAddTime
3 | summary: Add time to the opponent clock
4 | description: |
5 | Add seconds to the opponent's clock. Can be used to create games with time odds.
6 | tags:
7 | - Challenges
8 | security:
9 | - OAuth2: ["challenge:write"]
10 | parameters:
11 | - in: path
12 | name: gameId
13 | schema:
14 | type: string
15 | description: ID of the game
16 | required: true
17 | - in: path
18 | name: seconds
19 | description: How many seconds to give
20 | schema:
21 | type: number
22 | minimum: 5
23 | maximum: 60
24 | required: true
25 | responses:
26 | "200":
27 | description: Time was successfully added to the opponent's clock.
28 | headers:
29 | Access-Control-Allow-Origin:
30 | schema:
31 | type: string
32 | default: "'*'"
33 | content:
34 | application/json:
35 | schema:
36 | $ref: "../../schemas/Ok.yaml"
37 | example:
38 | $ref: "../../examples/challenges-addTimeToOpponent.json"
39 |
--------------------------------------------------------------------------------
/doc/specs/tags/fide/api-fide-player-playerId.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: fidePlayerGet
3 | summary: Get a FIDE player
4 | description: |
5 | Get information about a FIDE player.
6 | tags:
7 | - FIDE
8 | security: []
9 | parameters:
10 | - in: path
11 | name: playerId
12 | description: The FIDE player ID.
13 | required: true
14 | schema:
15 | type: number
16 | responses:
17 | "200":
18 | description: The information about the FIDE player.
19 | content:
20 | application/json:
21 | schema:
22 | $ref: "../../schemas/FIDEPlayer.yaml"
23 | examples:
24 | example player:
25 | $ref: "../../examples/fide-getFidePlayer.json.yaml"
26 | example player without all values:
27 | $ref: "../../examples/fide-getFidePlayer-nullYear.json.yaml"
28 |
--------------------------------------------------------------------------------
/doc/specs/tags/fide/api-fide-player-search.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: fidePlayerSearch
3 | summary: Search FIDE players
4 | description: |
5 | List of FIDE players search results for a query.
6 | tags:
7 | - FIDE
8 | security: []
9 | parameters:
10 | - in: query
11 | name: q
12 | description: The search query.
13 | required: true
14 | schema:
15 | type: string
16 | example: Erigaisi Arjun
17 | responses:
18 | "200":
19 | description: The list of FIDE players.
20 | headers:
21 | Access-Control-Allow-Origin:
22 | schema:
23 | type: string
24 | default: "'*'"
25 | content:
26 | application/json:
27 | schema:
28 | type: array
29 | items:
30 | $ref: "../../schemas/FIDEPlayer.yaml"
31 | example:
32 | $ref: "../../examples/fide-searchFidePlayers.json"
33 |
--------------------------------------------------------------------------------
/doc/specs/tags/games/api-games-export-imports.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: apiImportedGamesUser
3 | summary: Export your imported games
4 | description: Download all games imported by you. Games are exported in PGN format.
5 | tags:
6 | - Games
7 | security:
8 | - OAuth2: []
9 | responses:
10 | "200":
11 | description: "Imported games in PGN format"
12 | headers:
13 | Access-Control-Allow-Origin:
14 | schema:
15 | type: string
16 | default: "'*'"
17 | content:
18 | application/x-chess-pgn:
19 | schema:
20 | $ref: "../../schemas/GamePgn.yaml"
21 |
--------------------------------------------------------------------------------
/doc/specs/tags/games/api-stream-game-id.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: streamGame
3 | summary: Stream moves of a game
4 | description: |
5 | Stream positions and moves of any ongoing game, in [ndjson](#section/Introduction/Streaming-with-ND-JSON).
6 | A description of the game is sent as a first message.
7 | Then a message is sent each time a move is played.
8 | Finally a description of the game is sent when it finishes, and the stream is closed.
9 | Ongoing games are delayed by a few seconds ranging from 3 to 60 depending on the time control, as to prevent cheat bots from using this API.
10 | No more than 8 game streams can be opened at the same time from the same IP address.
11 | tags:
12 | - Games
13 | security: []
14 | parameters:
15 | - in: path
16 | name: id
17 | schema:
18 | type: string
19 | example: "LuGQwhBb"
20 | required: true
21 | responses:
22 | "200":
23 | description: The stream of the game moves.
24 | content:
25 | application/x-ndjson:
26 | schema:
27 | $ref: "../../schemas/MoveStream.yaml"
28 |
--------------------------------------------------------------------------------
/doc/specs/tags/games/api-stream-games-streamId-add.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: gamesByIdsAdd
3 | summary: Add game IDs to stream
4 | description: |
5 | Add new game IDs for [an existing stream](#operation/gamesByIds) to watch.
6 | The stream will immediately outputs the games that already exists, then emit an event each time a game is started or finished.
7 | tags:
8 | - Games
9 | security: []
10 | parameters:
11 | - in: path
12 | name: streamId
13 | schema:
14 | type: string
15 | description: The stream ID you used to [create the stream](#operation/gamesByIds).
16 | example: "myAppName-someRandomId"
17 | required: true
18 | requestBody:
19 | description: |
20 | Up to 500 or 1000 game IDs separated by commas.
21 | Example: `gameId04,gameId05,gameId06`
22 | required: true
23 | content:
24 | text/plain:
25 | schema:
26 | type: string
27 | responses:
28 | "200":
29 | description: The game IDs have been added to the stream.
30 | headers:
31 | Access-Control-Allow-Origin:
32 | schema:
33 | type: string
34 | default: "'*'"
35 | content:
36 | application/json:
37 | schema:
38 | $ref: "../../schemas/Ok.yaml"
39 |
--------------------------------------------------------------------------------
/doc/specs/tags/messaging/inbox-username.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: inboxUsername
3 | summary: Send a private message
4 | description: |
5 | Send a private message to another player.
6 | tags:
7 | - Messaging
8 | security:
9 | - OAuth2: ["msg:write"]
10 | parameters:
11 | - in: path
12 | name: username
13 | schema:
14 | type: string
15 | example: "someplayer"
16 | required: true
17 | requestBody:
18 | required: true
19 | content:
20 | application/x-www-form-urlencoded:
21 | schema:
22 | type: object
23 | properties:
24 | text:
25 | type: string
26 | example: "Thank you for the game!"
27 | required:
28 | - text
29 | responses:
30 | "200":
31 | description: The private message has been successfully sent.
32 | content:
33 | application/json:
34 | schema:
35 | $ref: "../../schemas/Ok.yaml"
36 | "400":
37 | description: The sending of the private message has failed.
38 | content:
39 | application/json:
40 | schema:
41 | $ref: "../../schemas/Error.yaml"
42 |
--------------------------------------------------------------------------------
/doc/specs/tags/openingexplorer/master-pgn-gameId.yaml:
--------------------------------------------------------------------------------
1 | servers:
2 | - url: https://explorer.lichess.ovh
3 | get:
4 | operationId: openingExplorerMasterGame
5 | summary: OTB master game
6 | description: |
7 | **Endpoint: `https://explorer.lichess.ovh/masters/pgn/{gameId}`**
8 |
9 | Example: `curl https://explorer.lichess.ovh/masters/pgn/aAbqI4ey`
10 | tags:
11 | - Opening Explorer
12 | security: []
13 | parameters:
14 | - in: path
15 | name: gameId
16 | schema:
17 | type: string
18 | required: true
19 | responses:
20 | "200":
21 | description: The PGN representation of the game.
22 | headers:
23 | Access-Control-Allow-Origin:
24 | schema:
25 | type: string
26 | default: "'*'"
27 | content:
28 | application/x-chess-pgn:
29 | schema:
30 | type: string
31 | description: Game PGN
32 | examples:
33 | pgn:
34 | $ref: "../../examples/openingExplorer-otbMasterGame.pgn.yaml"
35 |
--------------------------------------------------------------------------------
/doc/specs/tags/puzzles/api-puzzle-daily.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: apiPuzzleDaily
3 | summary: Get the daily puzzle
4 | description: |
5 | Get the daily Lichess puzzle in JSON format.
6 | Alternatively, you can [post it in your slack workspace](https://lichess.org/daily-puzzle-slack).
7 | tags:
8 | - Puzzles
9 | security: []
10 | responses:
11 | "200":
12 | description: The daily puzzle.
13 | headers:
14 | Access-Control-Allow-Origin:
15 | schema:
16 | type: string
17 | default: "'*'"
18 | content:
19 | application/json:
20 | schema:
21 | $ref: "../../schemas/PuzzleAndGame.yaml"
22 | example:
23 | $ref: "../../examples/puzzles-getDailyPuzzle.json"
24 |
--------------------------------------------------------------------------------
/doc/specs/tags/puzzles/api-puzzle-dashboard-days.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: apiPuzzleDashboard
3 | summary: Get your puzzle dashboard
4 | description: |
5 | Download your [puzzle dashboard](https://lichess.org/training/dashboard/30/dashboard) as JSON.
6 | Also includes all puzzle themes played, with aggregated results.
7 | Allows re-creating the [improvement/strengths](https://lichess.org/training/dashboard/30/improvementAreas) interfaces.
8 | tags:
9 | - Puzzles
10 | security:
11 | - OAuth2: ["puzzle:read"]
12 | parameters:
13 | - in: path
14 | name: days
15 | required: true
16 | description: How many days to look back when aggregating puzzle results. 30 is sensible.
17 | schema:
18 | type: integer
19 | minimum: 1
20 | responses:
21 | "200":
22 | description: The puzzle dashboard of the logged in user.
23 | headers:
24 | Access-Control-Allow-Origin:
25 | schema:
26 | type: string
27 | default: "'*'"
28 | content:
29 | application/json:
30 | schema:
31 | $ref: "../../schemas/PuzzleDashboard.yaml"
32 | example:
33 | $ref: "../../examples/puzzles-getYourPuzzleDashboard.json"
34 |
--------------------------------------------------------------------------------
/doc/specs/tags/puzzles/api-puzzle-id.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: apiPuzzleId
3 | summary: Get a puzzle by its ID
4 | description: Get a single Lichess puzzle in JSON format.
5 | tags:
6 | - Puzzles
7 | security: []
8 | parameters:
9 | - in: path
10 | name: id
11 | required: true
12 | description: The puzzle ID
13 | schema:
14 | type: string
15 | responses:
16 | "200":
17 | description: The requested puzzle.
18 | headers:
19 | Access-Control-Allow-Origin:
20 | schema:
21 | type: string
22 | default: "'*'"
23 | content:
24 | application/json:
25 | schema:
26 | $ref: "../../schemas/PuzzleAndGame.yaml"
27 | example:
28 | $ref: "../../examples/puzzles-getPuzzleById.json"
29 |
--------------------------------------------------------------------------------
/doc/specs/tags/puzzles/api-racer.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: racerPost
3 | summary: Create and join a puzzle race
4 | description: |
5 | Create a new private [puzzle race](https://lichess.org/racer).
6 | The Lichess user who creates the race must join the race page,
7 | and manually start the race when enough players have joined.
8 | -
9 | tags:
10 | - Puzzles
11 | security:
12 | - OAuth2: ["racer:write"]
13 | responses:
14 | "200":
15 | description: The new puzzle race.
16 | headers:
17 | Access-Control-Allow-Origin:
18 | schema:
19 | type: string
20 | default: "'*'"
21 | content:
22 | application/json:
23 | schema:
24 | $ref: "../../schemas/PuzzleRacer.yaml"
25 | example:
26 | $ref: "../../examples/puzzles-createAndJoinPuzzleRace.json"
27 |
--------------------------------------------------------------------------------
/doc/specs/tags/relations/api-rel-block-username.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: blockUser
3 | summary: Block a player
4 | description: |
5 | Block a player, adding them to your list of blocked Lichess users.
6 | tags:
7 | - Relations
8 | security:
9 | - OAuth2: ["follow:write"]
10 | parameters:
11 | - in: path
12 | name: username
13 | schema:
14 | type: string
15 | example: "thibault"
16 | required: true
17 | responses:
18 | "200":
19 | description: The player was successfully added.
20 | content:
21 | application/json:
22 | schema:
23 | $ref: "../../schemas/Ok.yaml"
24 | example:
25 | $ref: "../../examples/relations-blockPlayer.json"
26 |
--------------------------------------------------------------------------------
/doc/specs/tags/relations/api-rel-follow-username.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: followUser
3 | summary: Follow a player
4 | description: |
5 | Follow a player, adding them to your list of Lichess friends.
6 | tags:
7 | - Relations
8 | security:
9 | - OAuth2: ["follow:write"]
10 | parameters:
11 | - in: path
12 | name: username
13 | schema:
14 | type: string
15 | example: "thibault"
16 | required: true
17 | responses:
18 | "200":
19 | description: The player was successfully added.
20 | content:
21 | application/json:
22 | schema:
23 | $ref: "../../schemas/Ok.yaml"
24 | example:
25 | $ref: "../../examples/relations-followPlayer.json"
26 |
--------------------------------------------------------------------------------
/doc/specs/tags/relations/api-rel-following.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: apiUserFollowing
3 | summary: Get users followed by the logged in user
4 | description: |
5 | Users are streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON).
6 | tags:
7 | - Relations
8 | security:
9 | - OAuth2: ["follow:read"]
10 | responses:
11 | "200":
12 | description: The list of users followed by a user.
13 | headers:
14 | Access-Control-Allow-Origin:
15 | schema:
16 | type: string
17 | default: "'*'"
18 | content:
19 | application/x-ndjson:
20 | schema:
21 | $ref: "../../schemas/UserExtended.yaml"
22 | example:
23 | $ref: "../../examples/relations-getMyFollowing.json"
24 |
--------------------------------------------------------------------------------
/doc/specs/tags/relations/api-rel-unblock-username.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: unblockUser
3 | summary: Unblock a player
4 | description: |
5 | Unblock a player, removing them from your list of blocked Lichess users.
6 | tags:
7 | - Relations
8 | security:
9 | - OAuth2: ["follow:write"]
10 | parameters:
11 | - in: path
12 | name: username
13 | schema:
14 | type: string
15 | example: "thibault"
16 | required: true
17 | responses:
18 | "200":
19 | description: The player was successfully removed.
20 | content:
21 | application/json:
22 | schema:
23 | $ref: "../../schemas/Ok.yaml"
24 | example:
25 | $ref: "../../examples/relations-unblockPlayer.json"
26 |
--------------------------------------------------------------------------------
/doc/specs/tags/relations/api-rel-unfollow-username.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: unfollowUser
3 | summary: Unfollow a player
4 | description: |
5 | Unfollow a player, removing them from your list of Lichess friends.
6 | tags:
7 | - Relations
8 | security:
9 | - OAuth2: ["follow:write"]
10 | parameters:
11 | - in: path
12 | name: username
13 | schema:
14 | type: string
15 | example: "thibault"
16 | required: true
17 | responses:
18 | "200":
19 | description: The player was successfully removed.
20 | content:
21 | application/json:
22 | schema:
23 | $ref: "../../schemas/Ok.yaml"
24 | example:
25 | $ref: "../../examples/relations-unfollowPlayer.json"
26 |
--------------------------------------------------------------------------------
/doc/specs/tags/studies/api-study-by-username.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: studyListMetadata
3 | summary: List studies of a user
4 | description: |
5 | Get metadata (name and dates) of all studies of a user.
6 | If authenticated, then all public, unlisted, and private studies are included.
7 | If not, only public (non-unlisted) studies are included.
8 | Studies are streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON).
9 | tags:
10 | - Studies
11 | security:
12 | - OAuth2: ["study:read"]
13 | parameters:
14 | - in: path
15 | name: username
16 | description: The user whose studies we list
17 | required: true
18 | schema:
19 | type: string
20 | responses:
21 | "200":
22 | description: The list of studies.
23 | headers:
24 | Access-Control-Allow-Origin:
25 | schema:
26 | type: string
27 | default: "'*'"
28 | content:
29 | application/x-ndjson:
30 | schema:
31 | $ref: "../../schemas/StudyMetadata.yaml"
32 |
--------------------------------------------------------------------------------
/doc/specs/tags/studies/api-study-studyId-chapterId.yaml:
--------------------------------------------------------------------------------
1 | delete:
2 | operationId: apiStudyStudyIdChapterIdDelete
3 | summary: Delete a study chapter
4 | tags:
5 | - Studies
6 | security:
7 | - OAuth2: ["study:write"]
8 | parameters:
9 | - in: path
10 | name: studyId
11 | description: The study ID
12 | required: true
13 | schema:
14 | type: string
15 | minLength: 8
16 | maxLength: 8
17 | - in: path
18 | name: chapterId
19 | description: The chapter ID
20 | required: true
21 | schema:
22 | type: string
23 | minLength: 8
24 | maxLength: 8
25 | description: |
26 | Delete a chapter of a study you own. This is definitive.
27 | A study must have at least one chapter; so if you delete the last chapter,
28 | an empty one will be automatically created to replace it.
29 | responses:
30 | "204":
31 | description: Chapter successfully deleted
32 | headers:
33 | Access-Control-Allow-Origin:
34 | schema:
35 | type: string
36 | default: "'*'"
37 |
--------------------------------------------------------------------------------
/doc/specs/tags/swisstournaments/api-swiss-id-terminate.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: apiSwissTerminate
3 | summary: Terminate a Swiss tournament
4 | description: |
5 | Terminate a Swiss tournament
6 | tags:
7 | - "Swiss tournaments"
8 | security:
9 | - OAuth2: ["tournament:write"]
10 | parameters:
11 | - in: path
12 | name: id
13 | description: The Swiss tournament ID.
14 | schema:
15 | type: string
16 | example: "W5FrxusN"
17 | required: true
18 | responses:
19 | "200":
20 | description: The Swiss tournament was successfully terminated.
21 | headers:
22 | Access-Control-Allow-Origin:
23 | schema:
24 | type: string
25 | default: "'*'"
26 | content:
27 | application/json:
28 | schema:
29 | $ref: "../../schemas/Ok.yaml"
30 | "400":
31 | description: Terminating the Swiss tournament failed.
32 | content:
33 | application/json:
34 | schema:
35 | $ref: "../../schemas/Error.yaml"
36 |
--------------------------------------------------------------------------------
/doc/specs/tags/swisstournaments/api-swiss-id-withdraw.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: apiSwissWithdraw
3 | summary: Pause or leave a swiss tournament
4 | description: |
5 | Leave a future Swiss tournament, or take a break on an ongoing Swiss tournament.
6 | It's possible to join again later. Points are preserved.
7 | tags:
8 | - "Swiss tournaments"
9 | security:
10 | - OAuth2: ["tournament:write"]
11 | parameters:
12 | - in: path
13 | name: id
14 | description: The tournament ID.
15 | schema:
16 | type: string
17 | example: "hL7vMrFQ"
18 | required: true
19 | responses:
20 | "200":
21 | description: The tournament was successfully paused or left.
22 | headers:
23 | Access-Control-Allow-Origin:
24 | schema:
25 | type: string
26 | default: "'*'"
27 | content:
28 | application/json:
29 | schema:
30 | $ref: "../../schemas/Ok.yaml"
31 |
--------------------------------------------------------------------------------
/doc/specs/tags/swisstournaments/api-swiss-id.yaml:
--------------------------------------------------------------------------------
1 | parameters:
2 | - in: path
3 | name: id
4 | description: The Swiss tournament ID.
5 | schema:
6 | type: string
7 | required: true
8 | get:
9 | operationId: swiss
10 | summary: Get info about a Swiss tournament
11 | description: |
12 | Get detailed info about a Swiss tournament.
13 | tags:
14 | - "Swiss tournaments"
15 | security: []
16 | responses:
17 | "200":
18 | description: The information of the Swiss tournament.
19 | headers:
20 | Access-Control-Allow-Origin:
21 | schema:
22 | type: string
23 | default: "'*'"
24 | content:
25 | application/json:
26 | schema:
27 | $ref: "../../schemas/SwissTournament.yaml"
28 |
--------------------------------------------------------------------------------
/doc/specs/tags/swisstournaments/swiss-id.trf.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: swissTrf
3 | summary: Export TRF of a Swiss tournament
4 | description: |
5 | Download a tournament in the Tournament Report File format, the FIDE standard.
6 | Documentation:
7 | Example:
8 | tags:
9 | - "Swiss tournaments"
10 | security: []
11 | parameters:
12 | - in: path
13 | name: id
14 | description: The tournament ID.
15 | schema:
16 | type: string
17 | required: true
18 | responses:
19 | "200":
20 | description: The TRF representation of a Swiss tournament.
21 | headers:
22 | Access-Control-Allow-Origin:
23 | schema:
24 | type: string
25 | default: "'*'"
26 | content:
27 | text/plain:
28 | schema:
29 | type: string
30 |
--------------------------------------------------------------------------------
/doc/specs/tags/tablebase/antichess.yaml:
--------------------------------------------------------------------------------
1 | servers:
2 | - url: https://tablebase.lichess.ovh
3 | get:
4 | operationId: antichessAtomic
5 | summary: Tablebase lookup for Antichess
6 | description: |
7 | **Endpoint: **
8 | tags:
9 | - Tablebase
10 | security: []
11 | parameters:
12 | - in: query
13 | name: fen
14 | description: FEN of the position. Underscores allowed.
15 | schema:
16 | type: string
17 | required: true
18 | responses:
19 | "200":
20 | description: The tablebase information for the position in antichess.
21 | headers:
22 | Access-Control-Allow-Origin:
23 | schema:
24 | type: string
25 | default: "'*'"
26 | content:
27 | application/json:
28 | schema:
29 | $ref: "../../schemas/TablebaseJson.yaml"
30 | example:
31 | $ref: "../../examples/tablebase-lookupAntichess.json"
32 |
--------------------------------------------------------------------------------
/doc/specs/tags/tablebase/atomic.yaml:
--------------------------------------------------------------------------------
1 | servers:
2 | - url: https://tablebase.lichess.ovh
3 | get:
4 | operationId: tablebaseAtomic
5 | summary: Tablebase lookup for Atomic chess
6 | description: |
7 | **Endpoint: **
8 | tags:
9 | - Tablebase
10 | security: []
11 | parameters:
12 | - in: query
13 | name: fen
14 | description: FEN of the position. Underscores allowed.
15 | schema:
16 | type: string
17 | required: true
18 | responses:
19 | "200":
20 | description: The tablebase information for the position in atomic chess.
21 | headers:
22 | Access-Control-Allow-Origin:
23 | schema:
24 | type: string
25 | default: "'*'"
26 | content:
27 | application/json:
28 | schema:
29 | $ref: "../../schemas/TablebaseJson.yaml"
30 | example:
31 | $ref: "../../examples/tablebase-lookupAtomic.json"
32 |
--------------------------------------------------------------------------------
/doc/specs/tags/tablebase/standard.yaml:
--------------------------------------------------------------------------------
1 | servers:
2 | - url: https://tablebase.lichess.ovh
3 | get:
4 | operationId: tablebaseStandard
5 | summary: Tablebase lookup
6 | description: |
7 | **Endpoint: **
8 | Example: `curl http://tablebase.lichess.ovh/standard?fen=4k3/6KP/8/8/8/8/7p/8_w_-_-_0_1`
9 | tags:
10 | - Tablebase
11 | security: []
12 | parameters:
13 | - in: query
14 | name: fen
15 | description: FEN of the position. Underscores allowed.
16 | schema:
17 | type: string
18 | required: true
19 | responses:
20 | "200":
21 | description: The tablebase information for the position in standard chess.
22 | headers:
23 | Access-Control-Allow-Origin:
24 | schema:
25 | type: string
26 | default: "'*'"
27 | content:
28 | application/json:
29 | schema:
30 | $ref: "../../schemas/TablebaseJson.yaml"
31 | example:
32 | $ref: "../../examples/tablebase-lookupStandard.json"
33 |
--------------------------------------------------------------------------------
/doc/specs/tags/teams/api-team-all.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: teamAll
3 | summary: Get popular teams
4 | description: |
5 | Paginator of the most popular teams.
6 | tags:
7 | - Teams
8 | security: []
9 | parameters:
10 | - in: query
11 | name: page
12 | schema:
13 | type: number
14 | example: 1
15 | default: 1
16 | responses:
17 | "200":
18 | description: A paginated list of the most popular teams.
19 | headers:
20 | Access-Control-Allow-Origin:
21 | schema:
22 | type: string
23 | default: "'*'"
24 | content:
25 | application/json:
26 | schema:
27 | $ref: "../../schemas/TeamPaginatorJson.yaml"
28 | example:
29 | $ref: "../../examples/teams-getPopularTeams.json"
30 |
--------------------------------------------------------------------------------
/doc/specs/tags/teams/api-team-of-username.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: teamOfUsername
3 | summary: Teams of a player
4 | description: |
5 | All the teams a player is a member of.
6 | tags:
7 | - Teams
8 | security: []
9 | parameters:
10 | - in: path
11 | name: username
12 | schema:
13 | type: string
14 | example: "thibault"
15 | required: true
16 | responses:
17 | "200":
18 | description: The list of teams the user is a member of.
19 | headers:
20 | Access-Control-Allow-Origin:
21 | schema:
22 | type: string
23 | default: "'*'"
24 | content:
25 | application/json:
26 | schema:
27 | type: array
28 | items:
29 | $ref: "../../schemas/Team.yaml"
30 | example:
31 | $ref: "../../examples/teams-teamsOfPlayer.json"
32 |
--------------------------------------------------------------------------------
/doc/specs/tags/teams/api-team-search.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: teamSearch
3 | summary: Search teams
4 | description: |
5 | Paginator of team search results for a keyword.
6 | tags:
7 | - Teams
8 | security: []
9 | parameters:
10 | - in: query
11 | name: text
12 | schema:
13 | type: string
14 | example: coders
15 | - in: query
16 | name: page
17 | schema:
18 | type: number
19 | example: 1
20 | default: 1
21 | responses:
22 | "200":
23 | description: The paginated list of teams.
24 | headers:
25 | Access-Control-Allow-Origin:
26 | schema:
27 | type: string
28 | default: "'*'"
29 | content:
30 | application/json:
31 | schema:
32 | $ref: "../../schemas/TeamPaginatorJson.yaml"
33 | example:
34 | $ref: "../../examples/teams-searchTeams.json"
35 |
--------------------------------------------------------------------------------
/doc/specs/tags/teams/api-team-teamId-kick-userId.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: teamIdKickUserId
3 | summary: Kick a user from your team
4 | description: |
5 | Kick a member out of one of your teams.
6 | -
7 | tags:
8 | - Teams
9 | security:
10 | - OAuth2: ["team:lead"]
11 | parameters:
12 | - in: path
13 | name: teamId
14 | schema:
15 | type: string
16 | example: "coders"
17 | required: true
18 | - in: path
19 | name: userId
20 | schema:
21 | type: string
22 | example: "neio"
23 | required: true
24 | responses:
25 | "200":
26 | description: The member has been kicked from the team.
27 | content:
28 | application/json:
29 | schema:
30 | $ref: "../../schemas/Ok.yaml"
31 |
--------------------------------------------------------------------------------
/doc/specs/tags/teams/api-team-teamId-request-userId-accept.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: teamRequestAccept
3 | summary: Accept join request
4 | description: Accept someone's request to join your team
5 | tags:
6 | - Teams
7 | security:
8 | - OAuth2: ["team:lead"]
9 | parameters:
10 | - in: path
11 | name: teamId
12 | schema:
13 | type: string
14 | example: "coders"
15 | required: true
16 | - in: path
17 | name: userId
18 | schema:
19 | type: string
20 | example: "neio"
21 | required: true
22 | responses:
23 | "200":
24 | description: The member has been added to the team.
25 | content:
26 | application/json:
27 | schema:
28 | $ref: "../../schemas/Ok.yaml"
29 |
--------------------------------------------------------------------------------
/doc/specs/tags/teams/api-team-teamId-request-userId-decline.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: teamRequestDecline
3 | summary: Decline join request
4 | description: Decline someone's request to join your team
5 | tags:
6 | - Teams
7 | security:
8 | - OAuth2: ["team:lead"]
9 | parameters:
10 | - in: path
11 | name: teamId
12 | schema:
13 | type: string
14 | example: "coders"
15 | required: true
16 | - in: path
17 | name: userId
18 | schema:
19 | type: string
20 | example: "neio"
21 | required: true
22 | responses:
23 | "200":
24 | description: The join request has been declined and is no longer pending.
25 | content:
26 | application/json:
27 | schema:
28 | $ref: "../../schemas/Ok.yaml"
29 |
--------------------------------------------------------------------------------
/doc/specs/tags/teams/api-team-teamId.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: teamShow
3 | summary: Get a single team
4 | description: Public info about a team. Includes the list of publicly visible leaders.
5 | tags:
6 | - Teams
7 | security: []
8 | parameters:
9 | - in: path
10 | name: teamId
11 | schema:
12 | type: string
13 | required: true
14 | responses:
15 | "200":
16 | description: The information about the team.
17 | headers:
18 | Access-Control-Allow-Origin:
19 | schema:
20 | type: string
21 | default: "'*'"
22 | content:
23 | application/json:
24 | schema:
25 | $ref: "../../schemas/Team.yaml"
26 | example:
27 | $ref: "../../examples/teams-getSingleTeam.json"
28 |
--------------------------------------------------------------------------------
/doc/specs/tags/teams/team-teamId-quit.yaml:
--------------------------------------------------------------------------------
1 | post:
2 | operationId: teamIdQuit
3 | summary: Leave a team
4 | description: |
5 | Leave a team.
6 | -
7 | tags:
8 | - Teams
9 | security:
10 | - OAuth2: ["team:write"]
11 | parameters:
12 | - in: path
13 | name: teamId
14 | schema:
15 | type: string
16 | example: "coders"
17 | required: true
18 | responses:
19 | "200":
20 | description: The logged in user has successfully left the team.
21 | content:
22 | application/json:
23 | schema:
24 | $ref: "../../schemas/Ok.yaml"
25 |
--------------------------------------------------------------------------------
/doc/specs/tags/tv/api-tv-channel-feed.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: tvChannelFeed
3 | summary: Stream current TV game of a TV channel
4 | description: |
5 | Stream positions and moves of a current [TV channel's game](https://lichess.org/tv/rapid) in [ndjson](#section/Introduction/Streaming-with-ND-JSON).
6 | Try it with `curl https://lichess.org/api/tv/rapid/feed`.
7 | tags:
8 | - TV
9 | security: []
10 | parameters:
11 | - in: path
12 | name: channel
13 | description: The name of the channel in camel case.
14 | schema:
15 | type: string
16 | required: true
17 |
18 | responses:
19 | "200":
20 | description: The stream of the current TV game of a TV channel.
21 | content:
22 | application/x-ndjson:
23 | schema:
24 | $ref: "../../schemas/TvFeed.yaml"
25 | examples:
26 | new featured game:
27 | $ref: "../../examples/tv-streamCurrentTvGame-newGame.json.yaml"
28 | move:
29 | $ref: "../../examples/tv-streamCurrentTvGame-move.json.yaml"
30 |
--------------------------------------------------------------------------------
/doc/specs/tags/tv/api-tv-feed.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: tvFeed
3 | summary: Stream current TV game
4 | description: |
5 | Stream positions and moves of the current [TV game](https://lichess.org/tv) in [ndjson](#section/Introduction/Streaming-with-ND-JSON).
6 | Try it with `curl https://lichess.org/api/tv/feed`.
7 | tags:
8 | - TV
9 | security: []
10 | responses:
11 | "200":
12 | description: The stream of the current TV game.
13 | content:
14 | application/x-ndjson:
15 | schema:
16 | $ref: "../../schemas/TvFeed.yaml"
17 | examples:
18 | new featured game:
19 | $ref: "../../examples/tv-streamCurrentTvGame-newGame.json.yaml"
20 | move:
21 | $ref: "../../examples/tv-streamCurrentTvGame-move.json.yaml"
22 |
--------------------------------------------------------------------------------
/doc/specs/tags/users/api-crosstable-user1-user2.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: apiCrosstable
3 | summary: Get crosstable
4 | description: |
5 | Get total number of games, and current score, of any two users.
6 | If the `matchup` flag is provided, and the users are currently playing, also gets the current match game number and scores.
7 | tags:
8 | - Users
9 | security: []
10 | parameters:
11 | - in: path
12 | name: user1
13 | schema:
14 | type: string
15 | required: true
16 | - in: path
17 | name: user2
18 | schema:
19 | type: string
20 | required: true
21 | - in: query
22 | name: matchup
23 | description: Whether to get the current match data, if any
24 | schema:
25 | type: boolean
26 | responses:
27 | "200":
28 | description: The crosstable of the two users.
29 | headers:
30 | Access-Control-Allow-Origin:
31 | schema:
32 | type: string
33 | default: "'*'"
34 | content:
35 | application/json:
36 | schema:
37 | $ref: "../../schemas/Crosstable.yaml"
38 | example:
39 | $ref: "../../examples/users-getCrosstable.json"
40 |
--------------------------------------------------------------------------------
/doc/specs/tags/users/api-player.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: player
3 | summary: Get all top 10
4 | tags:
5 | - Users
6 | security: []
7 | description: |
8 | Get the top 10 players for each speed and variant.
9 | See .
10 | responses:
11 | "200":
12 | description: The list of variants with their respective top players.
13 | headers:
14 | Access-Control-Allow-Origin:
15 | schema:
16 | type: string
17 | default: "'*'"
18 | content:
19 | application/json:
20 | schema:
21 | $ref: "../../schemas/Top10s.yaml"
22 | example:
23 | $ref: "../../examples/users-getAllTop10.json"
24 |
--------------------------------------------------------------------------------
/doc/specs/tags/users/api-user-username-activity.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: apiUserActivity
3 | summary: Get user activity
4 | description: |
5 | Read data to generate the activity feed of a user.
6 | tags:
7 | - Users
8 | security: []
9 | parameters:
10 | - in: path
11 | name: username
12 | schema:
13 | type: string
14 | required: true
15 | responses:
16 | "200":
17 | description: The activity feed of the user.
18 | headers:
19 | Access-Control-Allow-Origin:
20 | schema:
21 | type: string
22 | default: "'*'"
23 | content:
24 | application/json:
25 | schema:
26 | type: array
27 | items:
28 | $ref: "../../schemas/UserActivity.yaml"
29 | example:
30 | $ref: "../../examples/users-getUserActivity.json"
31 |
--------------------------------------------------------------------------------
/doc/specs/tags/users/api-user-username-perf-perf.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: apiUserPerf
3 | summary: Get performance statistics of a user
4 | description: |
5 | Read performance statistics of a user, for a single performance.
6 | Similar to the [performance pages on the website](https://lichess.org/@/thibault/perf/bullet).
7 | tags:
8 | - Users
9 | security: []
10 | parameters:
11 | - in: path
12 | name: username
13 | schema:
14 | type: string
15 | required: true
16 | - in: path
17 | name: perf
18 | schema:
19 | $ref: "../../schemas/PerfType.yaml"
20 | required: true
21 | responses:
22 | "200":
23 | description: The performance statistics of the user
24 | headers:
25 | Access-Control-Allow-Origin:
26 | schema:
27 | type: string
28 | default: "'*'"
29 | content:
30 | application/json:
31 | schema:
32 | $ref: "../../schemas/PerfStat.yaml"
33 | example:
34 | $ref: "../../examples/users-getPerformanceStatisticsOfAUser.json"
35 |
--------------------------------------------------------------------------------
/doc/specs/tags/users/api-user-username-rating-history.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: apiUserRatingHistory
3 | summary: Get rating history of a user
4 | description: |
5 | Read rating history of a user, for all perf types.
6 | There is at most one entry per day.
7 | Format of an entry is `[year, month, day, rating]`.
8 | `month` starts at zero (January).
9 | tags:
10 | - Users
11 | security: []
12 | parameters:
13 | - in: path
14 | name: username
15 | schema:
16 | type: string
17 | required: true
18 | responses:
19 | "200":
20 | description: The rating history of the user.
21 | headers:
22 | Access-Control-Allow-Origin:
23 | schema:
24 | type: string
25 | default: "'*'"
26 | content:
27 | application/json:
28 | schema:
29 | $ref: "../../schemas/RatingHistory.yaml"
30 | example:
31 | $ref: "../../examples/users-getRatingHistoryOfAUser.json"
32 |
--------------------------------------------------------------------------------
/doc/specs/tags/users/api-user-username.yaml:
--------------------------------------------------------------------------------
1 | get:
2 | operationId: apiUser
3 | summary: Get user public data
4 | description: |
5 | Read public data of a user.
6 | tags:
7 | - Users
8 | security:
9 | - OAuth2: []
10 |
11 | parameters:
12 | - in: path
13 | name: username
14 | schema:
15 | type: string
16 | required: true
17 | - in: query
18 | name: trophies
19 | description: Include user trophies
20 | schema:
21 | type: boolean
22 | default: false
23 |
24 | responses:
25 | "200":
26 | description: The information of the user.
27 | headers:
28 | Access-Control-Allow-Origin:
29 | schema:
30 | type: string
31 | default: "'*'"
32 | content:
33 | application/json:
34 | schema:
35 | $ref: "../../schemas/UserExtended.yaml"
36 | example:
37 | $ref: "../../examples/users-getUserPublicData.json"
38 |
--------------------------------------------------------------------------------
/doc/spectral.yaml:
--------------------------------------------------------------------------------
1 | extends: spectral:oas
2 | formats: [oas3.1]
3 | overrides:
4 | - files:
5 | - "specs/lichess-api.yaml#/components/schemas"
6 | - "specs/lichess-api.yaml#/components/examples"
7 | rules:
8 | oas3-unused-component: "off"
9 |
--------------------------------------------------------------------------------
/doc/template.hbs:
--------------------------------------------------------------------------------
1 | {{! Based on https://github.com/Redocly/redocly-cli/blob/bbcdb889caecd31d24db483d353c80a59e032214/packages/cli/src/commands/build-docs/template.hbs }}
2 |
3 |
4 |
5 |
6 | {{title}}
7 |
8 |
9 |
16 | {{{redocHead}}}
17 |
18 |
19 |
20 | {{{redocHTML}}}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | public
3 | .env
4 |
--------------------------------------------------------------------------------
/example/oauth-app/.gitignore:
--------------------------------------------------------------------------------
1 | index.js
2 | node_modules
3 |
--------------------------------------------------------------------------------
/example/oauth-app/.prettierignore:
--------------------------------------------------------------------------------
1 | index.js
2 |
--------------------------------------------------------------------------------
/example/oauth-app/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "printWidth": 120,
4 | "arrowParens": "avoid"
5 | }
6 |
--------------------------------------------------------------------------------
/example/oauth-app/README.md:
--------------------------------------------------------------------------------
1 | # Lichess OAuth app example
2 |
3 | This is an example for a fully client side OAuth app that reads the user's
4 | email address from the Lichess API.
5 |
6 | The main logic is in `src/ctrl.ts`, using the
7 | [@bity/oauth2-auth-code-pkce](https://www.npmjs.com/package/@bity/oauth2-auth-code-pkce)
8 | library.
9 |
10 | ## Running
11 |
12 | 1. `npm install`
13 | 2. `npm run serve` or any other method to serve the client on http://localhost:8000
14 |
--------------------------------------------------------------------------------
/example/oauth-app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 |
18 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/example/oauth-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lichess-oauth-app-example",
3 | "private": true,
4 | "license": "MIT",
5 | "dependencies": {
6 | "@bity/oauth2-auth-code-pkce": "^2",
7 | "snabbdom": "^3"
8 | },
9 | "devDependencies": {
10 | "@rollup/plugin-commonjs": "^21",
11 | "@rollup/plugin-node-resolve": "^13",
12 | "@rollup/plugin-typescript": "^8",
13 | "prettier": "^2",
14 | "rollup": "^2",
15 | "tslib": "^2",
16 | "typescript": "^4",
17 | "http-server": "^14"
18 | },
19 | "scripts": {
20 | "build": "rollup --config",
21 | "watch": "rollup --config --watch",
22 | "serve": "http-server"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/example/oauth-app/rollup.config.mjs:
--------------------------------------------------------------------------------
1 | import resolve from '@rollup/plugin-node-resolve';
2 | import typescript from '@rollup/plugin-typescript';
3 | import commonjs from '@rollup/plugin-commonjs';
4 |
5 | export default {
6 | input: 'src/main.ts',
7 | output: {
8 | file: 'index.js',
9 | format: 'iife',
10 | name: 'ExampleApp',
11 | },
12 | plugins: [resolve(), typescript(), commonjs()],
13 | };
14 |
--------------------------------------------------------------------------------
/example/oauth-app/src/main.ts:
--------------------------------------------------------------------------------
1 | import { init, attributesModule, eventListenersModule } from 'snabbdom';
2 | import { Ctrl } from './ctrl';
3 | import { view } from './view';
4 |
5 | export default function (element: HTMLElement) {
6 | const patch = init([attributesModule, eventListenersModule]);
7 |
8 | const ctrl = new Ctrl(redraw);
9 |
10 | let vnode = patch(element, view(ctrl));
11 |
12 | function redraw() {
13 | vnode = patch(vnode, view(ctrl));
14 | }
15 |
16 | ctrl.init();
17 | }
18 |
--------------------------------------------------------------------------------
/example/oauth-app/src/view.ts:
--------------------------------------------------------------------------------
1 | import { h, VNode } from 'snabbdom';
2 | import { lichessHost, clientUrl, Ctrl } from './ctrl';
3 |
4 | export function view(ctrl: Ctrl): VNode {
5 | return h('table', [
6 | h('tr', [h('td', 'Lichess Host'), h('td', lichessHost)]),
7 | h('tr', [h('td', 'Client URL'), h('td', clientUrl)]),
8 | h('tr', [h('td', 'Error'), h('td', ctrl.error?.toString())]),
9 | h('tr', [h('td', 'Access token (secret)'), h('td', ctrl.accessContext?.token?.value)]),
10 | h('tr', [h('td', 'Lichess account email'), h('td', ctrl.email)]),
11 | h('tr', [
12 | h('td', ''),
13 | h('td', [
14 | h(
15 | 'button',
16 | {
17 | attrs: { disabled: !!ctrl.accessContext?.token },
18 | on: { click: () => ctrl.login() },
19 | },
20 | 'Login'
21 | ),
22 | ' ',
23 | h(
24 | 'button',
25 | {
26 | attrs: { disabled: !ctrl.error && !ctrl.accessContext?.token },
27 | on: { click: () => ctrl.logout() },
28 | },
29 | ctrl.accessContext ? 'Logout' : 'Reset'
30 | ),
31 | ]),
32 | ]),
33 | ]);
34 | }
35 |
--------------------------------------------------------------------------------
/example/oauth-app/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "strict": true,
4 | "noImplicitReturns": true,
5 | "noImplicitThis": true,
6 | "moduleResolution": "node",
7 | "target": "ES2017",
8 | "module": "esnext",
9 | "lib": ["DOM", "ES2019"]
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/example/oauth-backend/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
--------------------------------------------------------------------------------
/example/oauth-backend/README.md:
--------------------------------------------------------------------------------
1 | # Lichess OAuth backend example
2 |
3 | This is an example for a backend OAuth app that reads the user's
4 | name from the Lichess API. It uses express.js and stores verifier in the session.
5 |
6 | ## Running
7 |
8 | 1. `npm install`
9 | 2. `npm start` to run the server at http://localhost:3000
--------------------------------------------------------------------------------
/example/oauth-backend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "oauth-backend",
3 | "private": true,
4 | "license": "MIT",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "node index.js"
8 | },
9 | "engines": {
10 | "node": ">=18"
11 | },
12 | "dependencies": {
13 | "express": "^4.21.2",
14 | "express-session": "^1.18.1"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/example/oauth-demo/README.md:
--------------------------------------------------------------------------------
1 | # Lichess OAuth app demo
2 |
3 | This code has [moved to its own repository](https://github.com/lichess-org/api-demo).
4 |
--------------------------------------------------------------------------------
/example/oauth-personal-token/.env.default:
--------------------------------------------------------------------------------
1 | # Copy this file to .env
2 | # Get a token from https://lichess.org/account/oauth/token
3 | lichessToken = 'lio_***'
4 |
--------------------------------------------------------------------------------
/example/oauth-personal-token/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .env
3 |
--------------------------------------------------------------------------------
/example/oauth-personal-token/README.md:
--------------------------------------------------------------------------------
1 | # Lichess OAuth API with a personal token
2 |
3 | You can make OAuth requests without going through the authorization code flow.
4 |
5 | Instead, [generate a personal token](https://lichess.org/account/oauth/token)
6 | that you can directly use in API requests.
7 |
8 | Be careful, these tokens are like passwords so you should guard them carefully.
9 | The advantage to using a token over putting your password into a script is that a token can be revoked,
10 | and you can generate lots of them.
11 |
12 | ## Run this example
13 |
14 | 1. Copy `.env.default` to `.env`
15 | 2. Create a [personal token](https://lichess.org/account/oauth/token)
16 | 3. Set the token in `.env`
17 | 4. Install dependencies with `npm install`
18 | 5. Run with `node index.js`
19 |
--------------------------------------------------------------------------------
/example/oauth-personal-token/index.js:
--------------------------------------------------------------------------------
1 | require('dotenv').config();
2 |
3 | const headers = {
4 | Authorization: 'Bearer ' + process.env.lichessToken,
5 | };
6 |
7 | fetch('https://lichess.org/api/account', { headers })
8 | .then(res => res.json())
9 | .then(console.log);
10 |
--------------------------------------------------------------------------------
/example/oauth-personal-token/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lichess-oauth-personal-token-example",
3 | "lockfileVersion": 2,
4 | "requires": true,
5 | "packages": {
6 | "": {
7 | "name": "lichess-oauth-personal-token-example",
8 | "license": "MIT",
9 | "dependencies": {
10 | "dotenv": "^16"
11 | },
12 | "engines": {
13 | "node": ">=18"
14 | }
15 | },
16 | "node_modules/dotenv": {
17 | "version": "16.0.1",
18 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz",
19 | "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==",
20 | "engines": {
21 | "node": ">=12"
22 | }
23 | }
24 | },
25 | "dependencies": {
26 | "dotenv": {
27 | "version": "16.0.1",
28 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz",
29 | "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ=="
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/example/oauth-personal-token/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lichess-oauth-personal-token-example",
3 | "private": true,
4 | "main": "index.js",
5 | "license": "MIT",
6 | "dependencies": {
7 | "dotenv": "^16"
8 | },
9 | "engines": {
10 | "node": ">=18"
11 | },
12 | "scripts": {
13 | "start": "node index.js"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/example/tournament-entry-code/browser.js:
--------------------------------------------------------------------------------
1 | async function hmacSha256(secret, data) {
2 | const utf8 = new TextEncoder();
3 | const algorithm = {name: 'HMAC', hash: 'SHA-256'};
4 | const key = await crypto.subtle.importKey('raw', utf8.encode(secret), algorithm, false, ['sign']);
5 | return await crypto.subtle.sign(algorithm, key, utf8.encode(data));
6 | }
7 |
8 | function hex(buffer) {
9 | return new Uint8Array(buffer).reduce((a, b) => a + b.toString(16).padStart(2, '0'), '');
10 | }
11 |
12 | async function personalTournamentAccessCode(tournamentAccessCode, username) {
13 | return hex(await hmacSha256(tournamentAccessCode, username.toLowerCase()));
14 | }
15 |
16 | personalTournamentAccessCode('secr3t', 'DrNykterstein').then(console.log);
17 | // -> 3ae6cda5610ba80f5510c33ccfd27e0f063e9169a27346fc772087c41422403f
18 |
--------------------------------------------------------------------------------
/scripts/update-examples/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/scripts/update-examples/.prettierignore:
--------------------------------------------------------------------------------
1 | pnpm-lock.yaml
2 |
--------------------------------------------------------------------------------
/scripts/update-examples/README.md:
--------------------------------------------------------------------------------
1 | ## Update endpoint example responses
2 |
3 | These scripts make API calls to the Lichess endpoints and save the responses to files.
4 |
5 | ```bash
6 | pnpm install
7 | ```
8 |
9 | Then you can run individual scripts like this:
10 |
11 | ```bash
12 | pnpx tsx account.ts
13 | pnpx tsx broadcasts.ts
14 | ```
15 |
--------------------------------------------------------------------------------
/scripts/update-examples/account.ts:
--------------------------------------------------------------------------------
1 | import { example, localClient } from "./config";
2 |
3 | example("account", "getMyProfile", await localClient().GET("/api/account"));
4 |
5 | example(
6 | "account",
7 | "getMyEmailAddress",
8 | await localClient().GET("/api/account/email"),
9 | );
10 |
11 | example(
12 | "account",
13 | "getMyPreferences",
14 | await localClient().GET("/api/account/preferences"),
15 | );
16 |
17 | example(
18 | "account",
19 | "getMyKidModeStatus",
20 | await localClient().GET("/api/account/kid"),
21 | );
22 |
23 | example(
24 | "account",
25 | "setMyKidModeStatus",
26 | await localClient().POST("/api/account/kid", {
27 | params: {
28 | query: {
29 | v: true,
30 | },
31 | },
32 | }),
33 | );
34 |
35 | example(
36 | "account",
37 | "getMyTimeline",
38 | await localClient().GET("/api/timeline", {
39 | params: {
40 | query: {
41 | since: 0,
42 | },
43 | },
44 | }),
45 | );
46 |
--------------------------------------------------------------------------------
/scripts/update-examples/bot.ts:
--------------------------------------------------------------------------------
1 | import { example, prodClient, readNdJson } from "./config";
2 |
3 | const abortController = new AbortController();
4 | const signal = abortController.signal;
5 |
6 | await prodClient()
7 | .GET("/api/bot/online", {
8 | headers: {
9 | Accept: "application/x-ndjson",
10 | },
11 | signal,
12 | parseAs: "stream",
13 | })
14 | .then((response) =>
15 | readNdJson(response.response, (line: any) => {
16 | example("bot", "getOnlineBots", line);
17 | abortController.abort();
18 | }),
19 | );
20 |
--------------------------------------------------------------------------------
/scripts/update-examples/fide.ts:
--------------------------------------------------------------------------------
1 | import { example, prodClient } from "./config";
2 |
3 | example(
4 | "fide",
5 | "getFidePlayer",
6 | await prodClient().GET("/api/fide/player/{playerId}", {
7 | params: {
8 | path: {
9 | playerId: 35009192,
10 | },
11 | },
12 | }),
13 | "json",
14 | true,
15 | );
16 |
17 | example(
18 | "fide",
19 | "getFidePlayer-nullYear",
20 | await prodClient().GET("/api/fide/player/{playerId}", {
21 | params: {
22 | path: {
23 | playerId: 8700761,
24 | },
25 | },
26 | }),
27 | "json",
28 | true,
29 | );
30 |
31 | example(
32 | "fide",
33 | "searchFidePlayers",
34 | await prodClient().GET("/api/fide/player", {
35 | params: {
36 | query: {
37 | q: "Erigaisi",
38 | },
39 | },
40 | }),
41 | );
42 |
--------------------------------------------------------------------------------
/scripts/update-examples/oauth.ts:
--------------------------------------------------------------------------------
1 | import { example, localClient } from "./config";
2 |
3 | const tokensToTest = "lip_jose,lip_badToken";
4 |
5 | example("oauth", "testMultipleOauthTokens-request", tokensToTest, "txt");
6 |
7 | example(
8 | "oauth",
9 | "testMultipleOauthTokens",
10 | await localClient().POST("/api/token/test", {
11 | headers: {
12 | "Content-Type": "text/plain",
13 | },
14 | body: tokensToTest,
15 | bodySerializer: (body) => body,
16 | }),
17 | );
18 |
--------------------------------------------------------------------------------
/scripts/update-examples/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "module",
3 | "dependencies": {
4 | "@lichess-org/types": "link:../../types",
5 | "@types/node": "^22.15.2",
6 | "openapi-fetch": "^0.13.5",
7 | "prettier": "^3.5.3"
8 | },
9 | "scripts": {
10 | "format": "prettier --write ."
11 | },
12 | "packageManager": "pnpm@10.9.0+sha512.0486e394640d3c1fb3c9d43d49cf92879ff74f8516959c235308f5a8f62e2e19528a65cdc2a3058f587cde71eba3d5b56327c8c33a97e4c4051ca48a10ca2d5f"
13 | }
14 |
--------------------------------------------------------------------------------
/scripts/update-examples/simuls.ts:
--------------------------------------------------------------------------------
1 | import { example, prodClient } from "./config";
2 |
3 | example("simuls", "getCurrentSimuls", await prodClient().GET("/api/simul"));
4 |
--------------------------------------------------------------------------------
/scripts/update-examples/tablebase.ts:
--------------------------------------------------------------------------------
1 | import createClient from "openapi-fetch";
2 | import { example } from "./config";
3 | import { paths } from "@lichess-org/types";
4 |
5 | const client = createClient({
6 | baseUrl: "https://tablebase.lichess.ovh",
7 | });
8 |
9 | example(
10 | "tablebase",
11 | "lookupStandard",
12 | await client.GET("/standard", {
13 | params: {
14 | query: {
15 | fen: "4k3/6KP/8/8/8/8/7p/8 w - - 0 1",
16 | },
17 | },
18 | }),
19 | );
20 |
21 | example(
22 | "tablebase",
23 | "lookupAtomic",
24 | await client.GET("/atomic", {
25 | params: {
26 | query: {
27 | fen: "r3k1nr/p2p1pp1/bp2p3/1B5p/1b1q4/2NPP1PP/PPP2P2/R1BQK2R b KQkq - 0 10",
28 | },
29 | },
30 | }),
31 | );
32 |
33 | example(
34 | "tablebase",
35 | "lookupAntichess",
36 | await client.GET("/antichess", {
37 | params: {
38 | query: {
39 | fen: "6nr/4kp1p/2P5/8/3P1P1P/8/6B1/4K1NR b - - 0 18",
40 | },
41 | },
42 | }),
43 | );
44 |
--------------------------------------------------------------------------------
/scripts/update-examples/teams.ts:
--------------------------------------------------------------------------------
1 | import { example, prodClient } from "./config";
2 |
3 | example(
4 | "teams",
5 | "getTeamSwissTournaments",
6 | await prodClient().GET("/api/team/{teamId}/swiss", {
7 | params: {
8 | path: {
9 | teamId: "lichess-swiss",
10 | },
11 | query: {
12 | max: 1,
13 | },
14 | },
15 | }),
16 | );
17 |
18 | example(
19 | "teams",
20 | "getSingleTeam",
21 | await prodClient().GET("/api/team/{teamId}", {
22 | params: {
23 | path: {
24 | teamId: "lichess-swiss",
25 | },
26 | },
27 | }),
28 | );
29 |
30 | example("teams", "getPopularTeams", await prodClient().GET("/api/team/all"));
31 |
32 | example(
33 | "teams",
34 | "teamsOfPlayer",
35 | await prodClient().GET("/api/team/of/{username}", {
36 | params: {
37 | path: {
38 | username: "thibault",
39 | },
40 | },
41 | }),
42 | );
43 |
44 | example(
45 | "teams",
46 | "searchTeams",
47 | await prodClient().GET("/api/team/search", {
48 | params: {
49 | query: {
50 | text: "coders",
51 | },
52 | },
53 | }),
54 | );
55 |
--------------------------------------------------------------------------------
/scripts/update-examples/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "forceConsistentCasingInFileNames": true,
4 | "strict": true,
5 | "noImplicitAny": true,
6 | "strictNullChecks": true,
7 | "noUnusedLocals": true,
8 | "noUnusedParameters": true,
9 | "lib": ["DOM", "es2018"],
10 | "target": "es2018",
11 | "moduleResolution": "node",
12 | "module": "ESNext"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/types/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/types/.prettierignore:
--------------------------------------------------------------------------------
1 | pnpm-lock.yaml
2 |
--------------------------------------------------------------------------------
/types/README.md:
--------------------------------------------------------------------------------
1 | # Lichess.org API Types
2 |
3 | ## Installation
4 |
5 | ```bash
6 | npm install @lichess-org/types
7 | ```
8 |
9 | ## Usage
10 |
11 | ```typescript
12 | import { components } from "@lichess-org/types";
13 |
14 | type LichessGame = components["schemas"]["GameJson"];
15 | ```
16 |
17 | ## For Maintainers
18 |
19 | To regenerate:
20 |
21 | ```bash
22 | pnpm gen
23 | pnpm format
24 | ```
25 |
26 | To publish:
27 |
28 | ```bash
29 | npm version patch --no-git-tag-version
30 | npm publish
31 | ```
32 |
--------------------------------------------------------------------------------
/types/index.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lichess-org/api/745996d53ef773c2750c779e4e27a3a327b7b780/types/index.js
--------------------------------------------------------------------------------
/types/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@lichess-org/types",
3 | "version": "2.0.52",
4 | "description": "Lichess.org API types",
5 | "homepage": "https://github.com/lichess-org/api",
6 | "license": "AGPL-3.0-or-later",
7 | "repository": {
8 | "url": "https://github.com/lichess-org/api"
9 | },
10 | "main": "index.js",
11 | "types": "lichess-api.d.ts",
12 | "scripts": {
13 | "format": "prettier --write .",
14 | "gen": "openapi-typescript ../doc/specs/lichess-api.yaml -o lichess-api.d.ts --default-non-nullable=false"
15 | },
16 | "devDependencies": {
17 | "openapi-typescript": "^7.6.1",
18 | "prettier": "^3.5.3",
19 | "typescript": "^5.8.3"
20 | },
21 | "packageManager": "pnpm@10.8.1+sha512.c50088ba998c67b8ca8c99df8a5e02fd2ae2e2b29aaf238feaa9e124248d3f48f9fb6db2424949ff901cffbb5e0f0cc1ad6aedb602cd29450751d11c35023677"
22 | }
23 |
--------------------------------------------------------------------------------