peopledatalabs 5.0.0 → 5.2.0
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 +4 -4
- data/.github/workflows/test.yaml +2 -1
- data/LICENSE +1 -1
- data/README.md +4 -0
- data/lib/peopledatalabs/api_resource.rb +9 -1
- data/lib/peopledatalabs/resources/changelog.rb +16 -0
- data/lib/peopledatalabs/version.rb +1 -1
- data/lib/peopledatalabs.rb +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ce4516616e89b330f476fe5a1c71aa2e2a30e53cfee3100ce5630114dffb9cd
|
4
|
+
data.tar.gz: e22ce292220c7a926a4f07bad06b5f16b0f6dae1ce1aa51394cbb55202e572e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 926ad96cdc7be21cd2ccbbfc97a145562519d52cc4517a7a9a3c0633f888f6b224436508106421d8a85fd13df1fd7fb2da282432ac9cafe2cad371fffa366d42
|
7
|
+
data.tar.gz: 67c7f930c1b1743436b79dcaa342135a7939b9526ea19e86897add26dc3203aca9621e78177737ff9c64cd7a27e734740469e0cfd2c8c24dd66e7178f5d41e14
|
data/.github/workflows/test.yaml
CHANGED
data/LICENSE
CHANGED
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 |
|
@@ -3,7 +3,7 @@ module Peopledatalabs
|
|
3
3
|
|
4
4
|
protected
|
5
5
|
|
6
|
-
VALID_AUTOCOMPLETE_FIELDS = ['class', 'company', 'country', 'industry', 'location', 'major', 'region', 'role', 'school', 'sub_role', 'skill', 'title'].freeze
|
6
|
+
VALID_AUTOCOMPLETE_FIELDS = ['all_location', 'class', 'company', 'country', 'industry', 'location', 'location_name', 'major', 'region', 'role', 'school', 'sub_role', 'skill', 'title'].freeze
|
7
7
|
|
8
8
|
def self.get(path:, headers: {}, params: {})
|
9
9
|
request = check(params: params, path: path)
|
@@ -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
|
@@ -0,0 +1,16 @@
|
|
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
|
+
}
|
10
|
+
|
11
|
+
stringified_params = params.transform_keys(&:to_s)
|
12
|
+
|
13
|
+
post(path: '/v5/person/changelog', headers: headers, body: stringified_params)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/peopledatalabs.rb
CHANGED
@@ -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.
|
4
|
+
version: 5.2.0
|
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.
|
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: []
|