aylien_text_api 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aylien_text_api/connection.rb +7 -3
- data/lib/aylien_text_api/version.rb +1 -1
- metadata +1 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09993e8546c5922ae46dd06032296cecf47f37b7
|
4
|
+
data.tar.gz: 898af691bf87d6db20eb28fd0dfea314b63de681
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4621c72ee93f2170b6f3852b6db64ac31c8ec5a05319774d97847e3bee607d275b7b1d4d67a5cc55c30702093596e5ebc038111a8b6fcc86226a7c38fc37455
|
7
|
+
data.tar.gz: a0be785b22f55687fb1e33c15ee639dd5abf02e2948e66fa5bfc1a5d5297be3269f9e584abbb69c569cc76cd17ac548c8953a50513ecd7adb0595bd79e59a463
|
@@ -43,10 +43,14 @@ module AylienTextApi
|
|
43
43
|
Net::HTTP.start(@uri.host, @uri.port, use_ssl: (@uri.scheme == 'https')) do |http|
|
44
44
|
response = http.request(@request)
|
45
45
|
|
46
|
+
limit = response["X-RateLimit-Limit"]
|
47
|
+
remaining = response["X-RateLimit-Remaining"]
|
48
|
+
reset = response["X-RateLimit-Reset"]
|
49
|
+
|
46
50
|
@rate_limits = {
|
47
|
-
limit:
|
48
|
-
remaining:
|
49
|
-
reset:
|
51
|
+
limit: limit ? limit.to_i : nil,
|
52
|
+
remaining: remaining ? remaining.to_i : nil,
|
53
|
+
reset: reset ? reset.to_i : nil
|
50
54
|
}
|
51
55
|
|
52
56
|
if response.kind_of?(Net::HTTPSuccess)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aylien_text_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aylien Inc.
|
@@ -79,7 +79,6 @@ extra_rdoc_files: []
|
|
79
79
|
files:
|
80
80
|
- ".gitignore"
|
81
81
|
- Gemfile
|
82
|
-
- Gemfile.lock
|
83
82
|
- LICENSE
|
84
83
|
- README.md
|
85
84
|
- Rakefile
|