peopledatalabs 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +11 -0
- data/.github/pull_request_template.md +1 -1
- data/.github/workflows/publish.yaml +2 -2
- data/.github/workflows/test.yaml +2 -2
- data/README.md +11 -0
- data/lib/peopledatalabs/api_resource.rb +5 -0
- data/lib/peopledatalabs/resources/enrichment.rb +14 -0
- data/lib/peopledatalabs/version.rb +1 -1
- data/lib/peopledatalabs.rb +2 -1
- 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: '096a1aa477f47a8a06b24b8e844ec172bdf211e138ef25190f995f0484d4f3c4'
|
4
|
+
data.tar.gz: e292b8c301c45ce8b6336840ec2bad399193940e7ae638d85ebd1724d404d99b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf22a8da7cf8b9bc8eb0f099a96a99c4f811fdd547f0986580c99202a5d4e38b1a7db9a4132435bdb3c36ed5414afba19a2f34412929e560386754b85ff4ad80
|
7
|
+
data.tar.gz: 8f06132ea51c12bdfc7712895eddfb198e057b6ea325a2f89594c75b292844d1e589bff4559c1e42d6ca944568749f3b9a72cf28320b35c355369899f5df72a1
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
3
|
+
# Please see the documentation for all configuration options:
|
4
|
+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
5
|
+
|
6
|
+
version: 2
|
7
|
+
updates:
|
8
|
+
- package-ecosystem: "bundler" # See documentation for possible values
|
9
|
+
directory: "/" # Location of package manifests
|
10
|
+
schedule:
|
11
|
+
interval: "weekly"
|
data/.github/workflows/test.yaml
CHANGED
data/README.md
CHANGED
@@ -123,6 +123,12 @@ Peopledatalabs::JobTitle.retrieve(job_title: 'data scientist')
|
|
123
123
|
Peopledatalabs::Skill.retrieve(skill: 'c++')
|
124
124
|
```
|
125
125
|
|
126
|
+
**Using IP Enrichment API**
|
127
|
+
```ruby
|
128
|
+
# Get IP Enrichment
|
129
|
+
Peopledatalabs::Enrichment.ip(ip: '72.212.42.169')
|
130
|
+
```
|
131
|
+
|
126
132
|
## 🏝 Sandbox Usage <a name="sandbox"></a>
|
127
133
|
```ruby
|
128
134
|
# To enable sandbox usage, use the following flag
|
@@ -146,6 +152,11 @@ Peopledatalabs.sandbox = true
|
|
146
152
|
| [Company Enrichment API](https://docs.peopledatalabs.com/docs/company-enrichment-api) | `Peopledatalabs::Enrichment.company(...params)` |
|
147
153
|
| [Company Search API](https://docs.peopledatalabs.com/docs/company-search-api) | `Peopledatalabs::Search.company(...params)` |
|
148
154
|
|
155
|
+
**IP Endpoints**
|
156
|
+
| API Endpoint | peopledatalabs Function |
|
157
|
+
|-|-|
|
158
|
+
| [IP Enrichment API](https://docs.peopledatalabs.com/docs/ip-enrichment-api) | `Peopledatalabs::Enrichment.ip(...params)` |
|
159
|
+
|
149
160
|
**Supporting Endpoints**
|
150
161
|
| API Endpoint | peopledatalabs Function |
|
151
162
|
|-|-|
|
@@ -91,6 +91,11 @@ module Peopledatalabs
|
|
91
91
|
if (!field)
|
92
92
|
result = { 'status' => 400, 'message' => 'Missing skill' }
|
93
93
|
end
|
94
|
+
elsif path.include? '/ip'
|
95
|
+
field = params['ip']
|
96
|
+
if (!field)
|
97
|
+
result = { 'status' => 400, 'message' => 'Missing ip' }
|
98
|
+
end
|
94
99
|
end
|
95
100
|
result
|
96
101
|
end
|
@@ -18,5 +18,19 @@ module Peopledatalabs
|
|
18
18
|
get(path: '/v5/company/enrich', headers: headers, params: params)
|
19
19
|
end
|
20
20
|
|
21
|
+
def self.ip(ip:, return_ip_location: false, return_ip_metadata: false, return_person: false)
|
22
|
+
params = {
|
23
|
+
'ip' => ip,
|
24
|
+
'return_ip_location' => return_ip_location,
|
25
|
+
'return_ip_metadata' => return_ip_metadata,
|
26
|
+
'return_person' => return_person,
|
27
|
+
}
|
28
|
+
headers = {
|
29
|
+
'Accept-Encoding' => 'gzip',
|
30
|
+
'User-Agent' => 'PDL-RUBY-SDK',
|
31
|
+
}
|
32
|
+
get(path: '/v5/ip/enrich', headers: headers, params: params)
|
33
|
+
end
|
34
|
+
|
21
35
|
end
|
22
36
|
end
|
data/lib/peopledatalabs.rb
CHANGED
@@ -15,7 +15,7 @@ require 'peopledatalabs/resources/skill'
|
|
15
15
|
|
16
16
|
|
17
17
|
# gem build peopledatalabs.gemspec
|
18
|
-
# gem install ./peopledatalabs-2.
|
18
|
+
# gem install ./peopledatalabs-2.1.0.gem
|
19
19
|
# irb
|
20
20
|
# require 'peopledatalabs'
|
21
21
|
# rake spec PDL_API_KEY=API_KEY
|
@@ -41,6 +41,7 @@ require 'peopledatalabs/resources/skill'
|
|
41
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'}}]}}})
|
42
42
|
# Peopledatalabs::JobTitle.retrieve(job_title: 'data scientist')
|
43
43
|
# Peopledatalabs::Skill.retrieve(skill: 'c++')
|
44
|
+
# Peopledatalabs::Enrichment.ip(ip: '72.212.42.169')
|
44
45
|
|
45
46
|
module Peopledatalabs
|
46
47
|
class Error < StandardError; end
|
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: 2.
|
4
|
+
version: 2.1.0
|
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:
|
11
|
+
date: 2023-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -91,6 +91,7 @@ extra_rdoc_files: []
|
|
91
91
|
files:
|
92
92
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
93
93
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
94
|
+
- ".github/dependabot.yml"
|
94
95
|
- ".github/pull_request_template.md"
|
95
96
|
- ".github/workflows/publish.yaml"
|
96
97
|
- ".github/workflows/test.yaml"
|