peopledatalabs 5.1.0 → 5.2.1

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: cc327ade0fbbe968091adf587820dda7a6e6d34eebee8ac2632a6c93bd668fd1
4
- data.tar.gz: ea094e4553662d9a933a83560f02c0adfbebc88905609dd841e45a5703a6bde6
3
+ metadata.gz: 4706a0e973a7fbf0edaf2af4a09bc2410bfb1cebf6a0614f8e5b49438934b99c
4
+ data.tar.gz: 5cc23af16d53e113ec46996925d2b6da3154d970e19a15dea7b655e20feee84c
5
5
  SHA512:
6
- metadata.gz: dd8c4fbadd844ea387a48ad797ef45eb6350de9fc6dec3a94dfd2e11cf2cf5eb714cfb3aaa5dab80fcf268c397806687933f9043c2c2e14ed76fbec678893e44
7
- data.tar.gz: f3fd743fc01ed962f4595997963e6412b032582e5a8325225bd0018014de93974faf76b63df1cb2aefc49d96439973c6dfe0dca1ad946fce361e3088d20c58e5
6
+ metadata.gz: 00635f74cdaa0a68b7c20bebdccaef4afbd0723f871eaa6b94ea13ea569b7334e3a134761e175a48b1374a24daf696e9eb4f878092d0c3df5deaf962ddcdfd92
7
+ data.tar.gz: 4721ccafcc7da398757f1ee01b8ad4326f8f4c39707b308d37ea1a55a2415a1889634d0df5a33a4b41f5a3f9faef9e4009635d2e027351d33ab3bc15e7caef33
data/README.md CHANGED
@@ -79,6 +79,9 @@ Peopledatalabs::Retrieve.person(person_id: 'qEnOZ5Oh0poWnQ1luFBfVw_0000')
79
79
 
80
80
  # By Fuzzy Enrichment
81
81
  Peopledatalabs::Identify.person(params: { name: 'sean thorne' })
