Image size information
[ouya-game-data.git] / ouya-game.schema.json
1 {
2     "$schema": "http://json-schema.org/draft-07/schema#",
3     "$id": "http://cweiske.de/ouya-game.schema.json",
4     "title": "OUYA game metadata",
5     "description": "Game data importable in OUYA API servers.",
6     "type": "object",
7
8     "required": [
9         "packageName",
10         "title",
11         "releases",
12         "media",
13         "developer"
14     ],
15     "additionalProperties": false,
16     "properties": {
17         "packageName": {
18             "description": "Java package names",
19             "type": "string",
20             "examples": [
21                 "com.vendor.gamename"
22             ]
23         },
24
25         "title": {
26             "description": "Game name",
27             "type": "string"
28         },
29
30         "description": {
31             "description": "Text describing the game. Newlines (CRLF) allowed",
32             "type": "string"
33         },
34
35         "players": {
36             "description": "How many players can play this game at the same time?",
37             "type": "array",
38             "items": {
39                 "type": "number",
40                 "minimum": 1
41             }
42         },
43
44         "genres": {
45             "description": "Categories",
46             "type": "array",
47             "items": {
48                 "type": "string",
49                 "uniqueItems": true,
50                 "enum": [
51                     "Adventure",
52                     "App",
53                     "Arcade/Pinball",
54                     "Card/Casino",
55                     "Dual Stick",
56                     "Entertainment",
57                     "Fight!",
58                     "FPS/Shooter",
59                     "Kids List",
60                     "Meditative",
61                     "Multiplayer",
62                     "Music",
63                     "Platformer",
64                     "Puzzle/Trivia",
65                     "Racing",
66                     "Retro",
67                     "Role-Playing",
68                     "Short on Time?",
69                     "Sim/Strategy",
70                     "Sports",
71                     "Utility",
72                     "Video",
73
74                     "Open Source"
75                 ]
76             }
77         },
78
79         "releases": {
80             "type": "array",
81             "items": {
82                 "type": "object",
83                 "required": [
84                     "name",
85                     "versionCode",
86                     "uuid",
87                     "date",
88                     "url",
89                     "size",
90                     "md5sum"
91                 ],
92                 "additionalProperties": false,
93                 "properties": {
94
95                     "name": {
96                         "description": "Human readable version number",
97                         "type": "string",
98                         "examples": [
99                             "1.6"
100                         ]
101                     },
102
103                     "versionCode": {
104                         "description": "APK-internal version code. Run \"aapt dump badging file.apk\", field \"versionCode\"",
105                         "type": ["string", "null"]
106                     },
107
108                     "uuid": {
109                         "description": "Unique ID for the release. Use uuid-gen to get one",
110                         "type": "string"
111                     },
112
113                     "date": {
114                         "description": "When the version has been released",
115                         "type": "string",
116                         "format": "date|datetime"
117                     },
118
119                     "latest": {
120                         "description": "Marker for the latest release",
121                         "type": "boolean"
122                     },
123
124                     "url": {
125                         "description": ".apk download link",
126                         "type": "string",
127                         "format": "url"
128                     },
129
130                     "size": {
131                         "description": "File size in bytes",
132                         "type": "number",
133                         "minimum": 1
134                     },
135
136                     "md5sum": {
137                         "description": "MD5 hash of the .apk file contents",
138                         "type": "string"
139                     },
140
141                     "publicSize": {
142                         "description": "FIXME",
143                         "type": "number"
144                     },
145
146                     "nativeSize": {
147                         "description": "FIXME",
148                         "type": "number"
149                     }
150                 }
151             }
152         },
153
154         "media": {
155             "type": "object",
156             "required": [
157                 "discover",
158                 "large"
159             ],
160             "additionalProperties": false,
161             "properties": {
162                 "discover": {
163                     "description": "Image for the OUYA discover store. FIXME: Size",
164                     "type": "string",
165                     "format": "url"
166                 },
167
168                 "large": {
169                     "description": "Large game cover image for the store details page.",
170                     "type": "string",
171                     "format": "url"
172                 },
173
174                 "video": {
175                     "description": "Video for the store details page. Vimeo and Youtube URLs supported",
176                     "type": "string",
177                     "format": "url"
178                 },
179
180                 "screenshots": {
181                     "description": "Additional images for the store details page.",
182                     "type": "array",
183                     "items": {
184                         "type": "string",
185                         "format": "url"
186                     }
187                 },
188
189                 "details": {
190                     "description": "Images and videos for the details page. Can be in any order. If no detail images and videos are given, the large image, video and screenshots are used instead",
191                     "type": "array",
192                     "items": {
193                         "type": "object",
194                         "required": [
195                             "type",
196                             "url"
197                         ],
198                         "additionalProperties": false,
199                         "properties": {
200                             "type": {
201                                 "description": "Medium type: image or video",
202                                 "type": "string",
203                                 "enum": ["image", "video"]
204                             },
205
206                             "url": {
207                                 "description": "Image URL or video URL. Vimeo and Youtube URLs supported",
208                                 "type": "string",
209                                 "format": "url"
210                             },
211
212                             "thumb": {
213                                 "description": "Small preview image. Size should be 852x479.",
214                                 "type": "string",
215                                 "format": "url"
216                             }
217                         }
218                     }
219                 }
220             }
221         },
222
223         "developer": {
224             "type": "object",
225             "required": [
226                 "name"
227             ],
228             "additionalProperties": false,
229             "properties": {
230
231                 "uuid": {
232                     "description": "Unique ID for the developer",
233                     "type": "string"
234                 },
235
236                 "name": {
237                     "description": "Developer (company or person) name",
238                     "type": "string"
239                 },
240
241                 "supportEmail": {
242                     "description": "E-Mail address for support questions",
243                     "type": "string",
244                     "format": "email",
245                     "default": null
246                 },
247
248                 "supportPhone": {
249                     "description": "Telephone number",
250                     "type": "string",
251                     "default": null
252                 },
253
254                 "founder": {
255                     "description": "If the developer was an OUYA founder",
256                     "type": "boolean",
257                     "default": false
258                 }
259             }
260         },
261
262         "contentRating": {
263             "description": "Which audience is this game for?",
264             "type": "string",
265             "enum": [
266                 "Everyone",
267                 "9+",
268                 "12+",
269                 "17+"
270             ]
271         },
272
273         "website": {
274             "description": "Game website",
275             "type": "string",
276             "format": "url"
277         },
278
279         "firstPublishedAt": {
280             "description": "When the game has first been published to the world",
281             "type": "string",
282             "format": "date|date-time"
283         },
284
285         "inAppPurchases": {
286             "description": "If you can buy things in the game",
287             "type": "boolean"
288         },
289
290         "overview": {
291             "description": "FIXME",
292             "type": "string"
293         },
294
295         "premium": {
296             "description": "FIXME",
297             "type": "boolean"
298         },
299
300         "rating": {
301             "type": "object",
302             "additionalProperties": false,
303             "properties": {
304
305                 "likeCount": {
306                     "description": "Number of likes this game has",
307                     "type": "number",
308                     "minimum": 0
309                 },
310
311                 "average": {
312                     "description": "Average rating for this game",
313                     "type": "number",
314                     "minimum": 0,
315                     "maximum": 5
316                 },
317
318                 "count": {
319                     "description": "Number of ratings",
320                     "type": "number",
321                     "minimum": 0
322                 }
323             }
324         },
325
326         "products": {
327             "description": "Items that could be bought via the discover store",
328             "type": "array",
329             "items": {
330                 "type": "object",
331                 "required": [
332                     "identifier",
333                     "name",
334                     "description",
335                     "localPrice",
336                     "originalPrice",
337                     "currency"
338                 ],
339                 "additionalProperties": false,
340                 "properties": {
341
342                     "promoted": {
343                         "description": "If this product is the currently promoted/visible one",
344                         "type": "boolean"
345                     },
346
347                     "identifier": {
348                         "description": "Internal key",
349                         "type": "string",
350                         "examples": [
351                             "full_version"
352                         ]
353                     },
354
355                     "name": {
356                         "description": "Human readable name",
357                         "type": "string",
358                         "examples": [
359                             "Unlock full game"
360                         ]
361                     },
362
363                     "description": {
364                         "description": "Explanation of the features you will buy",
365                         "type": "string"
366                     },
367
368                     "localPrice": {
369                         "description": "Current price (maybe discounted)",
370                         "type": "number"
371                     },
372
373                     "originalPrice": {
374                         "description": "Previous price",
375                         "type": "number"
376                     },
377
378                     "currency": {
379                         "description": "Three-letter currency code, depending on the player that was logged in",
380                         "type": "string",
381                         "enum": ["EUR", "USD"]
382                     }
383                 }
384             }
385         }
386     }
387 }