peopledatalabs 2.0.1 → 2.1.1

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: 95b02cf3a6e1c3a73a7bdda1941b7b1d93e4746534d0ae1f0a429ee628d29098
4
+ data.tar.gz: 0503c9888cf0df7f10a9512868c29e2d18395e19c61a4a5d8e5078056469e38d
5
5
  SHA512:
6
- metadata.gz: b07df6e3bfb16db8111d9573099d9a3f17196c7c0b92cb4ffa93c27117107e5fc6f5545ead32f377e84a51e1db94b7455a08e898271b77c2a75efecfbd51be59
7
- data.tar.gz: 66f7fc3ab5a62a52182e9faf293b9dafa781621a4eb2fd70659b2e8c022b53f71c651328a3f04d18662044fd98ddff7edec34ce6c34b8ba1779d7a20a80210f9
6
+ metadata.gz: 40fd5bcabf8af3c90078559d6939c7571447288a62c87ce518d87fa7ee9caa4226abb371085ee7970d3b6adc6b8cf9315f4cdb37ce182690594f194c5ba1f8c2
7
+ data.tar.gz: e488333578f4c3aa93fafbdaf8ad20d171869b032fe048bcc6dc8302ade1296eb0529825cd8d97b493802d7f1ba424520d2520affc6bbe1c1efd91cee105d333
@@ -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,20 @@ 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, return_if_unmatched: 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
+ 'return_if_unmatched' => return_if_unmatched,
28
+ }
29
+ headers = {
30
+ 'Accept-Encoding' => 'gzip',
31
+ 'User-Agent' => 'PDL-RUBY-SDK',
32
+ }
33
+ get(path: '/v5/ip/enrich', headers: headers, params: params)
34
+ end
35
+
21
36
  end
22
37
  end
@@ -1,3 +1,3 @@
1
1
  module Peopledatalabs
2
- VERSION = "2.0.1"
2
+ VERSION = "2.1.1"
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.1.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
@@ -34,10 +34,10 @@ Gem::Specification.new do |spec|
34
34
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
35
35
  spec.require_paths = ["lib"]
36
36
 
37
- spec.add_development_dependency "bundler", "~> 2.3"
37
+ spec.add_development_dependency "bundler", "~> 2.4"
38
38
  spec.add_development_dependency "rake", "~> 13.0"
39
- spec.add_development_dependency "rspec", "~> 3.0"
39
+ spec.add_development_dependency "rspec", "~> 3.12"
40
40
 
41
- spec.add_runtime_dependency "http", "~> 5.0"
41
+ spec.add_runtime_dependency "http", "~> 5.1"
42
42
  spec.add_runtime_dependency "forwardable", "~> 1.3"
43
43
  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.1
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-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.3'
19
+ version: '2.4'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.3'
26
+ version: '2.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: '3.12'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.0'
54
+ version: '3.12'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: http
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '5.0'
61
+ version: '5.1'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '5.0'
68
+ version: '5.1'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: forwardable
71
71
  requirement: !ruby/object:Gem::Requirement