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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8487e165b7668a953e8b493bc36527e928013298fab2276c40f7273aa644940f
4
- data.tar.gz: cc2475d21701312f3c9d988dbd95aeee5b83be4f9760fbc95cd78055004fa34b
3
+ metadata.gz: 1e90cb306466c21bc1a3ea7f1b20aa847caa6d35407b5994b9b116693a9ac8c6
4
+ data.tar.gz: 2a8d78cd61c7273c56382ca000f56f26ebc7f33701625c58f2236feade30fe3f
5
5
  SHA512:
6
- metadata.gz: 7e83c9489fb812e2a8fbf2a0fdc36052d82cf7d2fc67ee88439f4a562a6ffacacdc0c1ab14bde1d178d8ac83ea2cc7d784481e2a5f062b287e61815a4a7987ab
7
- data.tar.gz: c7a7281d7b4bf1b812ccdff279e03412d41e474bec546f4a3e9093a6a31d4629d359af937e7ea202e3b75d190ae6ef1394034c41ab981c34ac6bd58b5f5c177d
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
- 'retry_after' => to_number(response.headers['Retry-After']),
104
- 'rate_limit' => to_number(response.headers['X-RateLimit-Limit']),
105
- 'rateLimit_reset' => to_number(response.headers['X-RateLimit-Reset']),
106
- 'total_limit' => to_number(response.headers['X-TotalLimit-Limit']),
107
- 'total_limit_remaining' => to_number(response.headers['X-RateLimit-Remaining']),
108
- 'search_limit_remaining' => to_number(response.headers['X-SearchLimit-Remaining']),
109
- 'enrich_company_limit_remaining' => to_number(response.headers['X-EnrichCompanyLimit-Remaining']),
110
- 'person_identify_limit_remaining' => to_number(response.headers['X-PersonIdentifyLimit-Remaining'])
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
@@ -1,3 +1,3 @@
1
1
  module Peopledatalabs
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
@@ -13,7 +13,7 @@ require 'peopledatalabs/resources/bulk'
13
13
 
14
14
 
15
15
  # gem build peopledatalabs.gemspec
16
- # gem install ./peopledatalabs-1.0.2.gem
16
+ # gem install ./peopledatalabs-1.0.4.gem
17
17
  # irb
18
18
  # require 'peopledatalabs'
19
19
  # rake spec PDL_API_KEY=API_KEY
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.3
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-05-18 00:00:00.000000000 Z
11
+ date: 2022-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler