X-Git-Url: https://git.cweiske.de/stouyapi.git/blobdiff_plain/c46c265bce57134d55dd362fce1743851bd5df65..589b53932620c5a45f5b4e54b7575c1326050544:/README.rst diff --git a/README.rst b/README.rst index b10ed4f..f5df7cf 100644 --- a/README.rst +++ b/README.rst @@ -17,12 +17,10 @@ OUYA config change - Add:: OUYA_SERVER_URL=http://stouyapi.boo - OUYA_STATUS_SERVER_URL=http://stouyapi.boo + OUYA_STATUS_SERVER_URL=http://stouyapi.boo/api/v1/status -Notes: - -- "important note, don't put trailing slash into OUYA_SERVER_URL, it will make double slashes" -- I had to reboot to make that change in the file active +The changes should take effect immediately. +If they do not, reboot the OUYA once. OUYA setup @@ -32,27 +30,96 @@ OUYA setup 2. Enter any username, leave password empty. Continue. 3. Skip credit card registration +The username will appear on your ouya main screen. -=========== -Information -=========== -By default, OUYA uses HTTPS to devs.ouya.tv. -(status.ouya.tv is HTTP only, no SSL) -DNS mapping does not work, except when creating an own SSL certificate -and registering the root CA at the OUYA itself. +Apache setup +============ +Virtual host configuration:: + + Script PUT /empty-json.php + Script DELETE /api/v1/queued_downloads_delete.php + + + AllowOverride All + + +``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 +https://github.com/ouya-saviors/ouya-game-data +and then generate the API files with it:: -IPv6 used -> custom domain needs IPv6 DNS entry + $ git clone https://github.com/ouya-saviors/ouya-game-data.git + $ ./bin/import-game-data.php ouya-game-data/folders -https://rabid.ouya.tv/ - was OUYA's sandbox instance -DEBUG=1 -DEBUG_SPAM=1 +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 ======== -- https://gitlab.com/devirich/BrewyaOnOuya -- https://archive.org/details/ouyalibrary -- https://github.com/cweiske/ouya-game-data/ +- https://gitlab.com/devirich/BrewyaOnOuya - alternative storefront +- https://archive.org/details/ouyalibrary - Archived OUYA games +- https://github.com/ouya-saviors/ouya-game-data/ - OUYA game data repository + + +=========== +Discoveries +=========== + +- data/data/tv.ouya/cache/ion/ + + - image cache for main menu image + +- Don't put a trailing slash into ``OUYA_SERVER_URL`` - it will make double slashes