Add razer forge header
[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 HTTP redirects (e.g. 302) are supported.
33
34 Response body definition
35 ------------------------
36 JSON object with two properties: ``rows`` and ``tiles``.
37 ``rows`` contains the layout of the "discover" store main view, while
38 ``tiles`` contains the list of games/apps available in the store with
39 details.
40
41
42 ``rows``
43 --------
44 Array with objects that have with several properties:
45
46 ``showPrice``
47   ``true`` or ``false``
48 ``ranked``
49   ``true`` or ``false``
50
51   If the games are sorted by the internal ranking factor, or in order
52   of appearance in ``tiles``.
53 ``tiles``
54   array
55
56   List of integer game IDs (``[0, 1, 2]``)
57 ``title``
58   string
59
60   Title of the category
61
62
63 ``tiles``
64 ---------
65 Array of objects that each describe a single application.
66
67 The position in the ``tiles`` array is the ID used by ``rows/tiles``.
68
69 ``bundle``
70   Only there when it's not a single game but a bundle of games that can be
71   bought.
72
73   Object with the following properties:
74
75   ``apps``
76     array
77
78     Array of ``package`` strings
79   ``currency``
80     ``EUR``
81   ``price``
82     float
83   ``contentRating``
84     See ``contentRating`` description below.
85   ``purchaseUrl``
86     string
87
88     URL where to initiate buying the bundle
89
90     ``ouya://launcher/purchase?developer=ec1a9ccd-373f-4047-bd07-36466ab7e25d&product=ROBOBUNDLE``
91 ``contentRating``
92   For which audiences the game is meant
93
94   Seen values:
95
96   - ``Everyone``
97   - ``9+``
98   - ``12+``
99   - ``17+``
100 ``gamerNumbers``
101   array
102
103   List of integers describing how many players can play the game
104 ``genres``
105   array
106
107   Array of strings with genre titles.
108
109   ``["Fight!", "Multiplayer", "Platformer"]``
110
111   Known genres:
112
113   - Adventure
114   - App
115   - Arcade/Pinball
116   - Card/Casino
117   - Dual Stick
118   - Entertainment
119   - Fight!
120   - FPS/Shooter
121   - Kids List
122   - Meditative
123   - Multiplayer
124   - Music
125   - Platformer
126   - Puzzle/Trivia
127   - Racing
128   - Retro
129   - Role-Playing
130   - Short on Time?
131   - Sim/Strategy
132   - Sports
133   - Utility
134   - Video
135 ``image``
136   URL to an image displayed in store view.
137
138   Size should be 732x412.
139
140   ``.jpg`` and ``.png`` files work.
141 ``inAppPurchases``
142   ``true`` or ``false``
143
144   If you can/have to pay within the game
145 ``latestVersion``
146   object
147
148   ``apk``
149     ``md5sum``
150       MD5 hash of the apk file. Used for verification after download.
151   ``versionNumber``
152     string with current version, e.g. ``1.11``
153   ``uuid``
154     UUID of the release.
155 ``package``
156   string
157
158   java package name prefix, e.g. ``evil.corptron.DuckGame``
159 ``premium``
160   ``true`` or ``false``
161
162   When ``true``, the game has no demo version and has to be bought before
163   it can be downloaded.
164 ``promotedProduct``
165   object
166
167   Bundles do not have this property set.
168
169   The "buy" button buys this product.
170
171   ``currency``
172     string
173
174     ``EUR``
175   ``description``
176     string
177   ``developerName``
178     string
179
180     Name of the developer or company who made the game
181   ``identifier``
182     string
183
184     ???
185   ``localPrice``
186     float
187
188     Current price
189   ``name``
190     string
191
192     Title of the game
193   ``originalPrice``
194     float
195
196     Price it did once cost
197   ``percentOff``
198     integer
199
200     Percent difference between ``originalPrice`` and ``localPrice``
201   ``type``
202     string
203
204     ``entitlement`` is the only type seen within ``promotedProduct``.
205 ``rating``
206   Object with two properties: ``count`` and ``average``.
207
208   ``count``
209     integer
210
211     Number of votes for this game
212   ``average``
213     float
214
215     Average rating (1-5)
216 ``title``
217   Name of the app/game
218 ``type``
219   ``app`` or ``discover`` or ``details_page``
220
221   Bundles always have ``details_page``.
222 ``updated_at``
223   integer
224
225   Unix timestamp of last update date
226 ``updatedAt``
227   string
228
229   ISO 8601-date, e.g. ``2014-12-04T22:16:30Z``
230 ``url``
231   string
232
233   URL for the game details page
234
235   Game details
236     ``ouya://launcher/details?app=evil.corptron.DuckGame``
237   Bundle details
238     ``ouya://launcher/details?page=be239ca4-10fd-42dd-89cd-1806e80b1362``
239
240     See `GET https://devs.ouya.tv/api/v1/details`_.
241
242 ``title``
243 ---------
244 string
245
246 Always ``DISCOVER``.
247
248
249 Example
250 -------
251
252 .. include:: api-v1-discover.response.json
253    :code:
254
255 The API git repository contains a full copy of the "discover" response
256 at ``api/devs.ouya.tv/api-v1-discover.response-full.json``.