peopledatalabs 2.0.1 → 2.1.0

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: b164f45ca5f7f4c5292a2f8df3178c87f25248184a778c748662150895780b33
4
- data.tar.gz: 0aee41e55e8525c2c650f3f6317829da3152fbe36e9ebd186447974894e9fec5
3
+ metadata.gz: '096a1aa477f47a8a06b24b8e844ec172bdf211e138ef25190f995f0484d4f3c4'
4
+ data.tar.gz: e292b8c301c45ce8b6336840ec2bad399193940e7ae638d85ebd1724d404d99b
5
5
  SHA512:
6
- metadata.gz: b07df6e3bfb16db8111d9573099d9a3f17196c7c0b92cb4ffa93c27117107e5fc6f5545ead32f377e84a51e1db94b7455a08e898271b77c2a75efecfbd51be59
7
- data.tar.gz: 66f7fc3ab5a62a52182e9faf293b9dafa781621a4eb2fd70659b2e8c022b53f71c651328a3f04d18662044fd98ddff7edec34ce6c34b8ba1779d7a20a80210f9
6
+ metadata.gz: cf22a8da7cf8b9bc8eb0f099a96a99c4f811fdd547f0986580c99202a5d4e38b1a7db9a4132435bdb3c36ed5414afba19a2f34412929e560386754b85ff4ad80
7
+ data.tar.gz: 8f06132ea51c12bdfc7712895eddfb198e057b6ea325a2f89594c75b292844d1e589bff4559c1e42d6ca944568749f3b9a72cf28320b35c355369899f5df72a1
@@ -1,6 +1,6 @@
1
1
  ## Description of the change
2
2
 
3
- > Description here
3
+ - Description here
4
4
 
5
5
  ## Type of change
6
6
 
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
@@ -1,3 +1,3 @@
1
1
  module Peopledatalabs
2
- VERSION = "2.0.1"
2
+ VERSION = "2.1.0"
3
3
  end
@@ -15,7 +15,7 @@ require 'peopledatalabs/resources/skill'
15
15
 
16
16
 
17
17
  # gem build peopledatalabs.gemspec
18
- # gem install ./peopledatalabs-2.0.1.gem
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.0.1
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: 2023-05-01 00:00:00.000000000 Z
11
+ date: 2023-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler