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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dcb0f2f6c5fe56216eaddb042b16fc105686ab2be354fe26f04e4bfe5948e69f
4
- data.tar.gz: a101dbec0783f6fb2c2a3164a768f8acce0a13a8231e659dc647e9f85309f592
3
+ metadata.gz: '096a1aa477f47a8a06b24b8e844ec172bdf211e138ef25190f995f0484d4f3c4'
4
+ data.tar.gz: e292b8c301c45ce8b6336840ec2bad399193940e7ae638d85ebd1724d404d99b
5
5
  SHA512:
6
- metadata.gz: b34e354eddf849a0da5734321c551557228066af39d5b7c870cf0f7ac5e4d8a966d1a134c6e8ea59017b2016b69b856c1a80f08f92400bbe2c86d8d9e8f5aa1f
7
- data.tar.gz: 8239c66f3480b7e1022fd98774f0bfea305c745f06af7e1290baedf193c7e26c6134ae5ab29ffd89ba24642d51832c640874a4bc8e3fa120f4c6d9d8e8b8ed9c
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"
@@ -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
 
@@ -15,9 +15,9 @@ jobs:
15
15
  steps:
16
16
  - uses: actions/checkout@v3
17
17
  - name: Set up Ruby 2.6
18
- uses: actions/setup-ruby@v1
18
+ uses: ruby/setup-ruby@v1
19
19
  with:
20
- ruby-version: 2.6.x
20
+ ruby-version: 2.6
21
21
 
22
22
  - name: Publish to RubyGems
23
23
  run: |
@@ -13,9 +13,9 @@ jobs:
13
13
  steps:
14
14
  - uses: actions/checkout@v3
15
15
  - name: Setup Ruby
16
- uses: actions/setup-ruby@v1
16
+ uses: ruby/setup-ruby@v1
17
17
  with:
18
- ruby-version: 2.6.x
18
+ ruby-version: 2.6
19
19
 
20
20
  - name: Build and run test
21
21
  env:
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.0"
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.0.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.0
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: 2022-08-13 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
@@ -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"