aylien_text_api 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +28 -0
- data/LICENSE +13 -0
- data/README.md +67 -0
- data/Rakefile +8 -0
- data/aylien_text_api.gemspec +24 -0
- data/config/app_config.yml.example +7 -0
- data/lib/aylien_text_api.rb +23 -0
- data/lib/aylien_text_api/client.rb +246 -0
- data/lib/aylien_text_api/configuration.rb +57 -0
- data/lib/aylien_text_api/connection.rb +71 -0
- data/lib/aylien_text_api/error.rb +110 -0
- data/lib/aylien_text_api/version.rb +17 -0
- data/spec/fixtures/aylien_text_api/client/classify_with_invalid_client.yml +36 -0
- data/spec/fixtures/aylien_text_api/client/classify_with_invalid_params.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/classify_with_text.yml +48 -0
- data/spec/fixtures/aylien_text_api/client/classify_with_unauthenticated_client.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/classify_with_valid_url.yml +98 -0
- data/spec/fixtures/aylien_text_api/client/classify_with_value_as_text.yml +48 -0
- data/spec/fixtures/aylien_text_api/client/classify_with_value_as_valid_url.yml +98 -0
- data/spec/fixtures/aylien_text_api/client/concepts_with_invalid_client.yml +36 -0
- data/spec/fixtures/aylien_text_api/client/concepts_with_invalid_params.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/concepts_with_text.yml +44 -0
- data/spec/fixtures/aylien_text_api/client/concepts_with_unauthenticated_client.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/concepts_with_valid_url.yml +63 -0
- data/spec/fixtures/aylien_text_api/client/concepts_with_value_as_text.yml +44 -0
- data/spec/fixtures/aylien_text_api/client/concepts_with_value_as_valid_url.yml +63 -0
- data/spec/fixtures/aylien_text_api/client/entities_with_invalid_client.yml +36 -0
- data/spec/fixtures/aylien_text_api/client/entities_with_invalid_params.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/entities_with_text.yml +43 -0
- data/spec/fixtures/aylien_text_api/client/entities_with_unauthenticated_client.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/entities_with_valid_url.yml +302 -0
- data/spec/fixtures/aylien_text_api/client/entities_with_value_as_text.yml +43 -0
- data/spec/fixtures/aylien_text_api/client/entities_with_value_as_valid_url.yml +302 -0
- data/spec/fixtures/aylien_text_api/client/extract_with_invalid_client.yml +36 -0
- data/spec/fixtures/aylien_text_api/client/extract_with_invalid_params.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/extract_with_unauthenticated_client.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/extract_with_valid_url.yml +185 -0
- data/spec/fixtures/aylien_text_api/client/extract_with_value_as_text.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/extract_with_value_as_valid_url.yml +185 -0
- data/spec/fixtures/aylien_text_api/client/hashtags_with_invalid_client.yml +36 -0
- data/spec/fixtures/aylien_text_api/client/hashtags_with_invalid_params.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/hashtags_with_text.yml +48 -0
- data/spec/fixtures/aylien_text_api/client/hashtags_with_unauthenticated_client.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/hashtags_with_valid_url.yml +58 -0
- data/spec/fixtures/aylien_text_api/client/hashtags_with_value_as_text.yml +48 -0
- data/spec/fixtures/aylien_text_api/client/hashtags_with_value_as_valid_url.yml +58 -0
- data/spec/fixtures/aylien_text_api/client/language_with_invalid_client.yml +36 -0
- data/spec/fixtures/aylien_text_api/client/language_with_invalid_params.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/language_with_unauthenticated_client.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/language_with_valid_text.yml +41 -0
- data/spec/fixtures/aylien_text_api/client/language_with_valid_url.yml +57 -0
- data/spec/fixtures/aylien_text_api/client/language_with_value_as_text.yml +41 -0
- data/spec/fixtures/aylien_text_api/client/language_with_value_as_valid_url.yml +57 -0
- data/spec/fixtures/aylien_text_api/client/related_with_invalid_client.yml +36 -0
- data/spec/fixtures/aylien_text_api/client/related_with_invalid_params.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/related_with_phrase.yml +60 -0
- data/spec/fixtures/aylien_text_api/client/related_with_unauthenticated_client.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/related_with_value_as_phrase.yml +60 -0
- data/spec/fixtures/aylien_text_api/client/related_with_value_as_valid_url.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/sentiment_with_invalid_client.yml +36 -0
- data/spec/fixtures/aylien_text_api/client/sentiment_with_invalid_params.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/sentiment_with_text.yml +53 -0
- data/spec/fixtures/aylien_text_api/client/sentiment_with_unauthenticated_client.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/sentiment_with_valid_url.yml +57 -0
- data/spec/fixtures/aylien_text_api/client/sentiment_with_value_as_text.yml +53 -0
- data/spec/fixtures/aylien_text_api/client/sentiment_with_value_as_valid_url.yml +57 -0
- data/spec/fixtures/aylien_text_api/client/summarize_with_invalid_client.yml +36 -0
- data/spec/fixtures/aylien_text_api/client/summarize_with_invalid_params.yml +41 -0
- data/spec/fixtures/aylien_text_api/client/summarize_with_title_and_text.yml +78 -0
- data/spec/fixtures/aylien_text_api/client/summarize_with_unauthenticated_client.yml +40 -0
- data/spec/fixtures/aylien_text_api/client/summarize_with_valid_url.yml +65 -0
- data/spec/fixtures/aylien_text_api/client/summarize_with_value_as_text_and_title.yml +78 -0
- data/spec/fixtures/aylien_text_api/client/summarize_with_value_as_text_and_without_title.yml +41 -0
- data/spec/fixtures/aylien_text_api/client/summarize_with_value_as_valid_url.yml +65 -0
- data/spec/lib/aylien_text_api/classify.rb +86 -0
- data/spec/lib/aylien_text_api/client_spec.rb +23 -0
- data/spec/lib/aylien_text_api/concepts.rb +81 -0
- data/spec/lib/aylien_text_api/entities.rb +81 -0
- data/spec/lib/aylien_text_api/extract.rb +81 -0
- data/spec/lib/aylien_text_api/hashtags.rb +87 -0
- data/spec/lib/aylien_text_api/language.rb +79 -0
- data/spec/lib/aylien_text_api/related.rb +80 -0
- data/spec/lib/aylien_text_api/sentiment.rb +91 -0
- data/spec/lib/aylien_text_api/summarize.rb +95 -0
- data/spec/spec_helper.rb +16 -0
- metadata +193 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.aylien.com/api/v1/language
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: url=http%3A%2F%2Fwww.bbc.com%2Fsport%2F0%2Ffootball%2F25912393
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- ! '*/*'
|
|
12
|
+
User-Agent:
|
|
13
|
+
- Aylien Text API Ruby Gem 0.0.1
|
|
14
|
+
Content-Type:
|
|
15
|
+
- application/x-www-form-urlencoded
|
|
16
|
+
App-Id:
|
|
17
|
+
- <PASSWORD>
|
|
18
|
+
App-Key:
|
|
19
|
+
- <PASSWORD>
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 200
|
|
23
|
+
message: OK
|
|
24
|
+
headers:
|
|
25
|
+
Server:
|
|
26
|
+
- openresty/1.5.12.1
|
|
27
|
+
Date:
|
|
28
|
+
- Tue, 02 Dec 2014 18:16:11 GMT
|
|
29
|
+
Content-Type:
|
|
30
|
+
- application/json;charset=UTF-8
|
|
31
|
+
Content-Length:
|
|
32
|
+
- '1298'
|
|
33
|
+
Connection:
|
|
34
|
+
- keep-alive
|
|
35
|
+
body:
|
|
36
|
+
encoding: US-ASCII
|
|
37
|
+
string: ! "{\n \"text\": \"Four-time Ballon d'Or winner Messi, 26, is reported
|
|
38
|
+
to be a target for French side Paris St-Germain.\\u00a0\\nMessi making chances\\nLionel
|
|
39
|
+
Messi has created 36 chances for Barcelona this season and has been on the
|
|
40
|
+
winning side in 16 of the 20 games he has played\\nIn an interview with radio
|
|
41
|
+
station RAC1, posted on Barcelona's website,\\u00a0 Bartomeu said: \\\"The
|
|
42
|
+
club will sit down and negotiate a new contract.\\n\\\"We will do what we
|
|
43
|
+
have to, to ensure he's the best-paid player.\\\"\\nMessi scored 60 goals
|
|
44
|
+
in 50 appearances last season but has struggled to match that goalscoring
|
|
45
|
+
form in 2013-14.\\nHe has scored 18 goals so far but just eight of those have
|
|
46
|
+
been in the league.\\nHis last league goal came in September, before he was
|
|
47
|
+
out for five weeks with a hamstring injury.\\n\\\"He can do everything,\\\"
|
|
48
|
+
said Barca coach Gerardo Martino. \\\"If he succeeds in other facets of his
|
|
49
|
+
game, it doesn't matter if he scores.\\n\\\"Nothing surprises me with him.
|
|
50
|
+
He controls the game well, passes the ball well, he is a good finisher, he
|
|
51
|
+
can press and recover the ball.\\n\\\"He sees passes that most people can
|
|
52
|
+
only see whilst watching the game on TV or in the stands, not ones that you
|
|
53
|
+
can normally see on the field.\\\"\\nAlso related to this story\\n\",\n \"lang\":
|
|
54
|
+
\"en\",\n \"confidence\": 0.9999956632979089\n}"
|
|
55
|
+
http_version:
|
|
56
|
+
recorded_at: Tue, 02 Dec 2014 18:15:08 GMT
|
|
57
|
+
recorded_with: VCR 2.9.3
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.aylien.com/api/v1/language
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: text=Hello+there%21+How%27s+it+going%3F
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- ! '*/*'
|
|
12
|
+
User-Agent:
|
|
13
|
+
- Aylien Text API Ruby Gem 0.0.1
|
|
14
|
+
Content-Type:
|
|
15
|
+
- application/x-www-form-urlencoded
|
|
16
|
+
App-Id:
|
|
17
|
+
- <PASSWORD>
|
|
18
|
+
App-Key:
|
|
19
|
+
- <PASSWORD>
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 200
|
|
23
|
+
message: OK
|
|
24
|
+
headers:
|
|
25
|
+
Server:
|
|
26
|
+
- openresty/1.5.12.1
|
|
27
|
+
Date:
|
|
28
|
+
- Tue, 02 Dec 2014 18:16:08 GMT
|
|
29
|
+
Content-Type:
|
|
30
|
+
- application/json;charset=UTF-8
|
|
31
|
+
Content-Length:
|
|
32
|
+
- '96'
|
|
33
|
+
Connection:
|
|
34
|
+
- keep-alive
|
|
35
|
+
body:
|
|
36
|
+
encoding: US-ASCII
|
|
37
|
+
string: ! "{\n \"text\": \"Hello there! How's it going?\",\n \"lang\": \"en\",\n
|
|
38
|
+
\ \"confidence\": 0.9999957818374777\n}"
|
|
39
|
+
http_version:
|
|
40
|
+
recorded_at: Tue, 02 Dec 2014 18:15:05 GMT
|
|
41
|
+
recorded_with: VCR 2.9.3
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.aylien.com/api/v1/language
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: url=http%3A%2F%2Fwww.bbc.com%2Fsport%2F0%2Ffootball%2F25912393
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- ! '*/*'
|
|
12
|
+
User-Agent:
|
|
13
|
+
- Aylien Text API Ruby Gem 0.0.1
|
|
14
|
+
Content-Type:
|
|
15
|
+
- application/x-www-form-urlencoded
|
|
16
|
+
App-Id:
|
|
17
|
+
- <PASSWORD>
|
|
18
|
+
App-Key:
|
|
19
|
+
- <PASSWORD>
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 200
|
|
23
|
+
message: OK
|
|
24
|
+
headers:
|
|
25
|
+
Server:
|
|
26
|
+
- openresty/1.5.12.1
|
|
27
|
+
Date:
|
|
28
|
+
- Tue, 02 Dec 2014 18:16:09 GMT
|
|
29
|
+
Content-Type:
|
|
30
|
+
- application/json;charset=UTF-8
|
|
31
|
+
Content-Length:
|
|
32
|
+
- '1298'
|
|
33
|
+
Connection:
|
|
34
|
+
- keep-alive
|
|
35
|
+
body:
|
|
36
|
+
encoding: US-ASCII
|
|
37
|
+
string: ! "{\n \"text\": \"Four-time Ballon d'Or winner Messi, 26, is reported
|
|
38
|
+
to be a target for French side Paris St-Germain.\\u00a0\\nMessi making chances\\nLionel
|
|
39
|
+
Messi has created 36 chances for Barcelona this season and has been on the
|
|
40
|
+
winning side in 16 of the 20 games he has played\\nIn an interview with radio
|
|
41
|
+
station RAC1, posted on Barcelona's website,\\u00a0 Bartomeu said: \\\"The
|
|
42
|
+
club will sit down and negotiate a new contract.\\n\\\"We will do what we
|
|
43
|
+
have to, to ensure he's the best-paid player.\\\"\\nMessi scored 60 goals
|
|
44
|
+
in 50 appearances last season but has struggled to match that goalscoring
|
|
45
|
+
form in 2013-14.\\nHe has scored 18 goals so far but just eight of those have
|
|
46
|
+
been in the league.\\nHis last league goal came in September, before he was
|
|
47
|
+
out for five weeks with a hamstring injury.\\n\\\"He can do everything,\\\"
|
|
48
|
+
said Barca coach Gerardo Martino. \\\"If he succeeds in other facets of his
|
|
49
|
+
game, it doesn't matter if he scores.\\n\\\"Nothing surprises me with him.
|
|
50
|
+
He controls the game well, passes the ball well, he is a good finisher, he
|
|
51
|
+
can press and recover the ball.\\n\\\"He sees passes that most people can
|
|
52
|
+
only see whilst watching the game on TV or in the stands, not ones that you
|
|
53
|
+
can normally see on the field.\\\"\\nAlso related to this story\\n\",\n \"lang\":
|
|
54
|
+
\"en\",\n \"confidence\": 0.9999957602699473\n}"
|
|
55
|
+
http_version:
|
|
56
|
+
recorded_at: Tue, 02 Dec 2014 18:15:07 GMT
|
|
57
|
+
recorded_with: VCR 2.9.3
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.aylien.com/api/v1/related
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: phrase=android
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- ! '*/*'
|
|
12
|
+
User-Agent:
|
|
13
|
+
- Aylien Text API Ruby Gem 0.0.1
|
|
14
|
+
Content-Type:
|
|
15
|
+
- application/x-www-form-urlencoded
|
|
16
|
+
response:
|
|
17
|
+
status:
|
|
18
|
+
code: 403
|
|
19
|
+
message: Forbidden
|
|
20
|
+
headers:
|
|
21
|
+
Server:
|
|
22
|
+
- openresty/1.5.12.1
|
|
23
|
+
Date:
|
|
24
|
+
- Tue, 02 Dec 2014 18:16:24 GMT
|
|
25
|
+
Content-Type:
|
|
26
|
+
- text/plain; charset=us-ascii
|
|
27
|
+
Transfer-Encoding:
|
|
28
|
+
- chunked
|
|
29
|
+
Connection:
|
|
30
|
+
- keep-alive
|
|
31
|
+
body:
|
|
32
|
+
encoding: US-ASCII
|
|
33
|
+
string: Authentication parameters missing
|
|
34
|
+
http_version:
|
|
35
|
+
recorded_at: Tue, 02 Dec 2014 18:15:21 GMT
|
|
36
|
+
recorded_with: VCR 2.9.3
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.aylien.com/api/v1/related
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: wrong_param
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- ! '*/*'
|
|
12
|
+
User-Agent:
|
|
13
|
+
- Aylien Text API Ruby Gem 0.0.1
|
|
14
|
+
Content-Type:
|
|
15
|
+
- application/x-www-form-urlencoded
|
|
16
|
+
App-Id:
|
|
17
|
+
- <PASSWORD>
|
|
18
|
+
App-Key:
|
|
19
|
+
- <PASSWORD>
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 400
|
|
23
|
+
message: Bad Request
|
|
24
|
+
headers:
|
|
25
|
+
Server:
|
|
26
|
+
- openresty/1.5.12.1
|
|
27
|
+
Date:
|
|
28
|
+
- Tue, 02 Dec 2014 18:16:26 GMT
|
|
29
|
+
Content-Type:
|
|
30
|
+
- application/json;charset=UTF-8
|
|
31
|
+
Content-Length:
|
|
32
|
+
- '61'
|
|
33
|
+
Connection:
|
|
34
|
+
- keep-alive
|
|
35
|
+
body:
|
|
36
|
+
encoding: US-ASCII
|
|
37
|
+
string: ! '{"error" : "Request is missing required form field ''phrase''"}'
|
|
38
|
+
http_version:
|
|
39
|
+
recorded_at: Tue, 02 Dec 2014 18:15:23 GMT
|
|
40
|
+
recorded_with: VCR 2.9.3
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.aylien.com/api/v1/related
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: phrase=android
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- ! '*/*'
|
|
12
|
+
User-Agent:
|
|
13
|
+
- Aylien Text API Ruby Gem 0.0.1
|
|
14
|
+
Content-Type:
|
|
15
|
+
- application/x-www-form-urlencoded
|
|
16
|
+
App-Id:
|
|
17
|
+
- <PASSWORD>
|
|
18
|
+
App-Key:
|
|
19
|
+
- <PASSWORD>
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 200
|
|
23
|
+
message: OK
|
|
24
|
+
headers:
|
|
25
|
+
Server:
|
|
26
|
+
- openresty/1.5.12.1
|
|
27
|
+
Date:
|
|
28
|
+
- Tue, 02 Dec 2014 18:16:24 GMT
|
|
29
|
+
Content-Type:
|
|
30
|
+
- application/json;charset=UTF-8
|
|
31
|
+
Content-Length:
|
|
32
|
+
- '1403'
|
|
33
|
+
Connection:
|
|
34
|
+
- keep-alive
|
|
35
|
+
body:
|
|
36
|
+
encoding: US-ASCII
|
|
37
|
+
string: ! "{\n \"phrase\": \"android\",\n \"related\": [{\n \"phrase\":
|
|
38
|
+
\"ios\",\n \"distance\": 0.8744090795516968\n }, {\n \"phrase\": \"iphone\",\n
|
|
39
|
+
\ \"distance\": 0.8465747237205505\n }, {\n \"phrase\": \"iphone ipad\",\n
|
|
40
|
+
\ \"distance\": 0.8268404006958008\n }, {\n \"phrase\": \"blackberry
|
|
41
|
+
playbook\",\n \"distance\": 0.8240213394165039\n }, {\n \"phrase\":
|
|
42
|
+
\"symbian\",\n \"distance\": 0.8222286701202393\n }, {\n \"phrase\":
|
|
43
|
+
\"smartphones\",\n \"distance\": 0.8179833889007568\n }, {\n \"phrase\":
|
|
44
|
+
\"smartphone\",\n \"distance\": 0.8097701072692871\n }, {\n \"phrase\":
|
|
45
|
+
\"froyo\",\n \"distance\": 0.7987280488014221\n }, {\n \"phrase\":
|
|
46
|
+
\"webos\",\n \"distance\": 0.7951686382293701\n }, {\n \"phrase\":
|
|
47
|
+
\"ipad\",\n \"distance\": 0.7910612225532532\n }, {\n \"phrase\": \"app\",\n
|
|
48
|
+
\ \"distance\": 0.7821643352508545\n }, {\n \"phrase\": \"blackberry\",\n
|
|
49
|
+
\ \"distance\": 0.7789986729621887\n }, {\n \"phrase\": \"jelly bean\",\n
|
|
50
|
+
\ \"distance\": 0.7675120830535889\n }, {\n \"phrase\": \"ipod touch\",\n
|
|
51
|
+
\ \"distance\": 0.762033998966217\n }, {\n \"phrase\": \"symbian s60\",\n
|
|
52
|
+
\ \"distance\": 0.7563616633415222\n }, {\n \"phrase\": \"kitkat\",\n
|
|
53
|
+
\ \"distance\": 0.7541030645370483\n }, {\n \"phrase\": \"iphones\",\n
|
|
54
|
+
\ \"distance\": 0.7453151345252991\n }, {\n \"phrase\": \"cyanogenmod\",\n
|
|
55
|
+
\ \"distance\": 0.7441946864128113\n }, {\n \"phrase\": \"jailbroken\",\n
|
|
56
|
+
\ \"distance\": 0.7417730093002319\n }, {\n \"phrase\": \"tizen\",\n
|
|
57
|
+
\ \"distance\": 0.7413533329963684\n }]\n}"
|
|
58
|
+
http_version:
|
|
59
|
+
recorded_at: Tue, 02 Dec 2014 18:15:22 GMT
|
|
60
|
+
recorded_with: VCR 2.9.3
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.aylien.com/api/v1/related
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: phrase=android
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- ! '*/*'
|
|
12
|
+
User-Agent:
|
|
13
|
+
- Aylien Text API Ruby Gem 0.0.1
|
|
14
|
+
Content-Type:
|
|
15
|
+
- application/x-www-form-urlencoded
|
|
16
|
+
App-Id:
|
|
17
|
+
- random_string
|
|
18
|
+
App-Key:
|
|
19
|
+
- random_string
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 403
|
|
23
|
+
message: Forbidden
|
|
24
|
+
headers:
|
|
25
|
+
Server:
|
|
26
|
+
- openresty/1.5.12.1
|
|
27
|
+
Date:
|
|
28
|
+
- Tue, 02 Dec 2014 18:16:23 GMT
|
|
29
|
+
Content-Type:
|
|
30
|
+
- text/plain; charset=us-ascii
|
|
31
|
+
Transfer-Encoding:
|
|
32
|
+
- chunked
|
|
33
|
+
Connection:
|
|
34
|
+
- keep-alive
|
|
35
|
+
body:
|
|
36
|
+
encoding: US-ASCII
|
|
37
|
+
string: Authentication failed
|
|
38
|
+
http_version:
|
|
39
|
+
recorded_at: Tue, 02 Dec 2014 18:15:21 GMT
|
|
40
|
+
recorded_with: VCR 2.9.3
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.aylien.com/api/v1/related
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: phrase=android
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- ! '*/*'
|
|
12
|
+
User-Agent:
|
|
13
|
+
- Aylien Text API Ruby Gem 0.0.1
|
|
14
|
+
Content-Type:
|
|
15
|
+
- application/x-www-form-urlencoded
|
|
16
|
+
App-Id:
|
|
17
|
+
- <PASSWORD>
|
|
18
|
+
App-Key:
|
|
19
|
+
- <PASSWORD>
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 200
|
|
23
|
+
message: OK
|
|
24
|
+
headers:
|
|
25
|
+
Server:
|
|
26
|
+
- openresty/1.5.12.1
|
|
27
|
+
Date:
|
|
28
|
+
- Tue, 02 Dec 2014 18:16:25 GMT
|
|
29
|
+
Content-Type:
|
|
30
|
+
- application/json;charset=UTF-8
|
|
31
|
+
Content-Length:
|
|
32
|
+
- '1403'
|
|
33
|
+
Connection:
|
|
34
|
+
- keep-alive
|
|
35
|
+
body:
|
|
36
|
+
encoding: US-ASCII
|
|
37
|
+
string: ! "{\n \"phrase\": \"android\",\n \"related\": [{\n \"phrase\":
|
|
38
|
+
\"ios\",\n \"distance\": 0.8744090795516968\n }, {\n \"phrase\": \"iphone\",\n
|
|
39
|
+
\ \"distance\": 0.8465747237205505\n }, {\n \"phrase\": \"iphone ipad\",\n
|
|
40
|
+
\ \"distance\": 0.8268404006958008\n }, {\n \"phrase\": \"blackberry
|
|
41
|
+
playbook\",\n \"distance\": 0.8240213394165039\n }, {\n \"phrase\":
|
|
42
|
+
\"symbian\",\n \"distance\": 0.8222286701202393\n }, {\n \"phrase\":
|
|
43
|
+
\"smartphones\",\n \"distance\": 0.8179833889007568\n }, {\n \"phrase\":
|
|
44
|
+
\"smartphone\",\n \"distance\": 0.8097701072692871\n }, {\n \"phrase\":
|
|
45
|
+
\"froyo\",\n \"distance\": 0.7987280488014221\n }, {\n \"phrase\":
|
|
46
|
+
\"webos\",\n \"distance\": 0.7951686382293701\n }, {\n \"phrase\":
|
|
47
|
+
\"ipad\",\n \"distance\": 0.7910612225532532\n }, {\n \"phrase\": \"app\",\n
|
|
48
|
+
\ \"distance\": 0.7821643352508545\n }, {\n \"phrase\": \"blackberry\",\n
|
|
49
|
+
\ \"distance\": 0.7789986729621887\n }, {\n \"phrase\": \"jelly bean\",\n
|
|
50
|
+
\ \"distance\": 0.7675120830535889\n }, {\n \"phrase\": \"ipod touch\",\n
|
|
51
|
+
\ \"distance\": 0.762033998966217\n }, {\n \"phrase\": \"symbian s60\",\n
|
|
52
|
+
\ \"distance\": 0.7563616633415222\n }, {\n \"phrase\": \"kitkat\",\n
|
|
53
|
+
\ \"distance\": 0.7541030645370483\n }, {\n \"phrase\": \"iphones\",\n
|
|
54
|
+
\ \"distance\": 0.7453151345252991\n }, {\n \"phrase\": \"cyanogenmod\",\n
|
|
55
|
+
\ \"distance\": 0.7441946864128113\n }, {\n \"phrase\": \"jailbroken\",\n
|
|
56
|
+
\ \"distance\": 0.7417730093002319\n }, {\n \"phrase\": \"tizen\",\n
|
|
57
|
+
\ \"distance\": 0.7413533329963684\n }]\n}"
|
|
58
|
+
http_version:
|
|
59
|
+
recorded_at: Tue, 02 Dec 2014 18:15:22 GMT
|
|
60
|
+
recorded_with: VCR 2.9.3
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.aylien.com/api/v1/related
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: url=http%3A%2F%2Fwww.bbc.com%2Fsport%2F0%2Ffootball%2F25912393
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- ! '*/*'
|
|
12
|
+
User-Agent:
|
|
13
|
+
- Aylien Text API Ruby Gem 0.0.1
|
|
14
|
+
Content-Type:
|
|
15
|
+
- application/x-www-form-urlencoded
|
|
16
|
+
App-Id:
|
|
17
|
+
- <PASSWORD>
|
|
18
|
+
App-Key:
|
|
19
|
+
- <PASSWORD>
|
|
20
|
+
response:
|
|
21
|
+
status:
|
|
22
|
+
code: 400
|
|
23
|
+
message: Bad Request
|
|
24
|
+
headers:
|
|
25
|
+
Server:
|
|
26
|
+
- openresty/1.5.12.1
|
|
27
|
+
Date:
|
|
28
|
+
- Tue, 02 Dec 2014 18:16:26 GMT
|
|
29
|
+
Content-Type:
|
|
30
|
+
- application/json;charset=UTF-8
|
|
31
|
+
Content-Length:
|
|
32
|
+
- '61'
|
|
33
|
+
Connection:
|
|
34
|
+
- keep-alive
|
|
35
|
+
body:
|
|
36
|
+
encoding: US-ASCII
|
|
37
|
+
string: ! '{"error" : "Request is missing required form field ''phrase''"}'
|
|
38
|
+
http_version:
|
|
39
|
+
recorded_at: Tue, 02 Dec 2014 18:15:23 GMT
|
|
40
|
+
recorded_with: VCR 2.9.3
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.aylien.com/api/v1/sentiment
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: text=I+really+enjoyed+using+the+Canon+Ixus+in+Madrid.%0A++++++The+Panasonic+Lumix+is+a+poor+camera%2C+but+the+Canon+Ixus+is+really+sleek.%0A++++++The+Canon+Ixus+is+much+better+than+the+Panasonic+Lumix.%0A++++++All+I+want+to+do+with+a+camera+is+point+it+and+then+just+press+the+button.%0A++++++The+Canon+Ixus+is+perfect+for+that.+You+will+soon+get+great+photos%0A++++++with+very+little+effort.+I+had+previously+returned+a+Panasonic+Lumix%0A++++++because+the+pictures+were+not+of+the+quality+I+expected.%0A++++++Spending+the+money+on+the+Canon+was+a+smart+move.%0A++++++I+would+recommend+the+Ixus+to+anyone+without+hesitation.%0A++++++Two+small+issues+to+be+pointed+out%3A+firstly%2C+the+battery%0A++++++life+is+not+fantastic.+Also%2C+the+zoom+is+not+very+powerful.%0A++++++If+your+subject+is+far+away%2C+you+should+not+expect+good+results.%0A++++++Review+made+by+John+Irving+from+Florida.
|
|
9
|
+
headers:
|
|
10
|
+
Accept:
|
|
11
|
+
- ! '*/*'
|
|
12
|
+
User-Agent:
|
|
13
|
+
- Aylien Text API Ruby Gem 0.0.1
|
|
14
|
+
Content-Type:
|
|
15
|
+
- application/x-www-form-urlencoded
|
|
16
|
+
response:
|
|
17
|
+
status:
|
|
18
|
+
code: 403
|
|
19
|
+
message: Forbidden
|
|
20
|
+
headers:
|
|
21
|
+
Server:
|
|
22
|
+
- openresty/1.5.12.1
|
|
23
|
+
Date:
|
|
24
|
+
- Tue, 02 Dec 2014 18:15:56 GMT
|
|
25
|
+
Content-Type:
|
|
26
|
+
- text/plain; charset=us-ascii
|
|
27
|
+
Transfer-Encoding:
|
|
28
|
+
- chunked
|
|
29
|
+
Connection:
|
|
30
|
+
- keep-alive
|
|
31
|
+
body:
|
|
32
|
+
encoding: US-ASCII
|
|
33
|
+
string: Authentication parameters missing
|
|
34
|
+
http_version:
|
|
35
|
+
recorded_at: Tue, 02 Dec 2014 18:14:53 GMT
|
|
36
|
+
recorded_with: VCR 2.9.3
|