Improve partner_builds headers, add partner_builds release notes
[ouya-store-api.git] / api / devs.ouya.tv / api-v1-partner_builds.rst
1 ==================================================
2 ``GET https://devs.ouya.tv/api/v1/partner_builds``
3 ==================================================
4
5 Fetch commands for the "OUYA Everywhere" installer.
6
7 The OUYA Everywhere installer ``tv.ouya.oe.installer`` fetches this URL
8 from the server, installs package updates (framework, console UI)
9 and then starts the actual console UI.
10
11 Used on the Mad Catz Mojo and Razer Forge TV.
12
13
14 HTTP request
15 ============
16 Protocol
17   ``https``
18 Method
19   ``GET``
20 Host
21   ``devs.ouya.tv``
22 Path
23   ``/api/v1/partner_builds``
24 Headers
25   The Razer Forge TV seems to prefix all custom headers with ``X-OUYA-``
26   while the Mojo version only uses ``X-``.
27
28   ``User-Agent``
29     Known values:
30
31     - ``ouya-everywhere-installer (MadCatz/mojo-TS/mojo:4.2.2/JDQ39/MO0205-TS:user/release-keys)``
32     - ``ouya-everywhere-installer (razer/pearlyn/pearlyn:6.0.1/M-MMB29M-rzs-us-sf-bld2-19HP-08.02.AM/144:user/release-keys)``
33   ``Accept-Language``
34     - ``de``
35     - ``en-US,en``
36   ``X-InstallerVersionCode``
37     Razer Forge TV: ``8``
38   ``X-InstallerVersionName``
39     Razer Forge TV: ``1.08``
40   ``X-InstallerPackageName``
41     ``tv.ouya.oe.installer``
42   ``X-OUYA-Console-Id``
43     Build serial number
44
45     Razer Forge TV: ``171256710321511``
46   ``X-Device``
47     ??
48   ``X-OUYA-Device``
49     Razer Forge TV: ``pearlyn``
50   ``X-Product``
51     ??
52   ``X-OUYA-Product``
53     Razer Forge TV: ``pearlyn``
54   ``X-Model``
55     ??
56   ``X-OUYA-Model``
57     Razer Forge TV: ``Forge``
58   ``X-Brand``
59     ??
60   ``X-OUYA-Brand``
61     Razer Forge TV:``razer``
62   ``X-Display``
63     ??
64   ``X-OUYA-Display``
65     Razer Forge TV: ``M-MMB29M-rzs-us-sf-bld2-19HP-08.02.AM.144``
66   ``X-BuildId``
67     ??
68   ``X-OUYA-BuildId``
69     Razer Forge TV: ``M-MMB29M-rzs-us-sf-bld2-19HP-08.02.AM``
70   ``X-Manufacturer``
71     ??
72   ``X-OUYA-Manufacturer``
73     Razer Forge TV: ``razer``
74   ``OUYAUsername``
75     When logged in.
76   ``X-OUYA-AuthToken``
77     Only when logged in already
78
79     ``00702342-0000-1111-2222-c3e1500cafe1``
80
81
82 HTTP response
83 =============
84 Status code
85   ``200 OK``
86 Content-type
87   ``application/json; charset=utf-8``
88
89
90 Response body definition
91 ------------------------
92 The response is a list of commands that the OUYA Everywhere installer
93 will execute one after another.
94
95 The top-level object contains a key ``actions``, which is an array of
96 action objects.
97 Each action has a ``action`` property that defines its type.
98
99
100 exit action
101 -----------
102 Just stop the installer.
103
104 No additional properties.
105
106 .. include:: api-v1-partner_builds.exit.json
107    :code:
108
109
110 installFile action
111 ------------------
112 Install the given .apk file if it has not yet been installed.
113
114 ``action``
115   ``installFile``
116 ``packageName``
117   Name of package to install. Example: ``de.ouya.cweiske.foo``
118 ``friendlyName``
119   Name shown on screen during installation
120 ``md5``
121   Example: ``d3b07384d113edec49eaa6238ad5ff00``
122 ``filesize``
123   ``12345``
124 ``downloadUrl``
125   ``http://example.org/app.apk``
126 ``versionCode``
127   Optional property. Example: ``23``.
128
129   Only install when the current version is lower than this number.
130
131
132 launch action
133 -------------
134 Start the given application
135
136 ``action``
137   ``launch``
138 ``packageName``
139   Application to start. Example: ``de.ouya.cweiske.foo``
140
141
142 showDialog action
143 -----------------
144 Show a message that the user has to confirm.
145
146 ``action``
147   ``showDialog``
148 ``title``
149   Message dialog title string
150 ``message``
151   Actual text
152 ``verticalMargin``
153   Optional. Example: ``1.0``
154
155
156 uninstallFile action
157 --------------------
158 Remove a package
159
160 ``action``
161   ``uninstallFile``
162 ``packageName``
163   Example: ``de.ouya.cweiske.foo``
164 ``keepData``
165   Optional boolean. Example: ``false``
166 ``ifLessThanVersionCode``
167   Optional integer. Example: ``12``
168 ``ifGreaterThanVersionCode``
169   Optional integer. Example: ``42``
170
171
172 Example
173 -------
174
175 .. include:: api-v1-partner_builds.response.json
176    :code: