Chesspastebin feature an API so that other software out there could add, view and remove games from the database. The get an API account please send an email to toomasr@gmail.com and you will receive an API key.
Adding games
URL: http://www.chesspastebin.com/api/add/
Method: POST
Returns: Prints out the ID (integer). You can view the game at http://www.chesspastebin.com/?p=ID
| Key | Value | Comment |
|---|---|---|
| apikey | Your API key | Required |
| pgn | The PGN of the game | Required |
| name | Name of the uploader | Optional. Defaults to Noname |
| Email of the uploader | Optional. Defaults to no_body@no_where.org | |
| sandbox | true | false | Optional. Defaults to false. In case of true will not add the post but will do the regular validation of the request. On success will print out 42 as the ID. |
Removing games
Not implemented at the moment.
Pingback: Updated design & API documentation | Chess Pastebin