aylien_text_api 0.2.0 → 0.3.0
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 +4 -4
- data/Gemfile.lock +4 -1
- data/README.md +1 -1
- data/aylien_text_api.gemspec +2 -2
- data/lib/aylien_text_api/client.rb +41 -12
- data/lib/aylien_text_api/configuration.rb +2 -1
- data/lib/aylien_text_api/connection.rb +2 -2
- data/lib/aylien_text_api/version.rb +1 -1
- data/spec/fixtures/aylien_text_api/client/classify_with_invalid_client.yml +3 -3
- data/spec/fixtures/aylien_text_api/client/classify_with_invalid_params.yml +18 -9
- data/spec/fixtures/aylien_text_api/client/classify_with_text.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/classify_with_unauthenticated_client.yml +5 -5
- data/spec/fixtures/aylien_text_api/client/classify_with_valid_url.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/classify_with_value_as_text.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/classify_with_value_as_valid_url.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/combined_with_invalid_client.yml +38 -0
- data/spec/fixtures/aylien_text_api/client/combined_with_invalid_params.yml +57 -0
- data/spec/fixtures/aylien_text_api/client/combined_with_text.yml +70 -0
- data/spec/fixtures/aylien_text_api/client/combined_with_unauthenticated_client.yml +42 -0
- data/spec/fixtures/aylien_text_api/client/combined_with_valid_url.yml +315 -0
- data/spec/fixtures/aylien_text_api/client/combined_with_value_as_text.yml +70 -0
- data/spec/fixtures/aylien_text_api/client/combined_with_value_as_valid_url.yml +315 -0
- data/spec/fixtures/aylien_text_api/client/concepts_with_invalid_client.yml +3 -3
- data/spec/fixtures/aylien_text_api/client/concepts_with_invalid_params.yml +18 -9
- data/spec/fixtures/aylien_text_api/client/concepts_with_text.yml +42 -13
- data/spec/fixtures/aylien_text_api/client/concepts_with_unauthenticated_client.yml +5 -5
- data/spec/fixtures/aylien_text_api/client/concepts_with_valid_url.yml +89 -100
- data/spec/fixtures/aylien_text_api/client/concepts_with_value_as_text.yml +42 -13
- data/spec/fixtures/aylien_text_api/client/concepts_with_value_as_valid_url.yml +89 -100
- data/spec/fixtures/aylien_text_api/client/entities_with_invalid_client.yml +3 -3
- data/spec/fixtures/aylien_text_api/client/entities_with_invalid_params.yml +9 -9
- data/spec/fixtures/aylien_text_api/client/entities_with_text.yml +19 -12
- data/spec/fixtures/aylien_text_api/client/entities_with_unauthenticated_client.yml +5 -5
- data/spec/fixtures/aylien_text_api/client/entities_with_valid_url.yml +459 -456
- data/spec/fixtures/aylien_text_api/client/entities_with_value_as_text.yml +19 -12
- data/spec/fixtures/aylien_text_api/client/entities_with_value_as_valid_url.yml +459 -456
- data/spec/fixtures/aylien_text_api/client/extract_with_invalid_client.yml +3 -3
- data/spec/fixtures/aylien_text_api/client/extract_with_invalid_params.yml +19 -10
- data/spec/fixtures/aylien_text_api/client/extract_with_unauthenticated_client.yml +5 -5
- data/spec/fixtures/aylien_text_api/client/extract_with_valid_url.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/extract_with_value_as_text.yml +18 -9
- data/spec/fixtures/aylien_text_api/client/extract_with_value_as_valid_url.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/hashtags_with_invalid_client.yml +3 -3
- data/spec/fixtures/aylien_text_api/client/hashtags_with_invalid_params.yml +18 -9
- data/spec/fixtures/aylien_text_api/client/hashtags_with_text.yml +10 -11
- data/spec/fixtures/aylien_text_api/client/hashtags_with_unauthenticated_client.yml +5 -5
- data/spec/fixtures/aylien_text_api/client/hashtags_with_valid_url.yml +12 -12
- data/spec/fixtures/aylien_text_api/client/hashtags_with_value_as_text.yml +10 -11
- data/spec/fixtures/aylien_text_api/client/hashtags_with_value_as_valid_url.yml +12 -12
- data/spec/fixtures/aylien_text_api/client/image_tags_with_invalid_client.yml +3 -3
- data/spec/fixtures/aylien_text_api/client/image_tags_with_invalid_params.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/image_tags_with_unauthenticated_client.yml +5 -5
- data/spec/fixtures/aylien_text_api/client/image_tags_with_valid_url.yml +10 -9
- data/spec/fixtures/aylien_text_api/client/image_tags_with_value_as_text.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/image_tags_with_value_as_valid_url.yml +10 -9
- data/spec/fixtures/aylien_text_api/client/language_with_invalid_client.yml +3 -3
- data/spec/fixtures/aylien_text_api/client/language_with_invalid_params.yml +18 -9
- data/spec/fixtures/aylien_text_api/client/language_with_unauthenticated_client.yml +5 -5
- data/spec/fixtures/aylien_text_api/client/language_with_valid_text.yml +9 -9
- data/spec/fixtures/aylien_text_api/client/language_with_valid_url.yml +8 -8
- data/spec/fixtures/aylien_text_api/client/language_with_value_as_text.yml +8 -8
- data/spec/fixtures/aylien_text_api/client/language_with_value_as_valid_url.yml +8 -8
- data/spec/fixtures/aylien_text_api/client/microformats_with_invalid_client.yml +3 -3
- data/spec/fixtures/aylien_text_api/client/microformats_with_invalid_params.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/microformats_with_unauthenticated_client.yml +5 -5
- data/spec/fixtures/aylien_text_api/client/microformats_with_valid_url.yml +8 -8
- data/spec/fixtures/aylien_text_api/client/microformats_with_value_as_valid_url.yml +8 -8
- data/spec/fixtures/aylien_text_api/client/related_with_invalid_client.yml +3 -3
- data/spec/fixtures/aylien_text_api/client/related_with_invalid_params.yml +24 -10
- data/spec/fixtures/aylien_text_api/client/related_with_phrase.yml +47 -47
- data/spec/fixtures/aylien_text_api/client/related_with_unauthenticated_client.yml +5 -5
- data/spec/fixtures/aylien_text_api/client/related_with_value_as_phrase.yml +47 -47
- data/spec/fixtures/aylien_text_api/client/related_with_value_as_valid_url.yml +23 -9
- data/spec/fixtures/aylien_text_api/client/sentiment_with_invalid_client.yml +3 -3
- data/spec/fixtures/aylien_text_api/client/sentiment_with_invalid_params.yml +18 -9
- data/spec/fixtures/aylien_text_api/client/sentiment_with_text.yml +8 -8
- data/spec/fixtures/aylien_text_api/client/sentiment_with_unauthenticated_client.yml +5 -5
- data/spec/fixtures/aylien_text_api/client/sentiment_with_valid_url.yml +8 -8
- data/spec/fixtures/aylien_text_api/client/sentiment_with_value_as_text.yml +8 -8
- data/spec/fixtures/aylien_text_api/client/sentiment_with_value_as_valid_url.yml +8 -8
- data/spec/fixtures/aylien_text_api/client/summarize_with_invalid_client.yml +3 -3
- data/spec/fixtures/aylien_text_api/client/summarize_with_invalid_params.yml +23 -10
- data/spec/fixtures/aylien_text_api/client/summarize_with_title_and_text.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/summarize_with_unauthenticated_client.yml +5 -5
- data/spec/fixtures/aylien_text_api/client/summarize_with_valid_url.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/summarize_with_value_as_text_and_title.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/summarize_with_value_as_text_and_without_title.yml +18 -10
- data/spec/fixtures/aylien_text_api/client/summarize_with_value_as_valid_url.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/unsupervised_classify_with_invalid_client.yml +3 -3
- data/spec/fixtures/aylien_text_api/client/unsupervised_classify_with_invalid_params.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/unsupervised_classify_with_text.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/unsupervised_classify_with_unauthenticated_client.yml +5 -5
- data/spec/fixtures/aylien_text_api/client/unsupervised_classify_with_valid_url.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/unsupervised_classify_with_value_as_text.yml +7 -7
- data/spec/fixtures/aylien_text_api/client/unsupervised_classify_with_value_as_valid_url.yml +7 -7
- data/spec/lib/aylien_text_api/client_spec.rb +1 -0
- data/spec/lib/aylien_text_api/combined.rb +88 -0
- metadata +25 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe9d4f356602fc1b9f1d70d21c187c775ef0d50b
|
|
4
|
+
data.tar.gz: ea0e0d0ab966b97b8a62a582d18d926f574bf106
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4f711cf5448383799904b579971ab911109e90099d70ff5927e25f2a000cf298dcd790a7604823fae1b1dfb4ebc674074d1ae9b2680eedf0661acb7d92763988
|
|
7
|
+
data.tar.gz: 4fb437af83e64299b2129b007524056442680b923c027839f1b187e59709c13e9a7dce0244ad1a9c43c8b6b5938e52d4d036ef558d7936e3c179ca5832cd6092
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -9,7 +9,7 @@ Installation
|
|
|
9
9
|
============
|
|
10
10
|
gem install aylien_text_api
|
|
11
11
|
|
|
12
|
-
See the [Developers Guide](
|
|
12
|
+
See the [Developers Guide](http://docs.aylien.com/docs/ruby-sdk) for additional documentation.
|
|
13
13
|
|
|
14
14
|
Configuration
|
|
15
15
|
=============
|
data/aylien_text_api.gemspec
CHANGED
|
@@ -10,8 +10,8 @@ Gem::Specification.new do |s|
|
|
|
10
10
|
s.license = 'Apache License, Version 2.0'
|
|
11
11
|
s.email = ["hello@aylien.com", "hamed.r.nik@gmail.com"]
|
|
12
12
|
s.homepage = "https://github.com/AYLIEN/aylien_textapi_ruby"
|
|
13
|
-
s.summary = %q{
|
|
14
|
-
s.description = %q{
|
|
13
|
+
s.summary = %q{AYLIEN Text Analysis API is a package of Natural Language Processing and Machine Learning-powered tools for analyzing and extracting various kinds of information from text and images.}
|
|
14
|
+
s.description = %q{AYLIEN Text Analysis API is a package of Natural Language Processing and Machine Learning-powered tools for analyzing and extracting various kinds of information from text and images.}
|
|
15
15
|
|
|
16
16
|
s.files = `git ls-files`.split("\n")
|
|
17
17
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
@@ -51,7 +51,7 @@ module AylienTextApi
|
|
|
51
51
|
# Whether extract the best image of the article
|
|
52
52
|
#
|
|
53
53
|
# @return [Hash, nil] A hash of result. See
|
|
54
|
-
# http://aylien.com/
|
|
54
|
+
# http://docs.aylien.com/docs/extract for more information
|
|
55
55
|
# on the data returned.
|
|
56
56
|
#
|
|
57
57
|
def extract(value=nil, params={})
|
|
@@ -71,7 +71,7 @@ module AylienTextApi
|
|
|
71
71
|
# If set to auto, it'll try to detect the language.
|
|
72
72
|
#
|
|
73
73
|
# @return [Hash, nil] A hash of result. See
|
|
74
|
-
# http://aylien.com/
|
|
74
|
+
# http://docs.aylien.com/docs/classify for more information
|
|
75
75
|
# on the data returned.
|
|
76
76
|
#
|
|
77
77
|
def classify(value=nil, params={})
|
|
@@ -93,7 +93,7 @@ module AylienTextApi
|
|
|
93
93
|
# If set to auto, it'll try to detect the language.
|
|
94
94
|
#
|
|
95
95
|
# @return [Hash, nil] A hash of result. See
|
|
96
|
-
# http://aylien.com/
|
|
96
|
+
# http://docs.aylien.com/docs/concepts for more information
|
|
97
97
|
# on the data returned.
|
|
98
98
|
#
|
|
99
99
|
def concepts(value=nil, params={})
|
|
@@ -113,7 +113,7 @@ module AylienTextApi
|
|
|
113
113
|
# If set to auto, it'll try to detect the language.
|
|
114
114
|
#
|
|
115
115
|
# @return [Hash, nil] A hash of result. See
|
|
116
|
-
# http://aylien.com/
|
|
116
|
+
# http://docs.aylien.com/docs/hashtags for more information
|
|
117
117
|
# on the data returned.
|
|
118
118
|
#
|
|
119
119
|
def hashtags(value=nil, params={})
|
|
@@ -130,9 +130,12 @@ module AylienTextApi
|
|
|
130
130
|
# @param [Hash] params The entities endpoint options
|
|
131
131
|
# @option params [String] :url The URL
|
|
132
132
|
# @option params [String] :text Text
|
|
133
|
+
# @option params [String] :language ('en') Language of text.
|
|
134
|
+
# Valid options are en, de, fr, es, it, pt, and auto.
|
|
135
|
+
# If set to auto, it'll try to detect the language.
|
|
133
136
|
#
|
|
134
137
|
# @return [Hash, nil] A hash of result. See
|
|
135
|
-
# http://aylien.com/
|
|
138
|
+
# http://docs.aylien.com/docs/entities for more information
|
|
136
139
|
# on the data returned.
|
|
137
140
|
#
|
|
138
141
|
def entities(value=nil, params={})
|
|
@@ -150,7 +153,7 @@ module AylienTextApi
|
|
|
150
153
|
# @option params [String] :text Text
|
|
151
154
|
#
|
|
152
155
|
# @return [Hash, nil] A hash of result. See
|
|
153
|
-
# http://aylien.com/
|
|
156
|
+
# http://docs.aylien.com/docs/language for more information
|
|
154
157
|
# on the data returned.
|
|
155
158
|
#
|
|
156
159
|
def language(value=nil, params={})
|
|
@@ -171,7 +174,7 @@ module AylienTextApi
|
|
|
171
174
|
# Valid options are tweet, and document.
|
|
172
175
|
#
|
|
173
176
|
# @return [Hash, nil] A hash of result. See
|
|
174
|
-
# http://aylien.com/
|
|
177
|
+
# http://docs.aylien.com/docs/sentiment for more information
|
|
175
178
|
# on the data returned.
|
|
176
179
|
#
|
|
177
180
|
def sentiment(value=nil, params={})
|
|
@@ -196,9 +199,12 @@ module AylienTextApi
|
|
|
196
199
|
# @option params [Integer] :sentences_percentage Percentage of sentences
|
|
197
200
|
# to be returned. Only in default mode (not applicable to short mode).
|
|
198
201
|
# Possible range is 1-100.
|
|
202
|
+
# @option params [String] :language ('en') Language of text.
|
|
203
|
+
# Valid options are en, de, fr, es, it, pt, and auto.
|
|
204
|
+
# If set to auto, it'll try to detect the language.
|
|
199
205
|
#
|
|
200
206
|
# @return [Hash, nil] A hash of result. See
|
|
201
|
-
# http://aylien.com/
|
|
207
|
+
# http://docs.aylien.com/docs/summarize for more information
|
|
202
208
|
# on the data returned.
|
|
203
209
|
#
|
|
204
210
|
def summarize(value=nil, params={})
|
|
@@ -216,7 +222,7 @@ module AylienTextApi
|
|
|
216
222
|
# Max is 100.
|
|
217
223
|
#
|
|
218
224
|
# @return [Hash, nil] A hash of result. See
|
|
219
|
-
# http://aylien.com/
|
|
225
|
+
# http://docs.aylien.com/docs/related for more information
|
|
220
226
|
# on the data returned.
|
|
221
227
|
#
|
|
222
228
|
def related(value=nil, params={})
|
|
@@ -230,9 +236,12 @@ module AylienTextApi
|
|
|
230
236
|
# @param [String] value (nil) URL
|
|
231
237
|
# @param [Hash] params The microformats endpoint options
|
|
232
238
|
# @option params [String] :url The URL
|
|
239
|
+
# @option params [String] :language ('en') Language of text.
|
|
240
|
+
# Valid options are en, de, fr, es, it, pt, and auto.
|
|
241
|
+
# If set to auto, it'll try to detect the language.
|
|
233
242
|
#
|
|
234
243
|
# @return [Hash, nil] A hash of result. See
|
|
235
|
-
# http://aylien.com/
|
|
244
|
+
# http://docs.aylien.com/docs/microformats for more information
|
|
236
245
|
# on the data returned.
|
|
237
246
|
#
|
|
238
247
|
def microformats(value=nil, params={})
|
|
@@ -248,9 +257,11 @@ module AylienTextApi
|
|
|
248
257
|
# @option params [String] :url The URL
|
|
249
258
|
# @option params [String] :text Text
|
|
250
259
|
# @option params [Array<String>] :class Array of classes
|
|
260
|
+
# @option params [Integer] :number_of_concepts Number of intermediary
|
|
261
|
+
# common topics to consider when calculating semantic similarity
|
|
251
262
|
#
|
|
252
263
|
# @return [Hash, nil] A hash of result. See
|
|
253
|
-
# http://aylien.com/
|
|
264
|
+
# http://docs.aylien.com/docs/classify-unsupervised for more information
|
|
254
265
|
# on the data returned.
|
|
255
266
|
#
|
|
256
267
|
def unsupervised_classify(value=nil, params={})
|
|
@@ -259,13 +270,31 @@ module AylienTextApi
|
|
|
259
270
|
Connection.new(endpoint, params, config).request
|
|
260
271
|
end
|
|
261
272
|
|
|
273
|
+
# Runs multiple analysis operations in one API call.
|
|
274
|
+
#
|
|
275
|
+
# @param [String] value (nil) URL or Text
|
|
276
|
+
# @param [Hash] params The Combined endpoint options
|
|
277
|
+
# @option params [String] :url The URL
|
|
278
|
+
# @option params [String] :text Text
|
|
279
|
+
# @option params [Array<String>] :endpoint Array of endpoints
|
|
280
|
+
#
|
|
281
|
+
# @return [Hash, nil] A hash of result. See
|
|
282
|
+
# http://docs.aylien.com/docs/combined for more information
|
|
283
|
+
# on the data returned.
|
|
284
|
+
#
|
|
285
|
+
def combined(value=nil, params={})
|
|
286
|
+
endpoint, params, config = common_endpoint(value, params,
|
|
287
|
+
Configuration::ENDPOINTS[:combined])
|
|
288
|
+
Connection.new(endpoint, params, config).request
|
|
289
|
+
end
|
|
290
|
+
|
|
262
291
|
# Assigns relevant tags to an image.
|
|
263
292
|
#
|
|
264
293
|
# @param [String] value (nil) URL
|
|
265
294
|
# @option params [String] :url The URL
|
|
266
295
|
#
|
|
267
296
|
# @return [Hash, nil] A hash of result. See
|
|
268
|
-
# http://aylien.com/
|
|
297
|
+
# http://docs.aylien.com/docs/image-tags for more information
|
|
269
298
|
# on the data returned.
|
|
270
299
|
#
|
|
271
300
|
def image_tags(value=nil, params={})
|
|
@@ -37,7 +37,8 @@ module AylienTextApi
|
|
|
37
37
|
summarize: 'summarize',
|
|
38
38
|
microformats: 'microformats',
|
|
39
39
|
unsupervised_classify: 'classify/unsupervised',
|
|
40
|
-
image_tags: 'image-tags'
|
|
40
|
+
image_tags: 'image-tags',
|
|
41
|
+
combined: 'combined'
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
# Build accessor methods for every config options so we can do this, for example:
|
|
@@ -63,8 +63,8 @@ module AylienTextApi
|
|
|
63
63
|
request = Net::HTTP::Get.new(@uri.request_uri)
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
-
request['
|
|
67
|
-
request['
|
|
66
|
+
request['X-AYLIEN-TextAPI-Application-ID'] = @config[:app_id]
|
|
67
|
+
request['X-AYLIEN-TextAPI-Application-Key'] = @config[:app_key]
|
|
68
68
|
request['user-agent'] = @config[:user_agent]
|
|
69
69
|
|
|
70
70
|
@request = request
|
|
@@ -12,7 +12,7 @@ http_interactions:
|
|
|
12
12
|
Accept:
|
|
13
13
|
- "*/*"
|
|
14
14
|
User-Agent:
|
|
15
|
-
- Aylien Text API Ruby Gem 0.
|
|
15
|
+
- Aylien Text API Ruby Gem 0.3.0
|
|
16
16
|
Content-Type:
|
|
17
17
|
- application/x-www-form-urlencoded
|
|
18
18
|
response:
|
|
@@ -23,7 +23,7 @@ http_interactions:
|
|
|
23
23
|
Server:
|
|
24
24
|
- openresty/1.7.7.2
|
|
25
25
|
Date:
|
|
26
|
-
-
|
|
26
|
+
- Thu, 06 Aug 2015 16:59:18 GMT
|
|
27
27
|
Content-Type:
|
|
28
28
|
- text/plain; charset=us-ascii
|
|
29
29
|
Transfer-Encoding:
|
|
@@ -34,5 +34,5 @@ http_interactions:
|
|
|
34
34
|
encoding: UTF-8
|
|
35
35
|
string: Authentication parameters missing
|
|
36
36
|
http_version:
|
|
37
|
-
recorded_at:
|
|
37
|
+
recorded_at: Thu, 06 Aug 2015 16:59:18 GMT
|
|
38
38
|
recorded_with: VCR 2.9.3
|
|
@@ -12,12 +12,12 @@ http_interactions:
|
|
|
12
12
|
Accept:
|
|
13
13
|
- "*/*"
|
|
14
14
|
User-Agent:
|
|
15
|
-
- Aylien Text API Ruby Gem 0.
|
|
15
|
+
- Aylien Text API Ruby Gem 0.3.0
|
|
16
16
|
Content-Type:
|
|
17
17
|
- application/x-www-form-urlencoded
|
|
18
|
-
|
|
18
|
+
X-Aylien-Textapi-Application-Id:
|
|
19
19
|
- "<PASSWORD>"
|
|
20
|
-
|
|
20
|
+
X-Aylien-Textapi-Application-Key:
|
|
21
21
|
- "<PASSWORD>"
|
|
22
22
|
response:
|
|
23
23
|
status:
|
|
@@ -27,22 +27,31 @@ http_interactions:
|
|
|
27
27
|
Server:
|
|
28
28
|
- openresty/1.7.7.2
|
|
29
29
|
Date:
|
|
30
|
-
-
|
|
30
|
+
- Thu, 06 Aug 2015 16:59:18 GMT
|
|
31
31
|
Content-Type:
|
|
32
32
|
- application/json;charset=UTF-8
|
|
33
33
|
Content-Length:
|
|
34
|
-
- '
|
|
34
|
+
- '219'
|
|
35
35
|
Connection:
|
|
36
36
|
- keep-alive
|
|
37
37
|
X-Ratelimit-Limit:
|
|
38
38
|
- '207000'
|
|
39
39
|
X-Ratelimit-Remaining:
|
|
40
|
-
- '
|
|
40
|
+
- '206166'
|
|
41
41
|
X-Ratelimit-Reset:
|
|
42
|
-
- '
|
|
42
|
+
- '1438905600'
|
|
43
43
|
body:
|
|
44
44
|
encoding: UTF-8
|
|
45
|
-
string:
|
|
45
|
+
string: |-
|
|
46
|
+
{
|
|
47
|
+
"error": "requirement failed: either text or url is required",
|
|
48
|
+
"errors": [{
|
|
49
|
+
"reason": "required",
|
|
50
|
+
"message": "either text or url is required",
|
|
51
|
+
"locationType": "parameter",
|
|
52
|
+
"location": "text"
|
|
53
|
+
}]
|
|
54
|
+
}
|
|
46
55
|
http_version:
|
|
47
|
-
recorded_at:
|
|
56
|
+
recorded_at: Thu, 06 Aug 2015 16:59:18 GMT
|
|
48
57
|
recorded_with: VCR 2.9.3
|
|
@@ -12,12 +12,12 @@ http_interactions:
|
|
|
12
12
|
Accept:
|
|
13
13
|
- "*/*"
|
|
14
14
|
User-Agent:
|
|
15
|
-
- Aylien Text API Ruby Gem 0.
|
|
15
|
+
- Aylien Text API Ruby Gem 0.3.0
|
|
16
16
|
Content-Type:
|
|
17
17
|
- application/x-www-form-urlencoded
|
|
18
|
-
|
|
18
|
+
X-Aylien-Textapi-Application-Id:
|
|
19
19
|
- "<PASSWORD>"
|
|
20
|
-
|
|
20
|
+
X-Aylien-Textapi-Application-Key:
|
|
21
21
|
- "<PASSWORD>"
|
|
22
22
|
response:
|
|
23
23
|
status:
|
|
@@ -27,7 +27,7 @@ http_interactions:
|
|
|
27
27
|
Server:
|
|
28
28
|
- openresty/1.7.7.2
|
|
29
29
|
Date:
|
|
30
|
-
-
|
|
30
|
+
- Thu, 06 Aug 2015 16:59:19 GMT
|
|
31
31
|
Content-Type:
|
|
32
32
|
- application/json;charset=UTF-8
|
|
33
33
|
Content-Length:
|
|
@@ -37,9 +37,9 @@ http_interactions:
|
|
|
37
37
|
X-Ratelimit-Limit:
|
|
38
38
|
- '207000'
|
|
39
39
|
X-Ratelimit-Remaining:
|
|
40
|
-
- '
|
|
40
|
+
- '206164'
|
|
41
41
|
X-Ratelimit-Reset:
|
|
42
|
-
- '
|
|
42
|
+
- '1438905600'
|
|
43
43
|
body:
|
|
44
44
|
encoding: UTF-8
|
|
45
45
|
string: |-
|
|
@@ -53,5 +53,5 @@ http_interactions:
|
|
|
53
53
|
}]
|
|
54
54
|
}
|
|
55
55
|
http_version:
|
|
56
|
-
recorded_at:
|
|
56
|
+
recorded_at: Thu, 06 Aug 2015 16:59:19 GMT
|
|
57
57
|
recorded_with: VCR 2.9.3
|
|
@@ -12,12 +12,12 @@ http_interactions:
|
|
|
12
12
|
Accept:
|
|
13
13
|
- "*/*"
|
|
14
14
|
User-Agent:
|
|
15
|
-
- Aylien Text API Ruby Gem 0.
|
|
15
|
+
- Aylien Text API Ruby Gem 0.3.0
|
|
16
16
|
Content-Type:
|
|
17
17
|
- application/x-www-form-urlencoded
|
|
18
|
-
|
|
18
|
+
X-Aylien-Textapi-Application-Id:
|
|
19
19
|
- random_string
|
|
20
|
-
|
|
20
|
+
X-Aylien-Textapi-Application-Key:
|
|
21
21
|
- random_string
|
|
22
22
|
response:
|
|
23
23
|
status:
|
|
@@ -27,7 +27,7 @@ http_interactions:
|
|
|
27
27
|
Server:
|
|
28
28
|
- openresty/1.7.7.2
|
|
29
29
|
Date:
|
|
30
|
-
-
|
|
30
|
+
- Thu, 06 Aug 2015 16:59:17 GMT
|
|
31
31
|
Content-Type:
|
|
32
32
|
- text/plain; charset=us-ascii
|
|
33
33
|
Transfer-Encoding:
|
|
@@ -38,5 +38,5 @@ http_interactions:
|
|
|
38
38
|
encoding: UTF-8
|
|
39
39
|
string: Authentication failed
|
|
40
40
|
http_version:
|
|
41
|
-
recorded_at:
|
|
41
|
+
recorded_at: Thu, 06 Aug 2015 16:59:17 GMT
|
|
42
42
|
recorded_with: VCR 2.9.3
|
|
@@ -12,12 +12,12 @@ http_interactions:
|
|
|
12
12
|
Accept:
|
|
13
13
|
- "*/*"
|
|
14
14
|
User-Agent:
|
|
15
|
-
- Aylien Text API Ruby Gem 0.
|
|
15
|
+
- Aylien Text API Ruby Gem 0.3.0
|
|
16
16
|
Content-Type:
|
|
17
17
|
- application/x-www-form-urlencoded
|
|
18
|
-
|
|
18
|
+
X-Aylien-Textapi-Application-Id:
|
|
19
19
|
- "<PASSWORD>"
|
|
20
|
-
|
|
20
|
+
X-Aylien-Textapi-Application-Key:
|
|
21
21
|
- "<PASSWORD>"
|
|
22
22
|
response:
|
|
23
23
|
status:
|
|
@@ -27,7 +27,7 @@ http_interactions:
|
|
|
27
27
|
Server:
|
|
28
28
|
- openresty/1.7.7.2
|
|
29
29
|
Date:
|
|
30
|
-
-
|
|
30
|
+
- Thu, 06 Aug 2015 16:59:17 GMT
|
|
31
31
|
Content-Type:
|
|
32
32
|
- application/json;charset=UTF-8
|
|
33
33
|
Content-Length:
|
|
@@ -37,9 +37,9 @@ http_interactions:
|
|
|
37
37
|
X-Ratelimit-Limit:
|
|
38
38
|
- '207000'
|
|
39
39
|
X-Ratelimit-Remaining:
|
|
40
|
-
- '
|
|
40
|
+
- '206167'
|
|
41
41
|
X-Ratelimit-Reset:
|
|
42
|
-
- '
|
|
42
|
+
- '1438905600'
|
|
43
43
|
body:
|
|
44
44
|
encoding: ASCII-8BIT
|
|
45
45
|
string: !binary |-
|
|
@@ -142,5 +142,5 @@ http_interactions:
|
|
|
142
142
|
aG5vbG9neSIsCiAgICAiY29kZSI6ICIwNDAwMzAwMCIsCiAgICAiY29uZmlk
|
|
143
143
|
ZW5jZSI6IDEuMAogIH1dCn0=
|
|
144
144
|
http_version:
|
|
145
|
-
recorded_at:
|
|
145
|
+
recorded_at: Thu, 06 Aug 2015 16:59:17 GMT
|
|
146
146
|
recorded_with: VCR 2.9.3
|
|
@@ -12,12 +12,12 @@ http_interactions:
|
|
|
12
12
|
Accept:
|
|
13
13
|
- "*/*"
|
|
14
14
|
User-Agent:
|
|
15
|
-
- Aylien Text API Ruby Gem 0.
|
|
15
|
+
- Aylien Text API Ruby Gem 0.3.0
|
|
16
16
|
Content-Type:
|
|
17
17
|
- application/x-www-form-urlencoded
|
|
18
|
-
|
|
18
|
+
X-Aylien-Textapi-Application-Id:
|
|
19
19
|
- "<PASSWORD>"
|
|
20
|
-
|
|
20
|
+
X-Aylien-Textapi-Application-Key:
|
|
21
21
|
- "<PASSWORD>"
|
|
22
22
|
response:
|
|
23
23
|
status:
|
|
@@ -27,7 +27,7 @@ http_interactions:
|
|
|
27
27
|
Server:
|
|
28
28
|
- openresty/1.7.7.2
|
|
29
29
|
Date:
|
|
30
|
-
-
|
|
30
|
+
- Thu, 06 Aug 2015 16:59:19 GMT
|
|
31
31
|
Content-Type:
|
|
32
32
|
- application/json;charset=UTF-8
|
|
33
33
|
Content-Length:
|
|
@@ -37,9 +37,9 @@ http_interactions:
|
|
|
37
37
|
X-Ratelimit-Limit:
|
|
38
38
|
- '207000'
|
|
39
39
|
X-Ratelimit-Remaining:
|
|
40
|
-
- '
|
|
40
|
+
- '206165'
|
|
41
41
|
X-Ratelimit-Reset:
|
|
42
|
-
- '
|
|
42
|
+
- '1438905600'
|
|
43
43
|
body:
|
|
44
44
|
encoding: UTF-8
|
|
45
45
|
string: |-
|
|
@@ -53,5 +53,5 @@ http_interactions:
|
|
|
53
53
|
}]
|
|
54
54
|
}
|
|
55
55
|
http_version:
|
|
56
|
-
recorded_at:
|
|
56
|
+
recorded_at: Thu, 06 Aug 2015 16:59:19 GMT
|
|
57
57
|
recorded_with: VCR 2.9.3
|