document current_gamer
authorChristian Weiske <cweiske@cweiske.de>
Sat, 4 Jan 2020 23:57:12 +0000 (00:57 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Sat, 4 Jan 2020 23:57:12 +0000 (00:57 +0100)
api/devs.ouya.tv/api-v1-developers-xxx-current_gamer.response.json [new file with mode: 0644]
api/devs.ouya.tv/api-v1-developers-xxx-current_gamer.rst
api/devs.ouya.tv/api-v1-games-xxx-purchases.rst

diff --git a/api/devs.ouya.tv/api-v1-developers-xxx-current_gamer.response.json b/api/devs.ouya.tv/api-v1-developers-xxx-current_gamer.response.json
new file mode 100644 (file)
index 0000000..32f953a
--- /dev/null
@@ -0,0 +1,6 @@
+{
+    "gamer": {
+        "username": "cwdev3",
+        "uuid": "0a6f5fc0-bf9b-42b2-a4d0-69f2c8e4d5da"
+    }
+}
index a94a9f172d320345fc9ca4f654b278526c261512..14b6cd76e0bc60444d949b15122ccf31bd20a55b 100644 (file)
@@ -2,8 +2,44 @@
 ``GET https://devs.ouya.tv/api/v1/developers/xxx/current_gamer``
 ================================================================
 
-FIXME.
+Fetch gamer information from within a game.
 
 Usage
 =====
-- At the startup of knightmare tower (when bought)
+- At the startup of Knightmare Tower and Towerfall (when bought)
+
+  
+HTTP request
+============
+Protocol
+  ``https``
+Method
+  ``GET``
+Host
+  ``devs.ouya.tv``
+Path
+  ``/api/v1/developers/xxx/current_gamer``
+
+  ``xxx``
+    Developer UUID
+Headers
+  Standard headers
+GET parameters
+  ``auth_token``
+    Same data as in standard header ``X-OUYA-AuthToken``
+
+
+HTTP response
+=============
+Status code
+  ``200 OK``
+Content-type
+  ``application/json; charset=utf-8``
+
+Same data as in ``gamers/me``.
+
+Example
+-------
+
+.. include:: api-v1-developers-xxx-current_gamer.response.json
+   :code:
index ce1edd25f9d4e959c1836c006b19df17c809d3f7..a755ea56680c214424329b3a5cd03ad54f66792f 100644 (file)
@@ -54,7 +54,7 @@ Status code
 Content-type
   ``application/json; charset=utf-8``
 
-Three properties:
+The response is a JSON objec containing three properties:
 
 ``iv``
   Base 64 encoded initialization vector for encryption
@@ -63,14 +63,17 @@ Three properties:
 ``blob``
   Base64 encoded encrypted data
 
-The decrypted ``blob`` contains again a JSON object with the following properties:
+The decrypted ``blob`` contains again a JSON object with three properties:
 
 - ``iv``
 - ``key``
 - ``blob``
 
-This blob is again a base64-encoded JSON objecct and contains the actual data:
-An array of receipts/purchases.
+This blob is again base64-encoded JSON and contains the actual data:
+A JSON with a single property "purchases" whose value is
+an array of receipts/purchases.
+
+Each receipt has the following properties:
 
 ``purchaseDate``
   Required. Milliseconds.