First two API methods
authorChristian Weiske <[email protected]>
Fri, 31 Mar 2023 14:16:47 +0000 (16:16 +0200)
committerChristian Weiske <[email protected]>
Fri, 31 Mar 2023 14:16:47 +0000 (16:16 +0200)
.gitignore [new file with mode: 0644]
README.rst [new file with mode: 0644]
api/connectcheck.gamestickservices.net/generate_204.rst [new file with mode: 0644]
api/update.gamestickservices.net/check.php.response-no-update.json [new file with mode: 0644]
api/update.gamestickservices.net/check.php.response-update.json [new file with mode: 0644]
api/update.gamestickservices.net/check.php.rst [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..7bd2dc8
--- /dev/null
@@ -0,0 +1 @@
+/README.html
diff --git a/README.rst b/README.rst
new file mode 100644 (file)
index 0000000..647c251
--- /dev/null
@@ -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 (file)
index 0000000..e7d71c8
--- /dev/null
@@ -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 (file)
index 0000000..31250f9
--- /dev/null
@@ -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 (file)
index 0000000..592b34c
--- /dev/null
@@ -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 (file)
index 0000000..ce83dcf
--- /dev/null
@@ -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``