More details in README
[stouyapi.git] / README.rst
index 91d490f4d2176fb1217c57a33b1414f8f42bd3bc..f5df7cf6697ba6b836f6837819d033d8ffefde0f 100644 (file)
@@ -30,18 +30,46 @@ OUYA setup
 2. Enter any username, leave password empty. Continue.
 3. Skip credit card registration
 
+The username will appear on your ouya main screen.
+
 
 Apache setup
 ============
 Virtual host configuration::
 
   Script PUT /empty-json.php
+  Script DELETE /api/v1/queued_downloads_delete.php
+
+  <Directory "/path/to/stouyapi/www">
+    AllowOverride All
+  </Directory>
 
-``mod_actions`` need to be enabled for apache 2.4.
+``mod_actions``, ``mod_expires`` and ``mod_php`` (or php-fpm) need to be enabled
+for Apache 2.4.
 
 The virtual host's document root needs to point to the ``www`` folder.
 
 
+Test your Apache setup
+----------------------
+::
+
+   # check if normal API routes work
+   $ curl -I http://stouyapi.cwboo/api/firmware_builds
+   HTTP/1.1 200 OK
+   [...]
+
+   # check if rewritten API routes work
+   $ curl -I http://stouyapi.cwboo/api/v1/discover/discover
+   HTTP/1.1 200 OK
+   [...]
+
+   # check if PHP routes work
+   curl -I http://stouyapi.cwboo/api/v1/gamers/me
+   HTTP/1.1 200 OK
+   [...]
+
+
 Building API data
 =================
 Download the OUYA game data repository from
@@ -52,6 +80,31 @@ and then generate the API files with it::
     $ ./bin/import-game-data.php ouya-game-data/folders
 
 
+Building the web discover store
+===============================
+After building the API files, generate the HTML::
+
+  $ ./bin/build-html.php
+
+
+===============
+Push to my OUYA
+===============
+stouyapi's HTML game detail page have a "Push to my OUYA" button that
+allows anyone to tell his own OUYA to install that game.
+It works without any user accounts, and is only based on IP addresses.
+
+If your PC that you click the Push button on and your OUYA have the same
+public IP address (IPv4 NAT), or the same IPv6 64bit prefix, then
+the OUYA will install the game within 5 minutes.
+
+It will also work if you run stouyapi inside your local network, because
+all private IP addresses are mapped to a special "local" address.
+
+You can inspect your own download queue by simply opening
+``/api/v1/queued_downloads`` in your browser.
+
+
 ========
 See also
 ========