lila/README.md

650 lines
19 KiB
Markdown
Raw Normal View History

2017-05-28 10:25:40 -06:00
[lichess.org](https://lichess.org)
==================================
2017-05-28 10:25:40 -06:00
[![Build Status](https://travis-ci.org/ornicar/lila.svg?branch=master)](https://travis-ci.org/ornicar/lila)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/lichess/localized.svg)](https://crowdin.com/project/lichess)
2017-07-13 07:58:10 -06:00
[![Twitter](https://img.shields.io/badge/Twitter-%40lichessorg-blue.svg)](https://twitter.com/lichess)
2014-12-24 05:18:59 -07:00
<img src="https://raw.githubusercontent.com/ornicar/lila/master/public/images/homepage_light.1200.png" alt="lichess.org" />
2017-01-08 15:45:30 -07:00
Lila (li[chess in sca]la) is a free online chess game server focused on [realtime](https://lichess.org/games) gameplay and ease of use.
2016-06-16 05:24:33 -06:00
It features a [search engine](https://lichess.org/games/search),
[computer analysis](https://lichess.org/ief49lif) distributed with [fishnet](https://github.com/niklasf/fishnet),
[tournaments](https://lichess.org/tournament),
[simuls](https://lichess.org/simul),
[forums](https://lichess.org/forum),
[teams](https://lichess.org/team),
[tactic trainer](https://lichess.org/training),
a [mobile app](https://lichess.org/mobile),
2016-12-07 01:19:11 -07:00
and a [shared analysis board](https://lichess.org/study).
2017-05-28 10:25:40 -06:00
The UI is available in more than [80 languages](https://crowdin.com/project/lichess) thanks to the community.
2016-06-16 05:24:33 -06:00
Lichess is written in [Scala 2.11](https://www.scala-lang.org/),
2017-01-20 02:37:31 -07:00
and relies on [Play 2.4](https://www.playframework.com/) for the routing, templating, and JSON.
2016-06-16 05:24:33 -06:00
Pure chess logic is contained in [scalachess](https://github.com/ornicar/scalachess) submodule.
2013-06-08 04:40:31 -06:00
The codebase is fully asynchronous, making heavy use of Scala Futures and [Akka 2 actors](http://akka.io).
2015-03-03 03:45:16 -07:00
Lichess talks to [Stockfish](http://stockfishchess.org/) deployed in an AI cluster of donated servers.
2017-04-22 16:23:30 -06:00
It uses [MongoDB 3.4](https://mongodb.org) to store more than 400 million games, which are indexed by [elasticsearch](http://elasticsearch.org).
2017-01-20 02:37:31 -07:00
HTTP requests and websocket connections are proxied by [nginx 1.8](http://nginx.org).
2016-06-16 05:24:33 -06:00
Client-side is written in [mithril.js](http://mithril.js.org/).
The [blog](https://lichess.org/blog) uses a free open content plan from [prismic.io](https://prismic.io).
2017-02-01 03:07:26 -07:00
Browser testing done with [![](https://raw.githubusercontent.com/ornicar/lila/master/public/images/browserstack.png)](https://www.browserstack.com).
2017-05-28 02:31:56 -06:00
Translations powered by [Crowdin](https://crowdin.com).
2012-04-25 14:15:35 -06:00
2017-02-15 18:55:45 -07:00
[Join us on discord](https://discord.gg/AWSze7n) or in the #lichess freenode IRC channel for more info.
2017-05-28 10:25:40 -06:00
Use [GitHub issues](https://github.com/ornicar/lila/issues) for bug reports and feature requests.
2013-06-08 05:25:27 -06:00
2012-06-18 06:36:49 -06:00
Installation
2013-06-08 05:25:27 -06:00
------------
2012-04-25 14:15:35 -06:00
2016-06-16 05:24:33 -06:00
> If you want to add a live chess section to your website, you are welcome to [embed lichess](https://lichess.org/developers) into your website. It's very easy to do.
2014-02-22 19:24:48 -07:00
2016-06-16 05:24:33 -06:00
> This project source code is open for other developers to have an example of non-trivial scala/play2/mongodb application. You're welcome to reuse as much code as you want for your projects and to get inspired by the solutions I propose to many common web development problems. But please don't just create a public lichess clone. Instead, [embed lichess using an &lt;iframe&gt;](https://lichess.org/developers) into your website.
> Also note that if I provide the source code, I do **not** offer support for your lichess instance. I will probably ignore any question about lichess installation and runtime issues.
2013-06-08 05:25:27 -06:00
2014-05-11 12:02:42 -06:00
## HTTP API
Feel free to use lichess API in your applications and websites.
If the resource you need is not available yet,
2016-09-06 03:27:41 -06:00
drop us an email at contact@lichess.org and we'll discuss it.
2013-12-30 19:00:56 -07:00
2016-04-07 11:16:16 -06:00
### API Limits
2016-04-07 11:15:09 -06:00
To respect the API servers and avoid an IP ban, please wait 1 second between requests.
If you receive an HTTP response with a [429 status](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429), please wait a full minute before resuming API usage.
Please do not automate computer analysis requests. They're very expensive.
2016-04-07 11:15:09 -06:00
2014-01-08 17:06:20 -07:00
### `GET /api/user/<username>` fetch one user
2013-12-30 19:00:56 -07:00
```
2017-05-26 11:19:32 -06:00
> curl https://lichess.org/api/user/thibault
2013-12-31 03:45:37 -07:00
```
```javascript
2013-12-30 19:24:24 -07:00
{
2013-12-31 03:51:27 -07:00
"username": "thibault",
2016-06-16 05:24:33 -06:00
"title": null, // chess title like FM or LM (lichess master)
"url": "https://lichess.org/@/thibault", // profile url
"online": true, // is the player currently using lichess?
"playing": "https://lichess.org/abcdefgh", // game being played, if any
"engine": false, // true if the user is known to use a chess engine
"language": "en", // prefered language
2014-08-08 02:58:02 -06:00
"profile": {
2016-08-11 16:38:08 -06:00
"bio": "Writes bugs for free",
2014-08-08 02:58:02 -06:00
"country": "FR",
"firstName": "Thibault",
"lastName": "Duplessis",
"location": "Paris"
},
2016-06-16 05:24:33 -06:00
"perfs": { // user performances in different games
2014-08-08 02:58:02 -06:00
"bullet": {
2016-06-16 05:24:33 -06:00
"games": 35, // number of rated games played
"rating": 1624, // Glicko2 rating
"rd": 80, // Glicko2 rating deviation
"prog": -13 // progress over the last twelve games
2014-08-08 02:58:02 -06:00
},
"chess960": {
"games": 1,
"rating": 1739,
"rd": 277,
"prog": 33
2014-08-08 02:58:02 -06:00
},
"classical": {
"games": 331,
"rating": 1603,
"rd": 65,
"prog": 9
2014-08-08 02:58:02 -06:00
},
"kingOfTheHill": {
"games": 3,
"rating": 1622,
"rd": 223,
"prog": -62
2014-08-08 02:58:02 -06:00
},
"puzzle": {
"games": 9,
"rating": 902,
"rd": 117,
"prog": -328
2014-08-08 02:58:02 -06:00
},
"threeCheck": {
"games": 1,
"rating": 1662,
"rd": 290
}
}
2013-12-30 19:24:24 -07:00
}
2013-12-30 19:00:56 -07:00
```
2014-01-27 15:38:00 -07:00
Example usage with JSONP:
2013-12-31 03:45:37 -07:00
```javascript
$.ajax({
2017-05-26 11:19:32 -06:00
url:'https://lichess.org/api/user/thibault',
2013-12-31 03:45:37 -07:00
dataType:'jsonp',
jsonp:'callback',
success: function(data) {
// data is a javascript object, do something with it!
console.debug(JSON.stringify(data));
}
});
```
2017-01-29 08:28:42 -07:00
### `GET /api/user` fetch many users from a team
2014-01-08 17:06:20 -07:00
2014-08-08 03:24:14 -06:00
```
2017-05-26 11:19:32 -06:00
> curl https://lichess.org/api/user?team=coders&nb=10&page=1
2014-08-08 03:24:14 -06:00
```
2016-08-15 04:27:12 -06:00
The team parameter is mandatory.
2014-01-08 17:06:20 -07:00
name | type | default | description
--- | --- | --- | ---
2014-01-08 17:15:29 -07:00
**team** | string | - | filter users by team
2016-08-11 16:38:08 -06:00
**nb** | int | 10 | maximum number of users to return per page
**page** | int | 1 | for pagination
2014-01-08 17:06:20 -07:00
```javascript
{
2016-08-11 16:38:08 -06:00
"currentPage": 3,
"previousPage": 2,
"nextPage": 4,
"maxPerPage": 100,
"nbPages": 43,
"nbResults": 4348,
"currentPageResults": [
2014-01-08 17:06:20 -07:00
{
2014-08-08 02:58:02 -06:00
... // see user document above
2014-01-08 17:15:29 -07:00
},
... // other users
2014-01-08 17:06:20 -07:00
]
}
```
2014-01-27 15:38:00 -07:00
Example usage with JSONP:
2014-01-08 17:06:20 -07:00
```javascript
$.ajax({
2017-05-26 11:19:32 -06:00
url:'https://lichess.org/api/user',
2014-01-08 17:06:20 -07:00
data: {
team: 'coders',
nb: 100
},
dataType:'jsonp',
jsonp:'callback',
success: function(data) {
// data is a javascript object, do something with it!
console.debug(JSON.stringify(data.list));
}
});
```
2017-01-22 14:21:57 -07:00
### `POST /api/users` fetch many users by ID
```
2017-05-26 11:19:32 -06:00
> curl --data "legend,lovlas" 'https://lichess.org/api/users'
2017-01-22 14:21:57 -07:00
```
Users are returned in the order same order as the ids.
2017-01-29 08:28:42 -07:00
### `GET /api/users/status` fetch many users `online` and `playing` flags
```
2017-05-26 11:19:32 -06:00
> curl -s 'https://lichess.org/api/users/status?ids=thibault,chess-network'
2017-01-29 08:28:42 -07:00
```
name | type | default | description
--- | --- | --- | ---
2017-01-29 08:29:26 -07:00
**ids** | string | - | user ids separated by commas. Max 40 user ids.
2017-01-29 08:28:42 -07:00
```javascript
[
{
"id": "thibault",
"name": "thibault",
"patron": true,
"online": true,
"playing": true
},
{
"id": "chess-network",
"name": "Chess-Network",
"title": "NM",
"patron": true,
"online": false,
"playing": false
}
]
```
2016-01-21 23:45:07 -07:00
### `GET /api/user/<username>/games` fetch user games
2014-01-07 18:43:20 -07:00
2014-08-08 03:24:14 -06:00
```
2017-05-26 11:19:32 -06:00
> curl https://lichess.org/api/user/thibault/games?nb=10&page=2
2014-08-08 03:24:14 -06:00
```
2014-01-08 17:06:20 -07:00
Games are returned by descendant chronological order.
All parameters are optional.
2014-01-07 18:43:20 -07:00
name | type | default | description
--- | --- | --- | ---
2016-08-11 16:38:08 -06:00
**nb** | int | 10 | maximum number of games to return per page
2016-01-20 22:56:59 -07:00
**page** | int | 1 | for pagination
**with_analysis** | 1 or 0 | 0 | include deep analysis data in the result
2014-08-30 02:39:34 -06:00
**with_moves** | 1 or 0 | 0 | include a list of PGN moves
2017-05-20 08:29:19 -06:00
**with_opening** | 1 or 0 | 0 | include opening information
**with_movetimes** | 1 or 0 | 0 | include move time information
**rated** | 1 or 0 | - | rated games only
**playing** | 1 or 0 | - | games in progress only
2014-01-07 18:43:20 -07:00
```javascript
{
2016-01-20 22:56:59 -07:00
"currentPage": 3,
"previousPage": 2,
"nextPage": 4,
"maxPerPage": 100,
"nbPages": 43,
"nbResults": 4348,
"currentPageResults": [
2014-01-07 18:43:20 -07:00
{
2014-08-13 02:51:15 -06:00
"id": "39b12Ikl",
"variant": "chess960", // standard/chess960/fromPosition/kingOfTheHill/threeCheck
"speed": "blitz", // bullet|blitz|classical|unlimited
"perf": "chess960", // bullet|blitz|classical|chess960|kingOfTheHill|threeCheck
"rated": true,
2014-06-06 03:08:43 -06:00
"status": "mate", // (1)
2014-01-27 06:38:23 -07:00
"clock":{ // all clock values are expressed in seconds
2014-08-13 02:51:15 -06:00
"initial": 300,
2014-01-27 06:38:23 -07:00
"increment": 8,
2016-11-12 18:13:58 -07:00
"totalTime": 620 // evaluation of the game duration = initial + 40 * increment
2014-01-27 06:38:23 -07:00
},
"createdAt": 1389100907239,
"lastMoveAt": 1389100907239,
2014-01-07 18:43:20 -07:00
"turns": 44,
"color": "white", // color who plays next
2016-06-16 05:24:33 -06:00
"url": "https://lichess.org/x2kpaixn",
2014-01-07 18:43:20 -07:00
"winner": "black",
"players": {
"white": {
"userId": "thibault",
"name": "Thibault D", // only in the case of imported game
2014-01-07 18:43:20 -07:00
"rating": 1642,
"analysis": {
"blunder": 1,
"inaccuracy": 0,
"mistake": 2
},
// time taken for each move in hundreths of seconds
"moveCentis": [0, 812, 2516, 7644, 12660, 15740, 4044, ...]
2014-01-07 18:43:20 -07:00
},
"black": ... // other player
}
"analysis": [ // only if the with_analysis flag is set
{
"eval": -26, // board evaluation in centipawns
2014-06-07 02:12:40 -06:00
"move": "e4"
},
{
"eval": -8,
2014-06-07 02:12:40 -06:00
"move": "b5"
},
{
"eval": -66,
"move": "Nfe3",
"variation": "c4 bxc4 Nfe3 c5 Qf1 f6 Rxc4 Bb7 b4 Ba6"
},
// ... more moves
],
2014-09-02 01:01:40 -06:00
"moves": "Nf3 d5 g3 e6 Bg2 Be7 d3 Nf6 Nbd2 O-O O-O c6 Rfe1 b6 e4 Bb7", // with_moves flag
"opening": { // with_opening flag
"code": "A07",
"name": "King's Indian Attack, General"
}
2014-01-07 18:43:20 -07:00
},
{
... // other game
}
]
}
```
(1) All game statuses: https://github.com/ornicar/scalachess/blob/master/src/main/scala/Status.scala#L16-L28
2014-01-07 18:43:20 -07:00
### `GET /api/games/vs/<username>/<username>` fetch games between 2 users
```
2017-05-26 11:19:32 -06:00
> curl https://lichess.org/api/games/vs/thibault/legend?nb=10&page=2
```
Parameters and result are similar to the users games API.
2017-04-24 03:42:44 -06:00
### `GET /api/games/team/<teamId>` fetch games between players of a team
```
2017-05-26 11:19:32 -06:00
> curl https://lichess.org/api/games/team/freenode?nb=10&page=2
2017-04-24 03:42:44 -06:00
```
Parameters and result are similar to the users games API.
2014-06-06 03:08:43 -06:00
### `GET /api/game/{id}` fetch one game by ID
2014-08-08 03:24:14 -06:00
```
2017-05-26 11:19:32 -06:00
> curl https://lichess.org/api/game/x2kpaixn
2014-08-08 03:24:14 -06:00
```
A single game is returned.
All parameters are optional.
name | type | default | description
--- | --- | --- | ---
**with_analysis** | 1 or 0 | 0 | include deep analysis data in the result
2014-08-30 02:39:34 -06:00
**with_moves** | 1 or 0 | 0 | include a list of PGN moves
2017-05-20 08:29:19 -06:00
**with_movetimes** | 1 or 0 | 0 | include move time information
**with_opening** | 1 or 0 | 0 | include opening information
2014-08-30 03:03:55 -06:00
**with_fens** | 1 or 0 | 0 | include a list of FEN states
2014-06-06 03:08:43 -06:00
```javascript
{
2014-08-13 02:51:15 -06:00
"id": "39b12Ikl",
2014-08-30 03:06:09 -06:00
"initialFen": "rkrqnnbb/pppppppp/8/8/8/8/PPPPPPPP/RKRQNNBB w KQkq - 0 1" // omitted is standard
2014-08-13 02:51:15 -06:00
"variant": "chess960", // standard/chess960/fromPosition/kingofthehill/threeCheck
"speed": "blitz", // bullet|blitz|classical|unlimited
"perf": "chess960", // bullet|blitz|classical|chess960|kingOfTheHill|threeCheck
"rated": true,
2014-06-06 03:08:43 -06:00
"status": "mate", // (1)
"clock":{ // all clock values are expressed in seconds
2014-08-13 02:51:15 -06:00
"initial": 300,
2014-06-06 03:08:43 -06:00
"increment": 8,
2016-11-12 18:13:58 -07:00
"totalTime": 620 // evaluation of the game duration = initial + 40 * increment
2014-06-06 03:08:43 -06:00
},
"createdAt": 1389100907239,
"lastMoveAt": 1389100907239,
2014-06-06 03:08:43 -06:00
"turns": 44,
"color": "white", // color who plays next
2016-06-16 05:24:33 -06:00
"url": "https://lichess.org/x2kpaixn",
2014-06-06 03:08:43 -06:00
"winner": "black",
"players": {
"white": {
"userId": "thibault",
"name": "Thibault D", // only in the case of imported game
2014-06-06 03:08:43 -06:00
"rating": 1642,
"analysis": {
"blunder": 1,
"inaccuracy": 0,
"mistake": 2
},
// time taken for each move in hundreths of seconds
"moveCentis": [0, 812, 2516, 7644, 12660, 15740, 4044, ...]
2014-06-06 03:08:43 -06:00
},
"black": ... // other player
},
"analysis": [ // only if the with_analysis flag is set
{
"eval": -26, // board evaluation in centipawns
2014-06-07 02:12:40 -06:00
"move": "e4"
},
{
"eval": -8,
2014-06-07 02:12:40 -06:00
"move": "b5"
},
{
"eval": -66,
"move": "Nfe3",
"variation": "c4 bxc4 Nfe3 c5 Qf1 f6 Rxc4 Bb7 b4 Ba6"
},
// ... more moves
2014-08-30 02:39:34 -06:00
],
2014-08-30 03:03:55 -06:00
"moves": "Nf3 d5 g3 e6 Bg2 Be7 d3 Nf6 Nbd2 O-O O-O c6 Rfe1 b6 e4 Bb7", // with_moves flag
2014-09-02 01:01:40 -06:00
"opening": { // with_opening flag
"code": "A07",
"name": "King's Indian Attack, General"
}
2014-08-30 03:03:55 -06:00
"fens": [ // only if with_fens flag is set
"rnbqkbnr/pppppppp/8/8/8/5N2/PPPPPPPP/RNBQKB1R",
"rnbqkbnr/ppp1pppp/8/3p4/8/5N2/PPPPPPPP/RNBQKB1R",
"rnbqkbnr/ppp1pppp/8/3p4/8/5NP1/PPPPPP1P/RNBQKB1R",
"rnbqkbnr/ppp2ppp/4p3/3p4/8/5NP1/PPPPPP1P/RNBQKB1R",
"rnbqkbnr/ppp2ppp/4p3/3p4/8/5NP1/PPPPPPBP/RNBQK2R",
"rnbqk1nr/ppp1bppp/4p3/3p4/8/5NP1/PPPPPPBP/RNBQK2R",
// ... more fens
]
2014-06-06 03:08:43 -06:00
}
```
(1) All game statuses: https://github.com/ornicar/scalachess/blob/master/src/main/scala/Status.scala#L16-L28
2014-06-06 03:08:43 -06:00
2017-01-22 13:57:12 -07:00
### `POST /api/games` fetch many games by ID
```
2017-05-26 11:19:32 -06:00
> curl --data "x2kpaixn,gtSLJGOK" 'https://lichess.org/api/games'
2017-01-22 13:57:12 -07:00
```
Games are returned in the order same order as the ids.
All parameters are optional.
name | type | default | description
--- | --- | --- | ---
**with_moves** | 1 or 0 | 0 | include a list of PGN moves
2015-02-03 01:24:18 -07:00
### `GET /game/export/{id}.pgn` fetch one game PGN by ID
2014-06-12 15:27:02 -06:00
2017-05-26 11:19:32 -06:00
https://lichess.org/game/export/Qa7FJNk2.pgn
2014-06-12 15:27:02 -06:00
2014-08-08 03:24:14 -06:00
This returns the raw PGN for a game.
2014-06-12 15:27:02 -06:00
```
[Event "Rated game"]
2016-06-16 05:24:33 -06:00
[Site "https://lichess.org/Qa7FJNk2"]
2014-06-12 15:27:02 -06:00
[Date "2014.06.12"]
[White "onpurplesz"]
[Black "LauraSchmidt"]
[Result "1-0"]
[WhiteElo "1516"]
[BlackElo "1698"]
[PlyCount "37"]
[Variant "Standard"]
[TimeControl "1020+0"]
[ECO "C50"]
[Opening "Italian Game, General"]
[WhiteClock ":11:9"]
[BlackClock ":14:6"]
[Annotator "lichess.org"]
1. e4 e5 2. Nf3 Nc6 3. Bc4 { Italian Game, General } Qf6?! { (0.13 → 0.98) Inaccuracy. Best move was Nf6. } (3... Nf6 4. d3 Bc5 5. O-O O-O 6. Bg5 Be7 7. a3 d6 8. h3 a6) 4. d3 h6 5. Be3 d6 6. h3?! { (0.84 → 0.31) Inaccuracy. The best move was Nc3. } (6. Nc3 Be6 7. Nd5 Qd8 8. d4 exd4 9. Nxd4 Nxd4 10. Qxd4 c6 11. Nc3 Bxc4 12. Qxc4 Nf6 13. O-O Be7) 6... a6 7. Nbd2 Be6 8. Qe2 Bxc4 9. Nxc4 Nge7 10. a3 Nd4?! { (0.29 → 0.79) Inaccuracy. The best move was O-O-O. } (10... O-O-O 11. O-O g5 12. a4 Bg7 13. Bd2 Kb8 14. Rae1 Qe6 15. b4 f5 16. b5 fxe4) 11. Bxd4 exd4 12. O-O-O Nc6 13. Rhe1 O-O-O 14. e5 dxe5 15. Nfxe5 Nxe5 16. Qxe5 Qxe5? { (0.35 → 1.78) Mistake. The best move was Qxf2. } (16... Qxf2 17. Re2 Qf6 18. Qxf6 gxf6 19. Rf1 Bg7 20. Nd2 h5 21. Ne4 Rhe8 22. Ref2 Re5 23. b3 Rdd5 24. Kb2) 17. Nxe5 Rg8?! { (1.76 → 2.32) Inaccuracy. The best move was Rd7. } (17... Rd7 18. Nxd7 Kxd7 19. Re4 c5 20. c3 dxc3 21. bxc3 Bd6 22. Kc2 b5 23. a4 Ra8 24. d4 Kc6 25. dxc5) 18. Nxf7 Rd7? { (2.35 → Mate in 2) Checkmate is now unavoidable. The best move was Rd5. } (18... Rd5 19. Re8+ Kd7 20. Rde1 Bb4 21. Rxg8 Bxe1 22. Rxg7 Bxf2 23. Nxh6+ Kc6 24. Kd1 Rb5 25. b3 Rh5 26. Nf7) 19. Re8+ { Black resigns } 1-0
2014-06-12 15:27:02 -06:00
```
### `GET /api/tournament` fetch current tournaments
2016-08-15 04:41:53 -06:00
Returns tournaments displayed on the schedule: https://lichess.org/tournament
2016-08-15 04:41:53 -06:00
```
2017-05-26 11:19:32 -06:00
> curl https://lichess.org/api/tournament
2016-08-15 04:41:53 -06:00
```
```javascript
{
"created": [
{
"id": "f4wnl48m",
"createdBy": "thedave13213",
"system": "arena",
"minutes": 45,
"clock": {
"limit": 120,
"increment": 0
},
"position": null,
"rated": true,
"fullName": "Ulrich Arena",
"nbPlayers": 1,
"private": false,
"variant": {
"key": "standard",
"short": "Std",
"name": "Standard"
},
"secondsToStart": 38,
"startsAt": 1471257146633,
"finishesAt": 1471259846633,
"status": 10,
"schedule": null,
"winner": null,
"conditions": null,
"perf": {
"icon": "T",
"name": "Bullet",
"position": 0
}
}
],
"started": [
...
],
"finished": [
...
]
}
```
JSONP is available.
### `GET /api/tournament/<tournamentId>` fetch one tournament
2016-08-15 04:41:53 -06:00
Returns tournament info, and a page of the tournament standing
name | type | default | description
--- | --- | --- | ---
**page** | int | 1 | for standing pagination
```
2017-05-26 11:19:32 -06:00
curl 'https://lichess.org/api/tournament/x5WNIngd?page=1'
2016-08-15 04:41:53 -06:00
```
```javascript
{
"clock": {
"increment": 0,
"limit": 300
},
"createdBy": "lichess",
"fullName": "Hourly Blitz Arena",
"id": "x5WNIngd",
"isFinished": true,
"isStarted": false,
"minutes": 56,
"nbPlayers": 128,
"next": {
"finishesAt": null,
"id": "dNivtcYG",
"name": "Hourly SuperBlitz Arena",
"nbPlayers": 0,
"perf": {
"icon": ")",
"name": "Blitz"
},
"startsAt": "2016-08-15T11:00:00.000Z"
},
"startsAt": "2016-05-25T22:00:00.000Z",
"system": "arena",
"variant": "standard",
"verdicts": {
"accepted": true,
"list": []
}
"pairings": [
{
"id": "gtFxbHU8",
"s": 3,
"u": ["nimsraw", "Ernom"]
},
{
"id": "oyl3n1bB",
"s": 3,
"u": ["esparzaesc72", "athletics_champ"]
},
...
],
"perf": {
"icon": ")",
"name": "Blitz"
},
"podium": [
{
"name": "athletics_champ",
"nb": {
"berserk": 0,
"game": 7,
"win": 7
},
"performance": 2297,
"rank": 1,
"rating": 2100,
"ratingDiff": 37,
"score": 24,
"sheet": {
"fire": true,
"scores": [
[2, 2],
...
]
},
...
],
"schedule": {
"freq": "hourly",
"speed": "blitz"
},
"standing": {
"page": 1,
"players": [
{
"name": "athletics_champ",
"rank": 1,
"rating": 2100,
"ratingDiff": 37,
"score": 24,
"sheet": {
"fire": true,
"scores": [
[2, 2 ],
...
]
}
},
...
]
}
}
```
JSONP is available.
2013-06-08 05:25:27 -06:00
Credits
-------
2016-06-16 05:24:33 -06:00
See the [lichess Thanks page](https://lichess.org/thanks)
Supported browsers
------------------
2017-03-19 08:43:16 -06:00
- [Chrome](https://www.google.com/chrome) or [Chromium](https://www.chromium.org/getting-involved/download-chromium), 1 year old or newer (fastest local analysis!)
- [Firefox](https://www.mozilla.org/firefox), 1 year old or newer (second fastest local analysis!)
- Opera 34 and newer (meh)
- Safari 9 and newer (boo)
- Microsoft Edge (yuck)
- Internet Explorer 11 (eew)
Older browsers will not work. For your own sake, please upgrade.
Security and performance, think about it!
Licence
-------
2016-10-12 11:18:08 -06:00
Lila is licensed under the GNU Affero General Public License 3 or any later
version at your choice with an exception for Highcharts. See COPYING for
details.