peopledatalabs 1.0.1 → 1.0.2

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: 00bee237df859992458f8e1e420294d97a071272a0640b9e62dc7fe65dfefdb0
4
- data.tar.gz: 11488fb8d2d2646f83e0d3b28e43f6d225dfcc0296310b1f0b337fe84a5b25d2
3
+ metadata.gz: d078a93c2dc3607c0ccd632210a451f0f7f56bf1f1fd20a886cb9935af5113ac
4
+ data.tar.gz: be3d3ddc4de6b359a0fa78ddd0466e9e14e7ab28c9a38a5080e61eee8b6a2d80
5
5
  SHA512:
6
- metadata.gz: cb2e9f36ddb22894e7e8d618e02fd51f901488f4ff9c32a980446d0c8d905039fa76ea50f4c651dad146576263596a9b259ccb3f4dd6b766c3b7ef34d9abe4bc
7
- data.tar.gz: 664d7043864a6425fedfdbb592b7bca097ef39effd1d3691a38e98aaa07426c9d1ce418303945cb503e663f45542a741e0a7cb332266ae4c2454793724915b02
6
+ metadata.gz: 40214ff087b274b0ab09f33e83372c5290842eae8adf16ccf38593173d3f6bf9f569a3b9fd2a9450950ab153fa0efccd7bafce7e640b392e9d6ace0d61b046df
7
+ data.tar.gz: aa161a86391ec1c03a2828290792e0d56c35e6776a4306befdc25184b079a8d4c8bfbf2ec08e27743621b6fa388964ef2015dc18f4890adbad8699b63b37393c
@@ -10,9 +10,10 @@ module Peopledatalabs
10
10
  return request unless request['status'] == 200
11
11
 
12
12
  response = HTTP
13
- .timeout(Peopledatalabs.read_timeout)
14
- .headers(headers)
15
- .get(url(path), params: query_authentication(params))
13
+ .use(:auto_inflate)
14
+ .timeout(Peopledatalabs.read_timeout)
15
+ .headers(headers)
16
+ .get(url(path), params: query_authentication(params))
16
17
  handle_response(response)
17
18
  end
18
19
 
@@ -21,9 +22,10 @@ module Peopledatalabs
21
22
  return request unless request['status'] == 200
22
23
 
23
24
  response = HTTP
24
- .timeout(Peopledatalabs.read_timeout)
25
- .headers(header_authentication(headers))
26
- .post(url(path), json: body)
25
+ .use(:auto_inflate)
26
+ .timeout(Peopledatalabs.read_timeout)
27
+ .headers(header_authentication(headers))
28
+ .post(url(path), json: body)
27
29
  handle_response(response)
28
30
  end
29
31
 
@@ -11,8 +11,8 @@ module Peopledatalabs
11
11
  'pretty' => pretty,
12
12
  };
13
13
 
14
- # headers = { 'Accept-Encoding' => 'gzip' }
15
- get(path: '/v5/autocomplete', params: params)
14
+ headers = { 'Accept-Encoding' => 'gzip' }
15
+ get(path: '/v5/autocomplete', headers: headers, params: params)
16
16
  end
17
17
  end
18
18
  end
@@ -3,9 +3,8 @@
3
3
  module Peopledatalabs
4
4
  class Bulk < APIResource
5
5
  def self.people(params:)
6
- # TODO: possibly add gzip encoding
7
- # headers = { 'Accept-Encoding' => 'gzip' }
8
- post(path: '/v5/person/bulk', body: params)
6
+ headers = { 'Accept-Encoding' => 'gzip' }
7
+ post(path: '/v5/person/bulk', headers: headers, body: params)
9
8
  end
10
9
  end
11
10
  end
@@ -3,21 +3,18 @@
3
3
  module Peopledatalabs
4
4
  class Cleaner < APIResource
5
5
  def self.company(kind:, value:)
6
- # TODO: possibly add gzip encoding
7
- # headers = { 'Accept-Encoding' => 'gzip' }
8
- get(path: '/v5/company/clean', params: { kind => value })
6
+ headers = { 'Accept-Encoding' => 'gzip' }
7
+ get(path: '/v5/company/clean', headers: headers, params: { kind => value })
9
8
  end
