Skip to content
Ahmed Castro edited this page Mar 27, 2017 · 3 revisions

Generate Token

Returns the authentication token.

  • URL

    /accounts/token

  • Method:

    POST

  • URL Params

    None

  • Data Params

    Required:

    username=[integer]

    password=[string]

  • Header Params

    Content-Type: application/json

  • Success Response:

    • Code: 200 OK
      Content: {"token":"a5af79d702c45fc69a8935af568ad674e2398bd7"}
  • Error Response:

    • Code: 400 BAD REQUEST
      Content: {"non_field_errors":["Unable to log in with provided credentials."]}
  • Sample Call:

      curl -H "Content-Type: application/json" -X POST -d '{"username":"StallmanSama","password":"installgentoo123"}' https://lutris.net/api/accounts/token
    

Get Games

Returns the game list.

  • URL

    /games

  • Method:

    GET or POST

  • URL Params

    None

  • Data Params

    None

  • Header Params

    None

  • Success Response:

    • Code: 200
      Content: {"count":10196,"next":"http://lutris.net/api/games?page=2","previous":null,"results":[{"name":"001 Game Creator","slug":"001-game-creator","year":null,"platforms":[],"genres":[],"banner_url":"/games/banner/001-game-creator.jpg","icon_url":"/games/icon/001-game-creator.png","is_public":false,"updated":"2017-01-20T02:08:49.849257Z","steamid":347400,"gogid":"","humblestoreid":""},{"name":"007™ Legends","slug":"007tm-legends","year":null,"platforms":[],"genres":[],"banner_url":"/games/banner/007tm-legends.jpg","icon_url":"/games/icon/007tm-legends.png","is_public":true,"updated":"2017-03-21T15:21:45.037497Z","steamid":211670,"gogid":"","humblestoreid":""}]}
  • Sample Call:

      curl https://lutris.net/api/games
    

Get Runners

Returns the runners list.

  • URL

    /runners

  • Method:

    GET

  • URL Params

    None

  • Data Params

    None

  • Header Params

    None

  • Success Response:

    • Code: 200 OK
      Content: {"count":39,"next":null,"previous":null,"results":[{"name":"ags","slug":"ags","icon":null,"website":"http://www.adventuregamestudio.co.uk/","versions":[{"version":"3.4.1.0","architecture":"x86_64","url":"https://lutris.net/files/runners/ags-3.4.1.0-x86_64.tar.gz","default":true}]},{"name":"Atari800","slug":"atari800","icon":null,"website":"http://atari800.sourceforge.net/","versions":[{"version":"3.1.0","architecture":"i386","url":"https://lutris.net/files/runners/atari800-3.1.0-i686.tar.gz","default":false},{"version":"3.1.0","architecture":"x86_64","url":"https://lutris.net/files/runners/atari800-3.1.0-x86_64.tar.gz","default":false}]}]}
  • Sample Call:

      curl https://lutris.net/api/runners
    

Get Library

Returns a user library.

  • URL

    /games/library/:username

  • Method:

    GET

  • URL Params

    None

  • Data Params

    None

  • Header Params

    Authorization: Token <authentication token>

  • Success Response:

    • Code: 200 OK
      Content: {"user":1337,"games":[{"name":"0 A.D.","slug":"0-ad","year":2014,"platforms":[{"name":"Linux"}],"genres":[{"name":"Real-time strategy"}],"banner_url":"/games/banner/0-ad.jpg","icon_url":"/games/icon/0-ad.png","is_public":true,"updated":"2015-03-26T14:50:53.087000Z","steamid":null,"gogid":"","humblestoreid":""},{"name":"OpenRA","slug":"openra","year":null,"platforms":[{"name":"Linux"}],"genres":[{"name":"Real-time strategy"}],"banner_url":"/games/banner/openra.jpg","icon_url":"/games/icon/openra.png","is_public":true,"updated":"2014-11-15T15:41:57.227000Z","steamid":null,"gogid":"","humblestoreid":""},{"name":"Warsow","slug":"warsow","year":2012,"platforms":[{"name":"Linux"}],"genres":[{"name":"FPS"}],"banner_url":"/games/banner/warsow.jpg","icon_url":"/games/icon/warsow.png","is_public":true,"updated":"2014-12-14T15:56:18.592000Z","steamid":null,"gogid":"","humblestoreid":""}]}
  • Error Response:

    • Code: 401 UNAUTHORIZED
      Content: {"detail":"Invalid token."}
  • Sample Call:

      curl -X GET https://lutris.net/api/games/library/StallmanSama  -H "Authorization: Token a5af79d702c45fc69a8935af568ad674e2398bd7"
    
Clone this wiki locally