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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a471414ea1cf109043c336808b56d0b3bd5f5475b17ee4e24b5140e1e9483fef
4
- data.tar.gz: 76db7d82a963f497ff35213106b98d7eb7f8b7c0af5db806498d23b00a10d167
3
+ metadata.gz: 5ce4516616e89b330f476fe5a1c71aa2e2a30e53cfee3100ce5630114dffb9cd
4
+ data.tar.gz: e22ce292220c7a926a4f07bad06b5f16b0f6dae1ce1aa51394cbb55202e572e9
5
5
  SHA512:
6
- metadata.gz: 4363d40850663bb72da0b26b05df60785be77240a2a1d268d4445ee4e9788eb3098eeaa19b1a305f1032df20e6fcd192e848f633ba22a56ba1468fe01eef84dd
7
- data.tar.gz: 932e4c226e1d5712540c7d86b853a9e81b385567d7841e7386af80d15408201001464a3cc9b70e16c949d8daa19ce41805e88fbed6cd31b2b54ee4402ebdc5cf
6
+ metadata.gz: 926ad96cdc7be21cd2ccbbfc97a145562519d52cc4517a7a9a3c0633f888f6b224436508106421d8a85fd13df1fd7fb2da282432ac9cafe2cad371fffa366d42
7
+ data.tar.gz: 67c7f930c1b1743436b79dcaa342135a7939b9526ea19e86897add26dc3203aca9621e78177737ff9c64cd7a27e734740469e0cfd2c8c24dd66e7178f5d41e14
@@ -9,7 +9,8 @@ on:
9
9
  jobs:
10
10
  test:
11
11
  runs-on: ubuntu-latest
12
-
12
+ permissions:
13
+ contents: read
13
14
  steps:
14
15
  - uses: actions/checkout@v4
15
16
  - name: Set up Ruby 3.0
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 People Data Labs
3
+ Copyright (c) 2025 People Data Labs
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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
@@ -1,3 +1,3 @@
1
1
  module Peopledatalabs
2
- VERSION = "5.0.0"
2
+ VERSION = "5.2.0"
3
3
  end
@@ -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.0.0
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.7
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: []