peopledatalabs 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/peopledatalabs/api_resource.rb +8 -6
- data/lib/peopledatalabs/resources/autocomplete.rb +2 -2
- data/lib/peopledatalabs/resources/bulk.rb +2 -3
- data/lib/peopledatalabs/resources/cleaner.rb +6 -9
- data/lib/peopledatalabs/resources/enrichment.rb +4 -6
- data/lib/peopledatalabs/resources/identify.rb +2 -3
- data/lib/peopledatalabs/resources/retrieve.rb +2 -3
- data/lib/peopledatalabs/resources/search.rb +2 -3
- data/lib/peopledatalabs/version.rb +1 -1
- data/lib/peopledatalabs.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d078a93c2dc3607c0ccd632210a451f0f7f56bf1f1fd20a886cb9935af5113ac
|
4
|
+
data.tar.gz: be3d3ddc4de6b359a0fa78ddd0466e9e14e7ab28c9a38a5080e61eee8b6a2d80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40214ff087b274b0ab09f33e83372c5290842eae8adf16ccf38593173d3f6bf9f569a3b9fd2a9450950ab153fa0efccd7bafce7e640b392e9d6ace0d61b046df
|
7
|
+
data.tar.gz: aa161a86391ec1c03a2828290792e0d56c35e6776a4306befdc25184b079a8d4c8bfbf2ec08e27743621b6fa388964ef2015dc18f4890adbad8699b63b37393c
|
@@ -10,9 +10,10 @@ module Peopledatalabs
|
|
10
10
|
return request unless request['status'] == 200
|
11
11
|
|
12
12
|
response = HTTP
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
.use(:auto_inflate)
|
14
|
+
.timeout(Peopledatalabs.read_timeout)
|
15
|
+
.headers(headers)
|
16
|
+
.get(url(path), params: query_authentication(params))
|
16
17
|
handle_response(response)
|
17
18
|
end
|
18
19
|
|
@@ -21,9 +22,10 @@ module Peopledatalabs
|
|
21
22
|
return request unless request['status'] == 200
|
22
23
|
|
23
24
|
response = HTTP
|
24
|
-
|
25
|
-
|
26
|
-
|
25
|
+
.use(:auto_inflate)
|
26
|
+
.timeout(Peopledatalabs.read_timeout)
|
27
|
+
.headers(header_authentication(headers))
|
28
|
+
.post(url(path), json: body)
|
27
29
|
handle_response(response)
|
28
30
|
end
|
29
31
|
|
@@ -11,8 +11,8 @@ module Peopledatalabs
|
|
11
11
|
'pretty' => pretty,
|
12
12
|
};
|
13
13
|
|
14
|
-
|
15
|
-
get(path: '/v5/autocomplete', params: params)
|
14
|
+
headers = { 'Accept-Encoding' => 'gzip' }
|
15
|
+
get(path: '/v5/autocomplete', headers: headers, params: params)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
@@ -3,9 +3,8 @@
|
|
3
3
|
module Peopledatalabs
|
4
4
|
class Bulk < APIResource
|
5
5
|
def self.people(params:)
|
6
|
-
|
7
|
-
|
8
|
-
post(path: '/v5/person/bulk', body: params)
|
6
|
+
headers = { 'Accept-Encoding' => 'gzip' }
|
7
|
+
post(path: '/v5/person/bulk', headers: headers, body: params)
|
9
8
|
end
|
10
9
|
end
|
11
10
|
end
|
@@ -3,21 +3,18 @@
|
|
3
3
|
module Peopledatalabs
|
4
4
|
class Cleaner < APIResource
|
5
5
|
def self.company(kind:, value:)
|
6
|
-
|
7
|
-
|
8
|
-
get(path: '/v5/company/clean', params: { kind => value })
|
6
|
+
headers = { 'Accept-Encoding' => 'gzip' }
|
7
|
+
get(path: '/v5/company/clean', headers: headers, params: { kind => value })
|
9
8
|
end
|
10
9
|
|
11
10
|
def self.school(kind:, value:)
|
12
|
-
|
13
|
-
|
14
|
-
get(path: '/v5/school/clean', params: { kind => value })
|
11
|
+
headers = { 'Accept-Encoding' => 'gzip' }
|
12
|
+
get(path: '/v5/school/clean', headers: headers, params: { kind => value })
|
15
13
|
end
|
16
14
|
|
17
15
|
def self.location(value:)
|
18
|
-
|
19
|
-
|
20
|
-
get(path: '/v5/location/clean', params: { 'location' => value })
|
16
|
+
headers = { 'Accept-Encoding' => 'gzip' }
|
17
|
+
get(path: '/v5/location/clean', headers: headers, params: { 'location' => value })
|
21
18
|
end
|
22
19
|
|
23
20
|
|
@@ -3,15 +3,13 @@
|
|
3
3
|
module Peopledatalabs
|
4
4
|
class Enrichment < APIResource
|
5
5
|
def self.person(params:)
|
6
|
-
|
7
|
-
|
8
|
-
get(path: '/v5/person/enrich', params: params)
|
6
|
+
headers = { 'Accept-Encoding' => 'gzip' }
|
7
|
+
get(path: '/v5/person/enrich', headers: headers, params: params)
|
9
8
|
end
|
10
9
|
|
11
10
|
def self.company(params:)
|
12
|
-
|
13
|
-
|
14
|
-
get(path: '/v5/company/enrich', params: params)
|
11
|
+
headers = { 'Accept-Encoding' => 'gzip' }
|
12
|
+
get(path: '/v5/company/enrich', headers: headers, params: params)
|
15
13
|
end
|
16
14
|
|
17
15
|
end
|
@@ -3,9 +3,8 @@
|
|
3
3
|
module Peopledatalabs
|
4
4
|
class Identify < APIResource
|
5
5
|
def self.person(params:)
|
6
|
-
|
7
|
-
|
8
|
-
get(path: '/v5/person/identify', params: params)
|
6
|
+
headers = { 'Accept-Encoding' => 'gzip' }
|
7
|
+
get(path: '/v5/person/identify', headers: headers, params: params)
|
9
8
|
end
|
10
9
|
end
|
11
10
|
end
|
@@ -3,9 +3,8 @@
|
|
3
3
|
module Peopledatalabs
|
4
4
|
class Retrieve < APIResource
|
5
5
|
def self.person(person_id:, pretty: false)
|
6
|
-
|
7
|
-
|
8
|
-
get(path: "/v5/person/retrieve/#{person_id}", params: { 'pretty' => pretty })
|
6
|
+
headers = { 'Accept-Encoding' => 'gzip' }
|
7
|
+
get(path: "/v5/person/retrieve/#{person_id}", headers: headers, params: { 'pretty' => pretty })
|
9
8
|
end
|
10
9
|
end
|
11
10
|
end
|
@@ -33,9 +33,8 @@ module Peopledatalabs
|
|
33
33
|
'scroll_token' => scroll_token
|
34
34
|
}
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
post(path: "/v5/#{kind}/search", body: body)
|
36
|
+
headers = { 'Accept-Encoding' => 'gzip' }
|
37
|
+
post(path: "/v5/#{kind}/search", headers: headers, body: body)
|
39
38
|
end
|
40
39
|
end
|
41
40
|
end
|
data/lib/peopledatalabs.rb
CHANGED
@@ -13,9 +13,10 @@ require 'peopledatalabs/resources/bulk'
|
|
13
13
|
|
14
14
|
|
15
15
|
# gem build peopledatalabs.gemspec
|
16
|
-
# gem install ./peopledatalabs-1.0.
|
16
|
+
# gem install ./peopledatalabs-1.0.2.gem
|
17
17
|
# irb
|
18
18
|
# require 'peopledatalabs'
|
19
|
+
# rake spec PDL_API_KEY=API_KEY
|
19
20
|
|
20
21
|
# Usage
|
21
22
|
# First set api key
|
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: 1.0.
|
4
|
+
version: 1.0.2
|
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-05-
|
11
|
+
date: 2022-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|