From 0558ba432ab2861a607f97fba4346c8bcf121027 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 18 Jun 2015 06:18:00 +0200 Subject: [PATCH 1/1] first work --- .gitignore | 1 + README.rst | 12 +++++ .../api-v1-console_configuration.rst | 28 ++++++++++ api/status.ouya.tv/api-v1-status.rst | 28 ++++++++++ build.sh | 2 + headers.rst | 51 +++++++++++++++++++ 6 files changed, 122 insertions(+) create mode 100644 .gitignore create mode 100644 README.rst create mode 100644 api/devs.ouya.tv/api-v1-console_configuration.rst create mode 100644 api/status.ouya.tv/api-v1-status.rst create mode 100755 build.sh create mode 100644 headers.rst diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..b683a13 --- /dev/null +++ b/README.rst @@ -0,0 +1,12 @@ +**************************** +OUYA store API documentation +**************************** + +This is an attempt to document the API used by OUYA gaming devices to +speak with ``devs.ouya.tv``. + +.. contents:: + +.. include:: headers.rst +.. include:: api/status.ouya.tv/api-v1-status.rst +.. include:: api/devs.ouya.tv/api-v1-console_configuration.rst diff --git a/api/devs.ouya.tv/api-v1-console_configuration.rst b/api/devs.ouya.tv/api-v1-console_configuration.rst new file mode 100644 index 0000000..4f4999d --- /dev/null +++ b/api/devs.ouya.tv/api-v1-console_configuration.rst @@ -0,0 +1,28 @@ +========================================================= +``GET https://devs.ouya.tv/api/v1/console_configuration`` +========================================================= + +FIXME: What is this used for? + + +HTTP request +============ +Protocol + ``https`` +Method + ``GET`` +Host + ``devs.ouya.tv`` +Path + ``/api/v1/console_configuration`` +Headers + Standard headers +GET parameters + ``auth_token`` + May be empty. + + Does not seem to have any influence on the response. + + +HTTP response +============= diff --git a/api/status.ouya.tv/api-v1-status.rst b/api/status.ouya.tv/api-v1-status.rst new file mode 100644 index 0000000..8575da6 --- /dev/null +++ b/api/status.ouya.tv/api-v1-status.rst @@ -0,0 +1,28 @@ +=========================================== +``GET http://status.ouya.tv/api/v1/status`` +=========================================== + +Check if the internet connection is working by fetching an empty file. + +HTTP request +============ +Protocol + ``http`` +Method + ``GET`` +Host + ``status.ouya.tv`` +Path + ``/api/v1/status`` +Headers + None of the standard headers. + + :: + + User-Agent: Ouya-Connection-Test + + +HTTP response +============= +Status code + 204 No Content diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..68ec9eb --- /dev/null +++ b/build.sh @@ -0,0 +1,2 @@ +#!/bin/sh +rst2html README.rst README.html diff --git a/headers.rst b/headers.rst new file mode 100644 index 0000000..8a07079 --- /dev/null +++ b/headers.rst @@ -0,0 +1,51 @@ +===================== +Standard HTTP headers +===================== + +The following HTTP headers are sent with nearly every HTTP request +from the OUYA console to the servers. + +``Accept-Language`` + ``en-US,en`` +``X-OUYA-VersionCode`` + ``16`` +``X-OUYA-Console-Id`` + ``015d4b33bc64141b`` + + Serial number you see when running ``$ adb devices`` +``X-OUYA-AuthToken`` + ``96bfeaae-212d-447b-b4bf-caa5e86c0502`` + + Authentication token one got from logging in. + + Only sent when logged in. +``X-OUYA-Console-Wifi-MAC-Address`` + ``B8:5A:F7:82:3C:C8`` +``X-OUYA-Firmware-Version`` + ``1.2.1427_r1`` +``X-Token`` + ``96bfeaae-212d-447b-b4bf-caa5e86c0502`` + + Only sent when logged in. + + Same as ``X-OUYA-AuthToken``. + + FIXME: Why two token headers? +``X-OUYA-Device`` + ``ouya_1_1`` + + Probably hardware revision +``Cookie`` + ``__cfduid=da019d762142461c19f162c0ee443f9c71434577887`` + + ??? FIXME +``Cookie2`` + ``$Version=1`` + + ??? FIXME +``Accept-Encoding`` + ``gzip`` + + The OUYA understands gzip compression +``User-Agent`` + ``OUYA 0 1.00 1.2.1427_r1`` -- 2.30.2