From: Christian Weiske Date: Fri, 31 Mar 2023 14:16:47 +0000 (+0200) Subject: First two API methods X-Git-Url: https://git.cweiske.de/playjam-gamestick-api-docs.git/commitdiff_plain/6feed2945ba699565ce3ee61b1a20827edcf4ddc First two API methods --- 6feed2945ba699565ce3ee61b1a20827edcf4ddc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7bd2dc8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/README.html diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..647c251 --- /dev/null +++ b/README.rst @@ -0,0 +1,12 @@ +****************************************** +PlayJam GameStick server API documentation +****************************************** + +This is an attempt to document the network API used by the PlayJam GameStick +gaming console. + +.. contents:: + :depth: 1 + +.. include:: api/connectcheck.gamestickservices.net/generate_204.rst +.. include:: api/update.gamestickservices.net/check.php.rst diff --git a/api/connectcheck.gamestickservices.net/generate_204.rst b/api/connectcheck.gamestickservices.net/generate_204.rst new file mode 100644 index 0000000..e7d71c8 --- /dev/null +++ b/api/connectcheck.gamestickservices.net/generate_204.rst @@ -0,0 +1,30 @@ +============================================================== +``GET http://connectcheck.gamestickservices.net/generate_204`` +============================================================== + +Network availability ping via HTTP. + + +HTTP request +============ +Protocol + ``http`` +Host + ``connectcheck.gamestickservices.net`` +Path + ``generate_204`` + + +HTTP response +============= + +Success +------- +Status code + ``204 No Content`` + + + +Usage +===== +- ``com.playjam.gamestick.WifiTools.ChecksFragment#http`` diff --git a/api/update.gamestickservices.net/check.php.response-no-update.json b/api/update.gamestickservices.net/check.php.response-no-update.json new file mode 100644 index 0000000..31250f9 --- /dev/null +++ b/api/update.gamestickservices.net/check.php.response-no-update.json @@ -0,0 +1,3 @@ +{ + "available": false +} diff --git a/api/update.gamestickservices.net/check.php.response-update.json b/api/update.gamestickservices.net/check.php.response-update.json new file mode 100644 index 0000000..592b34c --- /dev/null +++ b/api/update.gamestickservices.net/check.php.response-update.json @@ -0,0 +1,11 @@ +{ + "available": true, + "major": 0, + "minor": 0, + "revision": 53, + "forced": false, + "name": "v2.23.42", + "description": "Update now immediately! We have new features.", + "timestamp": 1680271986000, + "url": "http://example.org/firmware.ext" +} diff --git a/api/update.gamestickservices.net/check.php.rst b/api/update.gamestickservices.net/check.php.rst new file mode 100644 index 0000000..ce83dcf --- /dev/null +++ b/api/update.gamestickservices.net/check.php.rst @@ -0,0 +1,56 @@ +====================================================== +``POST http://update.gamestickservices.net/check.php`` +====================================================== + +Check if a new firmware update is available. + + +HTTP request +============ +Protocol + ``http`` +Host + ``update.gamestickservices.net`` +Path + ``check.php`` +Headers + ``Content-Type`` + ``application/x-www-form-urlencoded`` +POST parameters + ``v`` + JSON-encoded hardware information:: + + { + "hwid": "ac:db:da:09:18:5c", + "major": 0, + "minor": 1, + "revision": 53, + "platform": 0 + } + + +HTTP response +============= + +Update available +---------------- +Status code + ``200 OK`` + +.. include:: check.php.response-update.json + :code: + + +No update available +------------------- +Status code + ``200 OK`` + +.. include:: check.php.response-no-update.json + :code: + + + +Usage +===== +- ``com.playjam.gamestick.WifiTools.ChecksFragment#doUpdateConnect``