82
+
83
+ # By Changelog
84
+ Peopledatalabs::Changelog.person(params: { current_version: '31.0', origin_version: '30.2', type: 'updated' })
82
85
  ```
83
86
 
84
87
  **Using Company APIs**
@@ -142,6 +145,7 @@ Peopledatalabs.sandbox = true
142
145
  | [Person Search API](https://docs.peopledatalabs.com/docs/search-api) | `Peopledatalabs::Search.person(...params)` |
143
146
  | [Person Retrieve API](https://docs.peopledatalabs.com/docs/person-retrieve-api) | `Peopledatalabs::Autocomplete.retrieve(...params)` |
144
147
  | [Person Identify API](https://docs.peopledatalabs.com/docs/identify-api) | `Peopledatalabs::Identify.person(...params)` |
148
+ | [Person Changelog API](https://docs.peopledatalabs.com/docs/person-changelog-api) | `Peopledatalabs::Changelog.person(...params)` |
145
149
 
146
150
  **Company Endpoints**
147
151
  | API Endpoint | peopledatalabs Function |
@@ -91,6 +91,14 @@ module Peopledatalabs
91
91
  if (!field)
92
92
  result = { 'status' => 400, 'message' => 'Missing ip' }
93
93
  end
94
+ elsif path.include? '/changelog'
95
+ current_version = params['current_version']
96
+ origin_version = params['origin_version']
97
+ if !current_version || !origin_version
98
+ result = { 'status' => 400, 'message' => 'Missing current_version or origin_version' }
99
+ elsif !params['ids'] && !params['type']
100
+ result = { 'status' => 400, 'message' => 'Missing ids or type' }
101
+ end
94
102
  end
95
103
  result
96
104
  end
@@ -15,6 +15,7 @@ module Peopledatalabs
15
15
  headers = {
16
16
  'Accept-Encoding' => 'gzip',
17
17
  'User-Agent' => 'PDL-RUBY-SDK',
18
+ 'SDK-Version' => Peopledatalabs::VERSION,
18
19
  }
19
20
  get(path: '/v5/autocomplete', headers: headers, params: params)
20
21
  end
@@ -6,6 +6,7 @@ module Peopledatalabs
6
6
  headers = {
7
7
  'Accept-Encoding' => 'gzip',
8
8
  'User-Agent' => 'PDL-RUBY-SDK',
9
+ 'SDK-Version' => Peopledatalabs::VERSION,
9
10
  }
10
11
  post(path: '/v5/person/bulk', headers: headers, body: params)
11
12
  end
@@ -14,6 +15,7 @@ module Peopledatalabs
14
15
  headers = {
15
16
  'Accept-Encoding' => 'gzip',
16
17
  'User-Agent' => 'PDL-RUBY-SDK',
18
+ 'SDK-Version' => Peopledatalabs::VERSION,
17
19
  }
18
20
  post(path: '/v5/company/enrich/bulk', headers: headers, body: params)
19
21
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Peopledatalabs
4
+ class Changelog < APIResource
5
+ def self.person(params:)
6
+ headers = {
7
+ 'Accept-Encoding' => 'gzip',
8
+ 'User-Agent' => 'PDL-RUBY-SDK',
9
+ 'SDK-Version' => Peopledatalabs::VERSION,
10
+ }
11
+
12
+ stringified_params = params.transform_keys(&:to_s)
13
+
14
+ post(path: '/v5/person/changelog', headers: headers, body: stringified_params)
15
+ end
16
+ end
17
+ end
@@ -6,6 +6,7 @@ module Peopledatalabs
6
6
  headers = {
7
7
  'Accept-Encoding' => 'gzip',
8
8
  'User-Agent' => 'PDL-RUBY-SDK',
9
+ 'SDK-Version' => Peopledatalabs::VERSION,
9
10
  }
10
11
  get(path: '/v5/company/clean', headers: headers, params: { kind => value })
11
12
  end
@@ -14,6 +15,7 @@ module Peopledatalabs
14
15
  headers = {
15
16
  'Accept-Encoding' => 'gzip',
16
17
  'User-Agent' => 'PDL-RUBY-SDK',
18
+ 'SDK-Version' => Peopledatalabs::VERSION,
17
19
  }
18
20
  get(path: '/v5/school/clean', headers: headers, params: { kind => value })
19
21
  end
@@ -22,6 +24,7 @@ module Peopledatalabs
22
24
  headers = {
23
25
  'Accept-Encoding' => 'gzip',
24
26
  'User-Agent' => 'PDL-RUBY-SDK',
27
+ 'SDK-Version' => Peopledatalabs::VERSION,
25
28
  }
26
29
  get(path: '/v5/location/clean', headers: headers, params: { 'location' => value })
27
30
  end
@@ -6,6 +6,7 @@ module Peopledatalabs
6
6
  headers = {
7
7
  'Accept-Encoding' => 'gzip',
8
8
  'User-Agent' => 'PDL-RUBY-SDK',
9
+ 'SDK-Version' => Peopledatalabs::VERSION,
9
10
  }
10
11
  get(path: '/v5/person/enrich', headers: headers, params: params)
11
12
  end
@@ -14,6 +15,7 @@ module Peopledatalabs
14
15
  headers = {
15
16
  'Accept-Encoding' => 'gzip',
16
17
  'User-Agent' => 'PDL-RUBY-SDK',
18
+ 'SDK-Version' => Peopledatalabs::VERSION,
17
19
  }
18
20
  get(path: '/v5/company/enrich', headers: headers, params: params)
19
21
  end
@@ -30,6 +32,7 @@ module Peopledatalabs
30
32
  headers = {
31
33
  'Accept-Encoding' => 'gzip',
32
34
  'User-Agent' => 'PDL-RUBY-SDK',
35
+ 'SDK-Version' => Peopledatalabs::VERSION,
33
36
  }
34
37
  get(path: '/v5/ip/enrich', headers: headers, params: params)
35
38
  end
@@ -6,6 +6,7 @@ module Peopledatalabs
6
6
  headers = {
7
7
  'Accept-Encoding' => 'gzip',
8
8
  'User-Agent' => 'PDL-RUBY-SDK',
9
+ 'SDK-Version' => Peopledatalabs::VERSION,
9
10
  }
10
11
  get(path: '/v5/person/identify', headers: headers, params: params)
11
12
  end
@@ -13,6 +13,7 @@ module Peopledatalabs
13
13
  headers = {
14
14
  'Accept-Encoding' => 'gzip',
15
15
  'User-Agent' => 'PDL-RUBY-SDK',
16
+ 'SDK-Version' => Peopledatalabs::VERSION,
16
17
  }
17
18
  get(path: '/v5/job_title/enrich', headers: headers, params: params)
18
19
  end
@@ -6,6 +6,7 @@ module Peopledatalabs
6
6
  headers = {
7
7
  'Accept-Encoding' => 'gzip',
8
8
  'User-Agent' => 'PDL-RUBY-SDK',
9
+ 'SDK-Version' => Peopledatalabs::VERSION,
9
10
  }
10
11
  get(path: "/v5/person/retrieve/#{person_id}", headers: headers, params: { 'pretty' => pretty })
11
12
  end
@@ -36,6 +36,7 @@ module Peopledatalabs
36
36
  headers = {
37
37
  'Accept-Encoding' => 'gzip',
38
38
  'User-Agent' => 'PDL-RUBY-SDK',
39
+ 'SDK-Version' => Peopledatalabs::VERSION,
39
40
  }
40
41
  post(path: "/v5/#{kind}/search", headers: headers, body: body)
41
42
  end
@@ -1,3 +1,3 @@
1
1
  module Peopledatalabs
2
- VERSION = "5.1.0"
2
+ VERSION = "5.2.1"
3
3
  end
@@ -11,6 +11,7 @@ require 'peopledatalabs/resources/identify'
11
11
  require 'peopledatalabs/resources/retrieve'
12
12
  require 'peopledatalabs/resources/bulk'
13
13
  require 'peopledatalabs/resources/jobtitle'
14
+ require 'peopledatalabs/resources/changelog'
14
15
 
15
16
 
16
17
  # gem build peopledatalabs.gemspec
@@ -40,6 +41,7 @@ require 'peopledatalabs/resources/jobtitle'
40
41
  # Peopledatalabs::Search.company(searchType: 'elastic', size: 10, query: { query: { bool: { must: [{term: {location_country: 'mexico'}}, {term: {job_title_role: 'health'}}, {exists: {field: 'phone_numbers'}}]}}})
41
42
  # Peopledatalabs::JobTitle.retrieve(job_title: 'data scientist')
42
43
  # Peopledatalabs::Enrichment.ip(ip: '72.212.42.169')
44
+ # Peopledatalabs::Changelog.person(params: { current_version: '31.0', origin_version: '30.2', type: 'updated' })
43
45
 
44
46
  module Peopledatalabs
45
47
  class Error < StandardError; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peopledatalabs
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - People Data Labs
@@ -108,6 +108,7 @@ files:
108
108
  - lib/peopledatalabs/configuration.rb
109
109
  - lib/peopledatalabs/resources/autocomplete.rb
110
110
  - lib/peopledatalabs/resources/bulk.rb
111
+ - lib/peopledatalabs/resources/changelog.rb
111
112
  - lib/peopledatalabs/resources/cleaner.rb
112
113
  - lib/peopledatalabs/resources/enrichment.rb
113
114
  - lib/peopledatalabs/resources/identify.rb
@@ -139,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
140
  - !ruby/object:Gem::Version
140
141
  version: '0'
141
142
  requirements: []
142
- rubygems_version: 3.6.7
143
+ rubygems_version: 3.6.9
143
144
  specification_version: 4
144
145
  summary: Official Ruby client for the People Data Labs API.
145
146
  test_files: []