Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Server: Games API

Rodolfo Andrés Rivas Matta edited this page Aug 5, 2023 · 3 revisions

Uploading a Game

URL: https://api.lynxgamestore.com/games/upload
Method: POST
Encoding: multipart/form-data

This API requires a sessionid with an authenticated user. That way, the server will know and assign the current user as the creator. Learn how to get an authenticated sessionid in the Authentication API documentation.

curl -X POST -H "Cookie: sessionid=<your_sessionid>" -F "name=<game_title>" -F "description=<description>" -F "exepath=<path_to_exe>" -F 'gbin=@<path_to_zip_file>' https://api.lynxgamestore.com/games/upload

Listing All Games

URL: https://api.lynxgamestore.com/games/list
Method: GET

Get a list of game objects. This API currently returns all the games in the server, which could be more efficient. A future update will fix this.

curl https://api.lynxgamestore.com/games/list

Download a Game

URL: https://api.lynxgamestore.com/games/download
Method: GET

You can use this endpoint to download a game using the id. You must pass the id as a GET parameter, as shown below. Also, you may have to specify the download name file (and location) when using curl.

curl "http://127.0.0.1:8000/games/download?id=<game_id>" > <filename>.zip
Clone this wiki locally