document discover search
authorChristian Weiske <[email protected]>
Thu, 5 Dec 2019 19:50:36 +0000 (20:50 +0100)
committerChristian Weiske <[email protected]>
Thu, 5 Dec 2019 19:50:36 +0000 (20:50 +0100)
README.rst
api/devs.ouya.tv/api-v1-search.response.json [new file with mode: 0644]
api/devs.ouya.tv/api-v1-search.rst [new file with mode: 0644]

index eed8692189a252c6feee0073301314fa14db8900..4acf382092555ec5467fd9cdaca0613ca8f82ce9 100644 (file)
@@ -40,6 +40,7 @@ speak with ``devs.ouya.tv``.
 .. include:: api/devs.ouya.tv/api-v1-ratings.rst
 .. include:: api/devs.ouya.tv/api-v1-ratings.post.rst
 .. include:: api/devs.ouya.tv/api-v1-recommendations.rst
+.. include:: api/devs.ouya.tv/api-v1-search.rst
 .. include:: api/devs.ouya.tv/api-v1-sessions.rst
 .. include:: api/devs.ouya.tv/api-v1-themes.rst
 .. include:: api/devs.ouya.tv/api-v1-wallet.rst
diff --git a/api/devs.ouya.tv/api-v1-search.response.json b/api/devs.ouya.tv/api-v1-search.response.json
new file mode 100644 (file)
index 0000000..66f80f3
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "count": 1,
+  "results": [
+    {
+      "title": "Frightfight",
+      "url": "ouya://launcher/details?app=com.appsolutegames.frightfight",
+      "contentRating": "Everyone"
+    }
+  ]
+}
diff --git a/api/devs.ouya.tv/api-v1-search.rst b/api/devs.ouya.tv/api-v1-search.rst
new file mode 100644 (file)
index 0000000..9332545
--- /dev/null
@@ -0,0 +1,48 @@
+====================================================
+``GET https://devs.ouya.tv/api/v1/search``
+====================================================
+
+Search for games in the discover store.
+
+
+HTTP request
+============
+Protocol
+  ``https``
+Method
+  ``GET``
+Host
+  ``devs.ouya.tv``
+Path
+  ``/api/v1/search``
+Headers
+  Standard headers
+GET parameters
+  ``auth_token``
+    Same as ``X-OUYA-AuthToken``
+  ``q``
+    Search word(s)
+
+
+HTTP response
+=============
+Status code
+  ``200 OK``
+Content-type
+  ``application/json; charset=utf-8``
+
+The ``count`` property contains the number of games that matched the search
+string, even if they are not all returned in the result list.
+The search result list is limited to 20 or 40 games.
+
+When the ``count`` is higher than the number of items in ``results``,
+the OUYA will send a new search request to the API when another letter is added
+to the search word.
+
+If the ``count`` and ``results`` are the same, the OUYA will use the current
+response and filter it for itself without asking the server again.
+
+Example
+-------
+.. include:: api-v1-search.response.json
+   :code: