Skip to main content

Module mobile

Module mobile 

Source
Expand description

What the iOS app needs beyond the Lichess API (docs/ios.md).

  • POST /api/games/offline: games played offline, uploaded later. Against the computer they’re recorded (and rated, at the level’s fixed rating, when no help was used) at once; between two people on one device they wait for the other player to confirm.
  • POST /api/games/{id}/confirm: the other player accepts or declines such a result.
  • GET /api/sync?since=: one small answer with everything the app shows between syncs, gzipped, for slow and metered links.
  • POST /api/photos: a board photo with the position the player confirmed, under the photo licence.
  • POST /api/push/devices, DELETE /api/push/devices/{token}: where to send “your move”.
  • DELETE /api/account: closing the account from the app (the App Store requires it).

Structs§

Assistance
Confirm
Device
OfflineRecord
One finished game as the app’s core records it (GameSession::offline_record_json).
Photo
Upload

Functions§

add_device
POST /api/push/devices.
close_account
Close an account: its games in progress resigned, its name, sign-in details, tokens, sessions and devices gone; Apple told of a linked Apple ID.
confirm
POST /api/games/{id}/confirm: the other player of a game played on one device accepts (it’s recorded, and rated if it can be) or declines.
delete_account
DELETE /api/account: close the account. Games in progress are resigned; finished games stay (the other players’ history) under a placeholder name; tokens, sessions, devices and personal details go. Photos already given under the photo licence stay, without the name.
photo
POST /api/photos: a photo with its confirmed position, kept as training data under the photo licence the player accepted.
remove_device
DELETE /api/push/devices/{token}.
sync
GET /api/sync?since=<Unix ms>: ratings, games in progress, results to confirm, challenges, and games finished since since.
upload
POST /api/games/offline.