10
9
 
11
10
  def self.school(kind:, value:)
12
- # TODO: possibly add gzip encoding
13
- # headers = { 'Accept-Encoding' => 'gzip' }
14
- get(path: '/v5/school/clean', params: { kind => value })
11
+ headers = { 'Accept-Encoding' => 'gzip' }
12
+ get(path: '/v5/school/clean', headers: headers, params: { kind => value })
15
13
  end
16
14
 
17
15
  def self.location(value:)
18
- # TODO: possibly add gzip encoding
19
- # headers = { 'Accept-Encoding' => 'gzip' }
20
- get(path: '/v5/location/clean', params: { 'location' => value })
16
+ headers = { 'Accept-Encoding' => 'gzip' }
17
+ get(path: '/v5/location/clean', headers: headers, params: { 'location' => value })
21
18
  end
22
19
 
23
20
 
@@ -3,15 +3,13 @@
3
3
  module Peopledatalabs
4
4
  class Enrichment < APIResource
5
5
  def self.person(params:)
6
- # TODO: possibly add gzip encoding
7
- # headers = { 'Accept-Encoding' => 'gzip' }
8
- get(path: '/v5/person/enrich', params: params)
6
+ headers = { 'Accept-Encoding' => 'gzip' }
7
+ get(path: '/v5/person/enrich', headers: headers, params: params)
9
8
  end
10
9
 
11
10
  def self.company(params:)
12
- # TODO: possibly add gzip encoding
13
- # headers = { 'Accept-Encoding' => 'gzip' }
14
- get(path: '/v5/company/enrich', params: params)
11
+ headers = { 'Accept-Encoding' => 'gzip' }
12
+ get(path: '/v5/company/enrich', headers: headers, params: params)
15
13
  end
16
14
 
17
15
  end
@@ -3,9 +3,8 @@
3
3
  module Peopledatalabs
4
4
  class Identify < APIResource
5
5
  def self.person(params:)
6
- # TODO: possibly add gzip encoding
7
- # headers = { 'Accept-Encoding' => 'gzip' }
8
- get(path: '/v5/person/identify', params: params)
6
+ headers = { 'Accept-Encoding' => 'gzip' }
7
+ get(path: '/v5/person/identify', headers: headers, params: params)
9
8
  end
10
9
  end
11
10
  end
@@ -3,9 +3,8 @@
3
3
  module Peopledatalabs
4
4
  class Retrieve < APIResource
5
5
  def self.person(person_id:, pretty: false)
6
- # TODO: possibly add gzip encoding
7
- # headers = { 'Accept-Encoding' => 'gzip' }
8
- get(path: "/v5/person/retrieve/#{person_id}", params: { 'pretty' => pretty })
6
+ headers = { 'Accept-Encoding' => 'gzip' }
7
+ get(path: "/v5/person/retrieve/#{person_id}", headers: headers, params: { 'pretty' => pretty })
9
8
  end
10
9
  end
11
10
  end
@@ -33,9 +33,8 @@ module Peopledatalabs
33
33
  'scroll_token' => scroll_token
34
34
  }
35
35
 
36
- # TODO: possibly add gzip encoding
37
- # headers = { 'Accept-Encoding' => 'gzip' }
38
- post(path: "/v5/#{kind}/search", body: body)
36
+ headers = { 'Accept-Encoding' => 'gzip' }
37
+ post(path: "/v5/#{kind}/search", headers: headers, body: body)
39
38
  end
40
39
  end
41
40
  end
@@ -1,3 +1,3 @@
1
1
  module Peopledatalabs
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -13,9 +13,10 @@ require 'peopledatalabs/resources/bulk'
13
13
 
14
14
 
15
15
  # gem build peopledatalabs.gemspec
16
- # gem install ./peopledatalabs-1.0.0.gem
16
+ # gem install ./peopledatalabs-1.0.2.gem
17
17
  # irb
18
18
  # require 'peopledatalabs'
19
+ # rake spec PDL_API_KEY=API_KEY
19
20
 
20
21
  # Usage
21
22
  # First set 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.1
4
+ version: 1.0.2
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-14 00:00:00.000000000 Z
11
+ date: 2022-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler