-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
398 lines (305 loc) · 21.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
---
layout: default
---
<div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'><h1 id="global-information">Global information</h1>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h2 id="introduction">Introduction</h2>
<p>The current API version is the <strong>v1</strong>. All the endpoints are prefixed by <code class="highlighter-rouge">/v1</code>.
It’s only available through HTTPS: it’s TLS, or nothing.</p>
<p>The API has been tagged <strong>v1</strong>. However it is not a frozen API. We may and we
will update endpoints and create new ones. But you can be sure we won’t break
the existing. If any major change about the way JSON is structured, we will
keep the right to release a <strong>v2</strong> and so forth.</p>
<p>In any case, we will communicate through our <a href="http://blog.scalingo.com">blog</a>,
<a href="http://changelog.scalingo.com">changelog</a> and <a href="https://twitter.com/ScalingoHQ">twitter</a>
when any change occurs on the API.</p>
</div><div class='col-xs-12 col-sm-6 sidebar-code'>
<p>Base URL:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>https://api.scalingo.com/v1/
</code></pre>
</div>
</div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h2 id="http-verbs">HTTP Verbs</h2>
<p>The API is not perfectly RESTful, it is more REST-ish. It has been developed to
be easy to use and instinctive, we’ll probably normalize it, in a second version.</p>
<ul>
<li>HEAD Can be issued against any resource to get just the HTTP header info.</li>
<li>GET Get resources, nullipotent operation (no matter how many times you call it, there is no side effect).</li>
<li>POST Used for creating resources. (creation of a new app, or to create an environment variable)</li>
<li>PATCH Update part of resources, as the value of an environment variable.</li>
<li>PUT Update complete resources.</li>
<li>DELETE Used for deleting items.</li>
</ul>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h2 id="parameters">Parameters</h2>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h3 id="get-and-delete-endpoints">GET and DELETE endpoints</h3>
<p>Parameters for GET and DELETE requests are known as <em>query parameters</em>, they are declared in the resource URL.</p>
</div><div class='col-xs-12 col-sm-6 sidebar-code'>
<p>Example request:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>curl -X GET https://api.scalingo.com/v1/apps/name/events?page<span class="o">=</span>2
</code></pre>
</div>
</div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h3 id="postputpatch">POST/PUT/PATCH</h3>
<p>For these types of request, parameters are not included as query parameters,
they should be encoded as JSON with the following header: `Content-Type:
‘application/json’.</p>
</div><div class='col-xs-12 col-sm-6 sidebar-code'>
<p>Example request:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>curl -H <span class="s1">'Accept: application/json'</span> -H <span class="s1">'Content-Type: application/json'</span> -u <span class="s2">":</span><span class="nv">$AUTH_TOKEN</span><span class="s2">"</span> <span class="se">\</span>
-X POST https://api.scalingo.com/v1/apps -d <span class="se">\</span>
<span class="s1">'{
"app": {
"name": "example-app"
}
}'</span>
</code></pre>
</div>
</div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h1 id="authentication">Authentication</h1>
<p>The authentication to the API is done thanks to an authentication token and
Basic HTTP Auth. The API is HTTPS only, so credentials are always sent encrypted.</p>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h2 id="get-your-api-token-from-our-dashboard">Get your API token from our dashboard</h2>
<p>You can obtain your API token from your profile from the dashboard:</p>
<p><a href="https://my.scalingo.com/apps/profile">Get your API Token</a></p>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h2 id="get-your-api-token-from-the-api">Get your API token from the API</h2>
<p>Otherwise your can get your API token from the API directly:</p>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<p><code class="highlighter-rouge">POST https://api.scalingo.com/v1/users/sign_in</code></p>
<p>Parameters:</p>
<ul>
<li><code class="highlighter-rouge">user.login</code>: Email of your account</li>
<li><code class="highlighter-rouge">user.password</code>: Password or your account</li>
</ul>
</div><div class='col-xs-12 col-sm-6 sidebar-code'>
<p>Example request:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>curl -H <span class="s2">"Accept: application/json"</span> -H <span class="s2">"Content-Type: application/json"</span> <span class="se">\</span>
-X POST https://api.scalingo.com/v1/users/sign_in -d <span class="se">\</span>
<span class="s1">'{
"user": {
"login": "[email protected]",
"password": "example-secret"
}
}'</span>
</code></pre>
</div>
<p>Returns 201 Created</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="s2">"authentication_token"</span><span class="p">:</span><span class="s2">"abcdef0123456789-"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h2 id="make-an-authenticated-request">Make an authenticated request</h2>
<p>HTTP requests have to be authenticated with HTTP basic auth, with the
authentication token as password, the username can be empty.</p>
</div><div class='col-xs-12 col-sm-6 sidebar-code'>
<p>Example request:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>curl -H <span class="s2">"Accept: application/json"</span> -H <span class="s2">"Content-Type: application/json"</span> -u <span class="s2">":</span><span class="nv">$AUTH_TOKEN</span><span class="s2">"</span> <span class="se">\</span>
-X GET https://api.scalingo.com/v1/apps
</code></pre>
</div>
</div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h1 id="data-format">Data format</h1>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h2 id="json">JSON</h2>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<p>The API sends and receives JSON, XML is not accepted, please ensure JSON is used. All the
returned object are <code class="highlighter-rouge">object</code>, there is never an <code class="highlighter-rouge">array</code> as root element.</p>
<p>Resources are rooted, it means that they have a parent key corresponding to its name. This
key may be plural if a collection of items is returned.</p>
</div><div class='col-xs-12 col-sm-6 sidebar-code'>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span>
<span class="s2">"app"</span><span class="err">:</span> <span class="p">{</span>
<span class="c1">// application</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span>
<span class="s2">"apps"</span><span class="err">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="c1">// application</span>
<span class="p">},</span> <span class="p">{</span>
<span class="c1">// application</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">}</span>
</code></pre>
</div>
</div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h2 id="dates">Dates</h2>
<p>All the dates are sent with the ISO 8601: YYYY-MM-DDThh:mm:ss.μμμZ</p>
<p>Example:</p>
<p><strong>2015-01-13T09:20:31.123+01:00</strong></p>
<p>This format is commonly understood, here are some examples:</p>
</div><div class='col-xs-12 col-sm-6 sidebar-code'>
<p>Javascript:</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="kd">var</span> <span class="nx">date</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">Date</span><span class="p">(</span><span class="s2">"2015-01-13T09:20:31.123+01:00"</span><span class="p">)</span>
<span class="nx">Tue</span> <span class="nx">Jan</span> <span class="mi">13</span> <span class="mi">2015</span> <span class="mi">09</span><span class="err">:</span><span class="mi">20</span><span class="err">:</span><span class="mi">31</span> <span class="nx">GMT</span><span class="o">+</span><span class="mi">0100</span> <span class="p">(</span><span class="nx">CET</span><span class="p">)</span>
</code></pre>
</div>
<p>Ruby:</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="nb">require</span> <span class="s1">'date'</span>
<span class="no">DateTime</span><span class="p">.</span><span class="nf">iso8601</span><span class="p">(</span><span class="s2">"2015-01-13T09:20:31.123+01:00"</span><span class="p">)</span>
<span class="o">=></span> <span class="c1">#<DateTime: 2015-01-13T09:20:31+01:00 ((2457036j,30031s,123000000n),+3600s,2299161j)></span>
</code></pre>
</div>
<p>Go:</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="c">/*
* go run iso8601.go
* 2015-01-13 09:20:31.123 +0100 CET
*/</span><span class="x">
</span><span class="n">date</span><span class="p">,</span><span class="x"> </span><span class="n">_</span><span class="x"> </span><span class="o">:=</span><span class="x"> </span><span class="n">time</span><span class="o">.</span><span class="n">Parse</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">RFC3339Nano</span><span class="p">,</span><span class="x"> </span><span class="s">"2015-01-13T09:20:31.123+01:00"</span><span class="p">)</span><span class="x">
</span><span class="n">fmt</span><span class="o">.</span><span class="n">Println</span><span class="p">(</span><span class="n">date</span><span class="p">)</span><span class="x">
</span></code></pre>
</div>
</div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h1 id="errors">Errors</h1>
<h2 id="client-errors---status-codes-4xx">Client errors - Status codes: 4xx</h2>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h3 id="invalid-json---400-bad-request">Invalid JSON - 400 Bad Request</h3>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<p>The JSON you’ve sent in the payload is is wrongly formatted.</p>
</div><div class='col-xs-12 col-sm-6 sidebar-code'>
<div class="highlighter-rouge"><pre class="highlight"><code>curl -H <span class="s1">'Content-Type: application/json'</span> -H <span class="s1">'Accept: application/json'</span> -u <span class="s2">":</span><span class="nv">$AUTH_TOKEN</span><span class="s2">"</span> <span class="se">\ </span>
-X POST https://api.scalingo.com/v1/users/sign_in -d <span class="s1">'{"user": {'</span>
</code></pre>
</div>
<p>Returns HTTP/1.1 400 Bad Request</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="s2">"error"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="s2">"There was a problem in the JSON you submitted: 795: unexpected token at '{\"user\": {'"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h3 id="exceeding-free-tier---402-payment-required">Exceeding free tier - 402 Payment Required</h3>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<p>If you try to do an action unallowed in the free tier, you will get an error 402 Payment Required.</p>
</div><div class='col-xs-12 col-sm-6 sidebar-code'>
<div class="highlighter-rouge"><pre class="highlight"><code>curl -H <span class="s1">'Content-Type: application/json'</span> -H <span class="s1">'Accept: application/json'</span> -u <span class="s2">":</span><span class="nv">$AUTH_TOKEN</span><span class="s2">"</span> <span class="se">\</span>
-X POST https://api.scalingo.com/v1/apps -d <span class="se">\</span>
<span class="s1">'{
"app" : {
"name" : "my-new-app"
}
}'</span>
</code></pre>
</div>
<p>Returns 402 Payment Required if user is not allowed to create a new app.</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="s2">"error"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Sorry, you need to verify your account (billing profile and payment card) to create a new app"</span><span class="p">,</span><span class="w">
</span><span class="s2">"url"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://my.scalingo.com/apps/billing"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h3 id="invalid-field---422-unprocessable-entity">Invalid field - 422 Unprocessable Entity</h3>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<p>There is an invalid field in the JSON payload.</p>
</div><div class='col-xs-12 col-sm-6 sidebar-code'>
<div class="highlighter-rouge"><pre class="highlight"><code>curl -H <span class="s1">'Content-Type: application/json'</span> -H <span class="s1">'Accept: application/json'</span> -u <span class="s2">":</span><span class="nv">$AUTH_TOKEN</span><span class="s2">"</span> <span class="se">\</span>
-X POST https://api.scalingo.com/v1/apps -d <span class="s1">'{}'</span>
</code></pre>
</div>
<p>Returns HTTP/1.1 422 Unprocessable Entity</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="s2">"errors"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"app"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="s2">"missing field"</span><span class="w"> </span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h3 id="invalid-data---422-unprocessable-entity">Invalid data - 422 Unprocessable Entity</h3>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<p>Invalid data were sent in the payload.</p>
</div><div class='col-xs-12 col-sm-6 sidebar-code'>
<div class="highlighter-rouge"><pre class="highlight"><code>curl -H <span class="s1">'Content-Type: application/json'</span> -H <span class="s1">'Accept: application/json'</span> -u <span class="s2">":</span><span class="nv">$AUTH_TOKEN</span><span class="s2">"</span> <span class="se">\ </span>
-X POST https://api.scalingo.com/v1/apps -d <span class="se">\</span>
<span class="s1">'{
"app" : {
"name" : "AnotherApp"
}
}'</span>
</code></pre>
</div>
<p>Returns HTTP/1.1 422 Unprocessable Entity</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="s2">"errors"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"name"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="s2">"should contain only lowercap letters, digits and hyphens"</span><span class="w"> </span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h3 id="server-errors---50x">Server errors - 50x</h3>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<p>If the server returns a 50x status code, something wrong happened on our side.
You can’t do anything about it, you can be sure that our team got notifications
for it and that it will be fixed really quickly.</p>
</div><div class='col-xs-12 col-sm-6 sidebar-code'>
<p>Example of error 500:</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="s2">"error"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Internal error occured, we're on it!"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h1 id="pagination">Pagination</h1>
<p>Some resources provided by the platform API are paginated. To
ensure you can correctly handle it, metadata are added to the JSON of the
response.</p>
</div><div class='hidden-xs col-xs-12 col-sm-6 sidebar-code'></div></div><div class='row'><div class='col-xs-12 col-sm-6 sidebar-text'>
<h2 id="request-parameters">Request parameters</h2>
<ul>
<li><code class="highlighter-rouge">page</code>: Requested page number</li>
<li><code class="highlighter-rouge">per_page</code>: Number of entries per page.
Each resource has a maximum for this value to avoid oversized requests</li>
</ul>
<h2 id="response-meta-values">Response meta values</h2>
<p>The returned JSON object will include a <code class="highlighter-rouge">meta</code> key including pagination
metadata:</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="s2">"meta"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"pagination"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"prev_page"</span><span class="p">:</span><span class="w"> </span><span class="s2">"<previous page number>"</span><span class="p">,</span><span class="w">
</span><span class="s2">"current_page"</span><span class="p">:</span><span class="w"> </span><span class="s2">"<requested page number>"</span><span class="p">,</span><span class="w">
</span><span class="s2">"next_page"</span><span class="p">:</span><span class="w"> </span><span class="s2">"<next page number>"</span><span class="p">,</span><span class="w">
</span><span class="s2">"total_pages"</span><span class="p">:</span><span class="w"> </span><span class="s2">"<total amount of pages>"</span><span class="p">,</span><span class="w">
</span><span class="s2">"total_count"</span><span class="p">:</span><span class="w"> </span><span class="s2">"<total amount of items in the collection>"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
<blockquote>
<p><code class="highlighter-rouge">prev_page</code> and/or <code class="highlighter-rouge">next_page</code> are equal to <code class="highlighter-rouge">null</code> if there is no previous
or next page.</p>
</blockquote>
</div><div class='col-xs-12 col-sm-6 sidebar-code'>
<p>Example request</p>
<div class="highlighter-rouge"><pre class="highlight"><code>curl -H <span class="s2">"Accept: application/json"</span> -H <span class="s2">"Content-Type: application/json"</span> -u :<span class="nv">$AUTH_TOKEN</span> <span class="se">\</span>
-X GET <span class="s1">'https://api.scalingo.com/v1/apps/example-app/events?page=4&per_page=20'</span>
</code></pre>
</div>
<p>Returns 200 OK</p>
<p>This request returns the events 40 to 60.</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
</span><span class="s2">"events"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="w"> </span><span class="err">...</span><span class="w"> </span><span class="err">}</span><span class="w">
</span><span class="p">],</span><span class="w">
</span><span class="s2">"meta"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"current_page"</span><span class="p">:</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span><span class="w">
</span><span class="s2">"prev_page"</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w">
</span><span class="s2">"next_page"</span><span class="p">:</span><span class="w"> </span><span class="mi">5</span><span class="p">,</span><span class="w">
</span><span class="s2">"total_pages"</span><span class="p">:</span><span class="w"> </span><span class="mi">12</span><span class="p">,</span><span class="w">
</span><span class="s2">"total_count"</span><span class="p">:</span><span class="w"> </span><span class="mi">240</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div></div>