-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
537 lines (424 loc) · 19.1 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
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
<!doctype html>
<html>
<head>
<title>Sentiment API</title>
<style type="text/css">
body {
font-family: Trebuchet MS, sans-serif;
font-size: 15px;
color: #444;
margin-right: 24px;
}
h1 {
font-size: 25px;
}
h2 {
font-size: 20px;
}
h3 {
font-size: 16px;
font-weight: bold;
}
hr {
height: 1px;
border: 0;
color: #ddd;
background-color: #ddd;
}
.app-desc {
clear: both;
margin-left: 20px;
}
.param-name {
width: 100%;
}
.license-info {
margin-left: 20px;
}
.license-url {
margin-left: 20px;
}
.model {
margin: 0 0 0px 20px;
}
.method {
margin-left: 20px;
}
.method-notes {
margin: 10px 0 20px 0;
font-size: 90%;
color: #555;
}
pre {
padding: 10px;
margin-bottom: 2px;
}
.http-method {
text-transform: uppercase;
}
pre.get {
background-color: #0f6ab4;
}
pre.post {
background-color: #10a54a;
}
pre.put {
background-color: #c5862b;
}
pre.delete {
background-color: #a41e22;
}
.huge {
color: #fff;
}
pre.example {
background-color: #f3f3f3;
padding: 10px;
border: 1px solid #ddd;
}
code {
white-space: pre;
}
.nickname {
font-weight: bold;
}
.method-path {
font-size: 1.5em;
background-color: #0f6ab4;
}
.up {
float:right;
}
.parameter {
width: 500px;
}
.param {
width: 500px;
padding: 10px 0 0 20px;
font-weight: bold;
}
.param-desc {
width: 700px;
padding: 0 0 0 20px;
color: #777;
}
.param-type {
font-style: italic;
}
.param-enum-header {
width: 700px;
padding: 0 0 0 60px;
color: #777;
font-weight: bold;
}
.param-enum {
width: 700px;
padding: 0 0 0 80px;
color: #777;
font-style: italic;
}
.field-label {
padding: 0;
margin: 0;
clear: both;
}
.field-items {
padding: 0 0 15px 0;
margin-bottom: 15px;
}
.return-type {
clear: both;
padding-bottom: 10px;
}
.param-header {
font-weight: bold;
}
.method-tags {
text-align: right;
}
.method-tag {
background: none repeat scroll 0% 0% #24A600;
border-radius: 3px;
padding: 2px 10px;
margin: 2px;
color: #FFF;
display: inline-block;
text-decoration: none;
}
</style>
</head>
<body>
<h1>Sentiment API</h1>
<div class="app-desc">API computing the sentiment score of a sentence. Two versions are available (v1 & v2).
To authenticate, you must provide the following entry in the header of your request: <code>Authorization: username=<encrypted password in hexadecimal></code>. Encryption is to be made with a public RSA key, available at the endpoint <code>/public_key</code></div>
<div class="app-desc">More information: <a href="https://helloreverb.com">https://helloreverb.com</a></div>
<div class="app-desc">Contact Info: <a href="[email protected]">[email protected]</a></div>
<div class="app-desc">Version: v1</div>
<div class="app-desc">BasePath:/</div>
<div class="license-info">All rights reserved</div>
<div class="license-url">http://apache.org/licenses/LICENSE-2.0.html</div>
<h2>Access</h2>
<ol>
<li>HTTP Basic Authentication</li>
</ol>
<h2><a name="__Methods">Methods</a></h2>
[ Jump to <a href="#__Models">Models</a> ]
<h3>Table of Contents </h3>
<div class="method-summary"></div>
<h4><a href="#Default">Default</a></h4>
<ul>
<li><a href="#permissionsPost"><code><span class="http-method">post</span> /permissions</code></a></li>
<li><a href="#publicKeyGet"><code><span class="http-method">get</span> /public_key</code></a></li>
<li><a href="#statusGet"><code><span class="http-method">get</span> /status</code></a></li>
<li><a href="#v1SentimentPost"><code><span class="http-method">post</span> /v1/sentiment</code></a></li>
<li><a href="#v2SentimentPost"><code><span class="http-method">post</span> /v2/sentiment</code></a></li>
<li><a href="#welcomeNameGet"><code><span class="http-method">get</span> /welcome/{name}</code></a></li>
</ul>
<h1><a name="Default">Default</a></h1>
<div class="method"><a name="permissionsPost"></a>
<div class="method-path">
<a class="up" href="#__Methods">Up</a>
<pre class="post"><code class="huge"><span class="http-method">post</span> /permissions</code></pre></div>
<div class="method-summary">Lists the version permissions for an authenticated user. (<span class="nickname">permissionsPost</span>)</div>
<div class="method-notes"></div>
<h3 class="field-label">Request headers</h3>
<div class="field-items">
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type">
<a href="#inline_response_200">inline_response_200</a>
</div>
<!--Todo: process Response Object and its headers, schema, examples -->
<h3 class="field-label">Example data</h3>
<div class="example-data-content-type">Content-Type: application/json</div>
<pre class="example"><code>{
"v1" : 0,
"v2" : 6,
"username" : "username"
}</code></pre>
<h3 class="field-label">Produces</h3>
This API call produces the following media types according to the <span class="header">Accept</span> request header;
the media type will be conveyed by the <span class="header">Content-Type</span> response header.
<ul>
<li><code>application/json</code></li>
</ul>
<h3 class="field-label">Responses</h3>
<h4 class="field-label">200</h4>
Permissions of the user
<a href="#inline_response_200">inline_response_200</a>
</div> <!-- method -->
<hr/>
<div class="method"><a name="publicKeyGet"></a>
<div class="method-path">
<a class="up" href="#__Methods">Up</a>
<pre class="get"><code class="huge"><span class="http-method">get</span> /public_key</code></pre></div>
<div class="method-summary">Returns the public key necessary for encryption (<span class="nickname">publicKeyGet</span>)</div>
<div class="method-notes"></div>
<h3 class="field-label">Return type</h3>
<div class="return-type">
<a href="#inline_response_200_1">inline_response_200_1</a>
</div>
<!--Todo: process Response Object and its headers, schema, examples -->
<h3 class="field-label">Example data</h3>
<div class="example-data-content-type">Content-Type: application/json</div>
<pre class="example"><code>{
"public_key" : "-----BEGIN PUBLIC KEY-----\\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjBxcOOjnmuxUfhdZ3efS\\nhTSNzbLSMR3+rQ1gQtmo4jZlVLigkHzZOwt+bP2AL5paSOeyyC39OXkiuRgYADbL\\n52pRNAkE5E0JMcMFNZoloHfSAWn/u2KKTLkyEZ7sAlmdYJ2XsvmeQXZCIkgjz6kA\\n141tJI/GVjXR0NLQEca1yiyaR+O9kYl08yQLPvl5nssVXAEUAGYf2vcjbKWvTHTn\\nsqk0nQnOZD0KYgY/jHPGE53X5JqE6p/HtA7MpKN5+98li8KGFCDfKPklnIINiiYy\\nT35EXKFvb3JSNgeNm9RmSt45YwWPdBhK//LDZ9+7LX2+uSUDnwZ65u0yARAmxuQR\\nHQIDAQAB\\n-----END PUBLIC KEY-----\""
}</code></pre>
<h3 class="field-label">Produces</h3>
This API call produces the following media types according to the <span class="header">Accept</span> request header;
the media type will be conveyed by the <span class="header">Content-Type</span> response header.
<ul>
<li><code>application/json</code></li>
</ul>
<h3 class="field-label">Responses</h3>
<h4 class="field-label">200</h4>
Permissions of the user
<a href="#inline_response_200_1">inline_response_200_1</a>
</div> <!-- method -->
<hr/>
<div class="method"><a name="statusGet"></a>
<div class="method-path">
<a class="up" href="#__Methods">Up</a>
<pre class="get"><code class="huge"><span class="http-method">get</span> /status</code></pre></div>
<div class="method-summary">Health check (<span class="nickname">statusGet</span>)</div>
<div class="method-notes"></div>
<h3 class="field-label">Return type</h3>
<div class="return-type">
Integer
</div>
<!--Todo: process Response Object and its headers, schema, examples -->
<h3 class="field-label">Example data</h3>
<div class="example-data-content-type">Content-Type: application/json</div>
<pre class="example"><code>1</code></pre>
<h3 class="field-label">Produces</h3>
This API call produces the following media types according to the <span class="header">Accept</span> request header;
the media type will be conveyed by the <span class="header">Content-Type</span> response header.
<ul>
<li><code>application/json</code></li>
</ul>
<h3 class="field-label">Responses</h3>
<h4 class="field-label">200</h4>
Json with single value 1
<a href="#Integer">Integer</a>
</div> <!-- method -->
<hr/>
<div class="method"><a name="v1SentimentPost"></a>
<div class="method-path">
<a class="up" href="#__Methods">Up</a>
<pre class="post"><code class="huge"><span class="http-method">post</span> /v1/sentiment</code></pre></div>
<div class="method-summary">Sentiment analysis, version 1. The sentence must be provided in the body of the request. (<span class="nickname">v1SentimentPost</span>)</div>
<div class="method-notes"></div>
<h3 class="field-label">Request headers</h3>
<div class="field-items">
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type">
<a href="#inline_response_200_2">inline_response_200_2</a>
</div>
<!--Todo: process Response Object and its headers, schema, examples -->
<h3 class="field-label">Example data</h3>
<div class="example-data-content-type">Content-Type: application/json</div>
<pre class="example"><code>{
"sentence" : "i am depressed",
"score" : -0.5106,
"sentiment" : "negative",
"version" : "v1",
"username" : "Steven"
}</code></pre>
<h3 class="field-label">Produces</h3>
This API call produces the following media types according to the <span class="header">Accept</span> request header;
the media type will be conveyed by the <span class="header">Content-Type</span> response header.
<ul>
<li><code>application/json</code></li>
</ul>
<h3 class="field-label">Responses</h3>
<h4 class="field-label">200</h4>
Permissions of the user
<a href="#inline_response_200_2">inline_response_200_2</a>
</div> <!-- method -->
<hr/>
<div class="method"><a name="v2SentimentPost"></a>
<div class="method-path">
<a class="up" href="#__Methods">Up</a>
<pre class="post"><code class="huge"><span class="http-method">post</span> /v2/sentiment</code></pre></div>
<div class="method-summary">Sentiment analysis, version 2. The sentence must be provided in the body of the request. (<span class="nickname">v2SentimentPost</span>)</div>
<div class="method-notes"></div>
<h3 class="field-label">Request headers</h3>
<div class="field-items">
</div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type">
<a href="#inline_response_200_3">inline_response_200_3</a>
</div>
<!--Todo: process Response Object and its headers, schema, examples -->
<h3 class="field-label">Example data</h3>
<div class="example-data-content-type">Content-Type: application/json</div>
<pre class="example"><code>{
"sentence" : "i am depressed",
"score" : -0.5106,
"sentiment" : "negative",
"version" : "v2",
"username" : "Steven"
}</code></pre>
<h3 class="field-label">Produces</h3>
This API call produces the following media types according to the <span class="header">Accept</span> request header;
the media type will be conveyed by the <span class="header">Content-Type</span> response header.
<ul>
<li><code>application/json</code></li>
</ul>
<h3 class="field-label">Responses</h3>
<h4 class="field-label">200</h4>
Permissions of the user
<a href="#inline_response_200_3">inline_response_200_3</a>
</div> <!-- method -->
<hr/>
<div class="method"><a name="welcomeNameGet"></a>
<div class="method-path">
<a class="up" href="#__Methods">Up</a>
<pre class="get"><code class="huge"><span class="http-method">get</span> /welcome/{name}</code></pre></div>
<div class="method-summary"> (<span class="nickname">welcomeNameGet</span>)</div>
<div class="method-notes"></div>
<h3 class="field-label">Path parameters</h3>
<div class="field-items">
<div class="param">name (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> — </div> </div> <!-- field-items -->
<h3 class="field-label">Return type</h3>
<div class="return-type">
String
</div>
<!--Todo: process Response Object and its headers, schema, examples -->
<h3 class="field-label">Example data</h3>
<div class="example-data-content-type">Content-Type: application/json</div>
<pre class="example"><code>"Bonjour Emeric"</code></pre>
<h3 class="field-label">Produces</h3>
This API call produces the following media types according to the <span class="header">Accept</span> request header;
the media type will be conveyed by the <span class="header">Content-Type</span> response header.
<ul>
<li><code>application/json</code></li>
</ul>
<h3 class="field-label">Responses</h3>
<h4 class="field-label">200</h4>
Welcome message
<a href="#String">String</a>
</div> <!-- method -->
<hr/>
<h2><a name="__Models">Models</a></h2>
[ Jump to <a href="#__Methods">Methods</a> ]
<h3>Table of Contents</h3>
<ol>
<li><a href="#inline_response_200"><code>inline_response_200</code></a></li>
<li><a href="#inline_response_200_1"><code>inline_response_200_1</code></a></li>
<li><a href="#inline_response_200_2"><code>inline_response_200_2</code></a></li>
<li><a href="#inline_response_200_3"><code>inline_response_200_3</code></a></li>
</ol>
<div class="model">
<h3><a name="inline_response_200"><code>inline_response_200</code></a> <a class="up" href="#__Models">Up</a></h3>
<div class="field-items">
<div class="param">username (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The username. </div>
<div class="param">v1 (optional)</div><div class="param-desc"><span class="param-type"><a href="#integer">Integer</a></span> Permission for version 1. </div>
<div class="param">v2 (optional)</div><div class="param-desc"><span class="param-type"><a href="#integer">Integer</a></span> Permission for version 2. </div>
</div> <!-- field-items -->
</div>
<div class="model">
<h3><a name="inline_response_200_1"><code>inline_response_200_1</code></a> <a class="up" href="#__Models">Up</a></h3>
<div class="field-items">
<div class="param">public_key (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The public key. </div>
<div class="param-desc"><span class="param-type">example: -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjBxcOOjnmuxUfhdZ3efS\nhTSNzbLSMR3+rQ1gQtmo4jZlVLigkHzZOwt+bP2AL5paSOeyyC39OXkiuRgYADbL\n52pRNAkE5E0JMcMFNZoloHfSAWn/u2KKTLkyEZ7sAlmdYJ2XsvmeQXZCIkgjz6kA\n141tJI/GVjXR0NLQEca1yiyaR+O9kYl08yQLPvl5nssVXAEUAGYf2vcjbKWvTHTn\nsqk0nQnOZD0KYgY/jHPGE53X5JqE6p/HtA7MpKN5+98li8KGFCDfKPklnIINiiYy\nT35EXKFvb3JSNgeNm9RmSt45YwWPdBhK//LDZ9+7LX2+uSUDnwZ65u0yARAmxuQR\nHQIDAQAB\n-----END PUBLIC KEY-----"</span></div>
</div> <!-- field-items -->
</div>
<div class="model">
<h3><a name="inline_response_200_2"><code>inline_response_200_2</code></a> <a class="up" href="#__Models">Up</a></h3>
<div class="field-items">
<div class="param">score (optional)</div><div class="param-desc"><span class="param-type"><a href="#BigDecimal">BigDecimal</a></span> The score of the sentence (between -1 and +1). </div>
<div class="param-desc"><span class="param-type">example: -0.5106</span></div>
<div class="param">sentence (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> Analyzed sentence </div>
<div class="param-desc"><span class="param-type">example: i am depressed</span></div>
<div class="param">sentiment (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> Category of the sentiment </div>
<div class="param-desc"><span class="param-type">example: negative</span></div>
<div class="param">username (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> Username making the request </div>
<div class="param-desc"><span class="param-type">example: Steven</span></div>
<div class="param">version (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> </div>
<div class="param-enum-header">Enum:</div>
<div class="param-enum">v1</div>
<div class="param-desc"><span class="param-type">example: v1</span></div>
</div> <!-- field-items -->
</div>
<div class="model">
<h3><a name="inline_response_200_3"><code>inline_response_200_3</code></a> <a class="up" href="#__Models">Up</a></h3>
<div class="field-items">
<div class="param">score (optional)</div><div class="param-desc"><span class="param-type"><a href="#BigDecimal">BigDecimal</a></span> The score of the sentence (between -1 and +1). </div>
<div class="param-desc"><span class="param-type">example: -0.5106</span></div>
<div class="param">sentence (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> Analyzed sentence </div>
<div class="param-desc"><span class="param-type">example: i am depressed</span></div>
<div class="param">sentiment (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> Category of the sentiment </div>
<div class="param-desc"><span class="param-type">example: negative</span></div>
<div class="param">username (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> Username making the request </div>
<div class="param-desc"><span class="param-type">example: Steven</span></div>
<div class="param">version (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> </div>
<div class="param-enum-header">Enum:</div>
<div class="param-enum">v2</div>
<div class="param-desc"><span class="param-type">example: v2</span></div>
</div> <!-- field-items -->
</div>
</body>
</html>