peopledatalabs 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/peopledatalabs/api_resource.rb +20 -8
- data/lib/peopledatalabs/version.rb +1 -1
- data/lib/peopledatalabs.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e90cb306466c21bc1a3ea7f1b20aa847caa6d35407b5994b9b116693a9ac8c6
|
4
|
+
data.tar.gz: 2a8d78cd61c7273c56382ca000f56f26ebc7f33701625c58f2236feade30fe3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6bf87839450649eb8a335c66a5da21bf7014fb6355a47f578a09faf5d9c98d04d029fda1191c999a50eed808c7b99523414b75b3ad3e6a6e7baba6b244b1bc2
|
7
|
+
data.tar.gz: 3d3882243f63423c55ab43ee2c240c836777dbf450e0c9cdd07c9be12e5a04246d9504565259a7e093bf8f7689282501432a98c4b9b888ba5d5c6dd47c1bb386
|
@@ -99,15 +99,27 @@ module Peopledatalabs
|
|
99
99
|
# 'data' => response.parse
|
100
100
|
# }
|
101
101
|
|
102
|
+
rate_limit_remaining = response.headers['X-RateLimit-Remaining'] ? JSON.parse(response.headers['X-RateLimit-Remaining'].gsub("'",'"')) : {}
|
103
|
+
rate_limit_limit = response.headers['X-RateLimit-Limit'] ? JSON.parse(response.headers['X-RateLimit-Limit'].gsub("'",'"')) : {}
|
104
|
+
|
102
105
|
rate_limit = {
|
103
|
-
'
|
104
|
-
'
|
105
|
-
'
|
106
|
-
'
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
106
|
+
'call_credits_spent' => to_number(response.headers['X-Call-Credits-Spent']),
|
107
|
+
'call_credits_type' => response.headers['X-Call-Credits-Type'],
|
108
|
+
'rate_limit_reset' => response.headers['X-RateLimit-Reset'],
|
109
|
+
'rate_limit_remaining' => {
|
110
|
+
'minute' => to_number(rate_limit_remaining['minute']),
|
111
|
+
'day' => to_number(rate_limit_remaining['day']),
|
112
|
+
'month' => to_number(rate_limit_remaining['month'])
|
113
|
+
},
|
114
|
+
'rate_limit_limit' => {
|
115
|
+
'minute' => to_number(rate_limit_limit['minute']),
|
116
|
+
'day' => to_number(rate_limit_limit['day']),
|
117
|
+
'month' => to_number(rate_limit_limit['month'])
|
118
|
+
},
|
119
|
+
'lifetime_used' => to_number(response.headers['X-Lifetime-Used']),
|
120
|
+
'total_limit_remaining' => to_number(response.headers['X-TotalLimit-Remaining']),
|
121
|
+
'total_limit_purchased_remaining' => to_number(response.headers['X-TotalLimit-Purchased-Remaining']),
|
122
|
+
'total_limit_overages_remaining' => to_number(response.headers['X-TotalLimit-Overages-Remaining'])
|
111
123
|
}
|
112
124
|
|
113
125
|
parsed_response = response.parse
|
data/lib/peopledatalabs.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: peopledatalabs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- People Data Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|