document discover search
[ouya-store-api.git] / api / devs.ouya.tv / api-v1-details.rst
1 ===========================================
2 ``GET https://devs.ouya.tv/api/v1/details``
3 ===========================================
4
5 Detail page for an app bundle.
6
7 Also used as detail page for installed games when opened through
8 the "Play" section.
9
10 If there are no details available, the error code 2005 needs to be returned.
11 Otherwise opening the details for an installed but unlisted game will
12 fail on the OUYA.
13
14
15 HTTP request
16 ============
17 Protocol
18   ``https``
19 Method
20   ``GET``
21 Host
22   ``devs.ouya.tv``
23 Path
24   ``/api/v1/details``
25 Headers
26   Standard headers
27 GET parameters
28   ``auth_token``
29     Same as ``X-OUYA-AuthToken``
30   ``page``
31     UUID of the bundle page to show
32
33     Example: ``be239ca4-10fd-42dd-89cd-1806e80b1362``
34   ``app``
35     Package name of an app.
36
37     Example: ``org.blockinger.game``
38   ``developer``
39     UUID of the developer
40
41     Example: ``5b015434-8a78-4274-aa5d-0cb2e330e50e``
42
43 Only one of ``app``, ``developer`` or ``page`` is provided.
44
45
46 HTTP response
47 =============
48 Status code
49   ``200 OK``
50 Content-type
51   ``application/json; charset=utf-8``
52
53 Example: App
54 ---------------
55
56 .. include:: api-v1-details.response-app.json
57    :code:
58
59 Example: Bundle
60 ---------------
61
62 .. include:: api-v1-details.response-bundle.json
63    :code:
64
65 A full version of that response data is available in git at
66 ``api/devs.ouya.tv/api-v1-details.response-bundle-full.json``
67
68
69 Example: Unlisted game
70 -----------------------
71
72 .. include:: api-v1-details.response-unlisted.json
73    :code:
74
75
76 Buttons
77 =======
78 It is possible to add buttons in each of the detail types.
79
80 There are two types of buttons:
81
82 - Switchable buttons (on/off state)
83 - URL buttons (``android.intent.action.VIEW``,
84   e.g. to open URLs or detail pages of other apps)
85
86
87 Button for a detail page of an app
88 ----------------------------------
89 .. include:: api-v1-details.response-button-appdetails.json
90    :code:
91
92 Button for a website URL
93 ------------------------
94 .. include:: api-v1-details.response-button-url.json
95    :code:
96
97 Switchable button
98 -----------------
99 .. include:: api-v1-details.response-button-switchable.json
100    :code:
101
102 When the details page is loaded, ``status_url`` is fetched.
103 It needs to return ``{"status":true}`` or ``{"status":false}``.
104
105 If "true" is returned, ``on_text`` is shown.
106 Clicking will launch ``off_url``.
107
108 If "false is returned, ``text`` is shown.
109 Clicking will launch ``url``.