document discover object structure
[ouya-store-api.git] / api / devs.ouya.tv / api-v1-discover.rst
1 ============================================
2 ``GET https://devs.ouya.tv/api/v1/discover``
3 ============================================
4
5 Fetch the categories and games in the OUYA store.
6
7
8 HTTP request
9 ============
10 Protocol
11   ``https``
12 Method
13   ``GET``
14 Host
15   ``devs.ouya.tv``
16 Path
17   ``/api/v1/discover``
18 Headers
19   Standard headers
20 GET parameters
21   ``auth_token``
22     Same as ``X-OUYA-AuthToken``
23
24
25 HTTP response
26 =============
27 Status code
28   ``200 OK``
29 Content-type
30   ``application/json; charset=utf-8``
31
32 Response body definition
33 ------------------------
34 JSON object with two properties: ``rows`` and ``tiles``.
35 ``rows`` contains the layout of the "discover" store main view, while
36 ``tiles`` contains the list of games/apps available in the store with
37 details.
38
39
40 ``rows``
41 --------
42 Object with several properties:
43
44 ``showPrice``
45   ``true`` or ``false``
46 ``ranked``
47   ``true`` or ``false``
48
49   If the games are sorted by the internal ranking factor, or in order
50   of appearance in ``tiles``.
51 ``tiles``
52   array
53
54   List of integer game IDs (``[0, 1, 2]``)
55 ``title``
56   string
57
58   Title of the category
59
60
61 ``tiles``
62 ---------
63 Describes a single application.
64 The position in the ``tiles`` array is the ID used by ``rows/tiles``.
65
66 ``contentRating``
67   For which audiences the game is meant
68
69   Seen values:
70
71   - ``Everyone``
72   - ``9+``
73   - ``12+``
74   - ``17+``
75 ``gamerNumbers``
76   array
77
78   List of integers describing how many players can play the game
79 ``genres``
80   array
81
82   Array of strings with genre titles.
83
84   ``["Fight!", "Multiplayer", "Platformer"]``
85 ``image``
86   URL to an image displayed in store view.
87
88   Size should be 732x412.
89
90   ``png`` works.
91   FIXME: test ``jpg``
92 ``inAppPurchases``
93   ``true`` or ``false``
94
95   If you can/have to pay within the game
96 ``latestVersion``
97   object
98
99   ``apk``
100     ``md5sum``
101       MD5 hash of the apk file. Used for verification after download.
102   ``versionNumber``
103     string with current version, e.g. ``1.11``
104   ``uuid``
105     ???
106 ``package``
107   string
108
109   java package name prefix, e.g. ``evil.corptron.DuckGame``
110 ``premium``
111   ``true`` or ``false``
112
113   FIXME: What is that for?
114 ``promotedProduct``
115   object
116
117   ??? FIXME: What is that for?
118
119   ``currency``
120     string
121
122     ``EUR``
123   ``description``
124     string
125   ``developerName``
126     string
127
128     Name of the developer or company who made the game
129   ``identifier``
130     string
131
132     ???
133   ``localPrice``
134     float
135
136     Current price
137   ``name``
138     string
139
140     Title of the game
141   ``originalPrice``
142     float
143
144     Price it did once cost
145   ``percentOff``
146     integer
147
148     Percent difference between ``originalPrice`` and ``localPrice``
149   ``type``
150     string
151
152     ``entitlement`` is the only type seen within ``promotedProduct``.
153 ``rating``
154   Object with two properties: ``count`` and ``average``.
155
156   ``count``
157     integer
158
159     Number of votes for this game
160   ``average``
161     float
162
163     Average rating (1-5)
164 ``title``
165   Name of the app/game
166 ``type``
167   ``app`` or ``discover`` or ``details_page``
168 ``updated_at``
169   integer
170
171   Unix timestamp of last update date
172 ``updatedAt``
173   string
174
175   ISO 8601-date, e.g. ``2014-12-04T22:16:30Z``
176 ``url``
177   string
178
179   ``ouya://launcher/details?app=evil.corptron.DuckGame``
180
181   URL for the game details page
182
183
184
185 Example
186 -------
187
188 .. include:: api-v1-discover.response.json
189    :code: