peopledatalabs 1.0.0 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fb77aedefcc1a398eda2c13ba723c6c621644b69149946599f33fea1c776f90
4
- data.tar.gz: 237971300ff900343783aed2a61d420afbaa066ec455db221309e68109cee4e8
3
+ metadata.gz: 8487e165b7668a953e8b493bc36527e928013298fab2276c40f7273aa644940f
4
+ data.tar.gz: cc2475d21701312f3c9d988dbd95aeee5b83be4f9760fbc95cd78055004fa34b
5
5
  SHA512:
6
- metadata.gz: b2dd9f3206c667e2b707838b9110325602bf872aa54db0acaa06c5914c0a0ceefe3d76892b41d3ee1b2a24e0c6d2a18492381b0c8f4690cbe3249735ae666b88
7
- data.tar.gz: 43ebb2f98b0b9416d24e43c043e87175894f4c4bc233865d02943845ce89d2abff8b22d5939ee20a871bb17e375360a1e40c925cd1941cb79c5e58f20f6180eb
6
+ metadata.gz: 7e83c9489fb812e2a8fbf2a0fdc36052d82cf7d2fc67ee88439f4a562a6ffacacdc0c1ab14bde1d178d8ac83ea2cc7d784481e2a5f062b287e61815a4a7987ab
7
+ data.tar.gz: c7a7281d7b4bf1b812ccdff279e03412d41e474bec546f4a3e9093a6a31d4629d359af937e7ea202e3b75d190ae6ef1394034c41ab981c34ac6bd58b5f5c177d
@@ -23,6 +23,6 @@ jobs:
23
23
  run: |
24
24
  gem install bundler
25
25
  bundle install
26
- gem build peopledatalabs.gemspec
27
- gem install ./peopledatalabs-1.0.0.gem
26
+ gem build *.gemspec
27
+ gem install *.gem
28
28
  rake spec
data/README.md CHANGED
@@ -5,13 +5,13 @@
5
5
  <p align="center">Official Ruby client for the People Data Labs API.</p>
6
6
 
7
7
  <p align="center">
8
- <a href="">
8
+ <a href="https://github.com/peopledatalabs/peopledatalabs-ruby">
9
9
  <img src="https://img.shields.io/badge/repo%20status-Active-limegreen" alt="Repo Status">
10
10
  </a>&nbsp;
11
11
  <a href="https://rubygems.org/gems/peopledatalabs">
12
- <img src="https://img.shields.io/gem/v/twilio-ruby.svg" alt="People Data Labs on RubyGems" />
12
+ <img src="https://img.shields.io/gem/v/peopledatalabs.svg" alt="People Data Labs on RubyGems" />
13
13
  </a>&nbsp;
14
- <a href="">
14
+ <a href="https://github.com/peopledatalabs/peopledatalabs-ruby/actions/workflows/test.yaml">
15
15
  <img src="https://github.com/peopledatalabs/peopledatalabs-ruby/actions/workflows/test.yaml/badge.svg" alt="Tests Status" />
16
16
  </a>
17
17
  </p>
@@ -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,11 @@ module Peopledatalabs
11
11
  'pretty' => pretty,
12
12
  };
13
13
 
14
- # headers = { 'Accept-Encoding' => 'gzip' }
15
- get(path: '/v5/autocomplete', params: params)
14
+ headers = {
15
+ 'Accept-Encoding' => 'gzip',
16
+ 'User-Agent' => 'PDL-RUBY-SDK',
17
+ }
18
+ get(path: '/v5/autocomplete', headers: headers, params: params)
16
19
  end
17
20
  end
18
21
  end
@@ -3,9 +3,11 @@
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 = {
7
+ 'Accept-Encoding' => 'gzip',
8
+ 'User-Agent' => 'PDL-RUBY-SDK',
9
+ }
10
+ post(path: '/v5/person/bulk', headers: headers, body: params)
9
11
  end
10
12
  end
11
13
  end
@@ -3,21 +3,27 @@
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 = {
7
+ 'Accept-Encoding' => 'gzip',
8
+ 'User-Agent' => 'PDL-RUBY-SDK',
9
+ }
10
+ get(path: '/v5/company/clean', headers: headers, params: { kind => value })
9
11
  end
10
12
 
11
13
  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 })
14
+ headers = {
15
+ 'Accept-Encoding' => 'gzip',
16
+ 'User-Agent' => 'PDL-RUBY-SDK',
17
+ }
18
+ get(path: '/v5/school/clean', headers: headers, params: { kind => value })
15
19
  end
16
20
 
17
21
  def self.location(value:)
18
- # TODO: possibly add gzip encoding
19
- # headers = { 'Accept-Encoding' => 'gzip' }
20
- get(path: '/v5/location/clean', params: { 'location' => value })
22
+ headers = {
23
+ 'Accept-Encoding' => 'gzip',
24
+ 'User-Agent' => 'PDL-RUBY-SDK',
25
+ }
26
+ get(path: '/v5/location/clean', headers: headers, params: { 'location' => value })
21
27
  end
22
28
 
23
29
 
@@ -3,15 +3,19 @@
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 = {
7
+ 'Accept-Encoding' => 'gzip',
8
+ 'User-Agent' => 'PDL-RUBY-SDK',
9
+ }
10
+ get(path: '/v5/person/enrich', headers: headers, params: params)
9
11
  end
10
12
 
11
13
  def self.company(params:)
12
- # TODO: possibly add gzip encoding
13
- # headers = { 'Accept-Encoding' => 'gzip' }
14
- get(path: '/v5/company/enrich', params: params)
14
+ headers = {
15
+ 'Accept-Encoding' => 'gzip',
16
+ 'User-Agent' => 'PDL-RUBY-SDK',
17
+ }
18
+ get(path: '/v5/company/enrich', headers: headers, params: params)
15
19
  end
16
20
 
17
21
  end
@@ -3,9 +3,11 @@
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 = {
7
+ 'Accept-Encoding' => 'gzip',
8
+ 'User-Agent' => 'PDL-RUBY-SDK',
9
+ }
10
+ get(path: '/v5/person/identify', headers: headers, params: params)
9
11
  end
10
12
  end
11
13
  end
@@ -3,9 +3,11 @@
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 = {
7
+ 'Accept-Encoding' => 'gzip',
8
+ 'User-Agent' => 'PDL-RUBY-SDK',
9
+ }
10
+ get(path: "/v5/person/retrieve/#{person_id}", headers: headers, params: { 'pretty' => pretty })
9
11
  end
10
12
  end
11
13
  end
@@ -26,16 +26,18 @@ module Peopledatalabs
26
26
 
27
27
  body = {
28
28
  searchType === 'sql' ? 'sql' : 'query' => query,
29
- dataset => dataset,
30
- size => size,
31
- pretty => pretty,
32
- titlecase => titlecase,
33
- scroll_token => scroll_token
29
+ 'dataset' => dataset,
30
+ 'size' => size,
31
+ 'pretty' => pretty,
32
+ 'titlecase' => titlecase,
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 = {
37
+ 'Accept-Encoding' => 'gzip',
38
+ 'User-Agent' => 'PDL-RUBY-SDK',
39
+ }
40
+ post(path: "/v5/#{kind}/search", headers: headers, body: body)
39
41
  end
40
42
  end
41
43
  end
@@ -1,3 +1,3 @@
1
1
  module Peopledatalabs
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.3"
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.0
4
+ version: 1.0.3
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-12 00:00:00.000000000 Z
11
+ date: 2022-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler