clearbit 0.1.3 → 0.1.4
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 +4 -4
- data/examples/company.rb +1 -1
- data/examples/person.rb +1 -1
- data/examples/person_company.rb +4 -0
- data/lib/clearbit/company.rb +13 -7
- data/lib/clearbit/person.rb +13 -7
- data/lib/clearbit/person_company.rb +13 -7
- data/lib/clearbit/version.rb +1 -1
- data/lib/clearbit/watchlist.rb +24 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17c24d70918fb9e7eac659630aceb2dbfef52974
|
4
|
+
data.tar.gz: adb5b3e585772fbbe15bda1409ed6a8b82486950
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ebbf52951763bb530c2e9a448d28cfc9277cce2143035422a67e852ab7ea25012168c596d24dfa1b77a86394acf0bef5fd6c9cb0905a003cef044e779dcb9fb
|
7
|
+
data.tar.gz: e59b9887faf2944097ee76097868e6588b49a55b527fe3fcf724870fc459153902b8cba7bc855877e1e4562791206355e76617a9b1c40b0ba1f34dff5c23cd36
|
data/examples/company.rb
CHANGED
data/examples/person.rb
CHANGED
data/lib/clearbit/company.rb
CHANGED
@@ -3,23 +3,29 @@ module Clearbit
|
|
3
3
|
endpoint 'https://company.clearbit.com'
|
4
4
|
path '/v1/companies'
|
5
5
|
|
6
|
-
def self.find(values,
|
6
|
+
def self.find(values, old_options = nil)
|
7
7
|
unless values.is_a?(Hash)
|
8
8
|
values = {:id => values}
|
9
9
|
end
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
if old_options
|
12
|
+
# Deprecated API
|
13
|
+
warn '[DEPRECATION] passing multiple args to find() is deprecated'
|
14
|
+
values.merge!(old_options)
|
15
|
+
end
|
16
|
+
|
17
|
+
options = values.delete(:request) || {}
|
18
|
+
params = values.delete(:params) || {}
|
13
19
|
|
14
|
-
if webhook_id =
|
20
|
+
if webhook_id = values.delete(:webhook_id)
|
15
21
|
params.merge!(webhook_id: webhook_id)
|
16
22
|
end
|
17
23
|
|
18
|
-
if webhook_url =
|
24
|
+
if webhook_url = values.delete(:webhook_url)
|
19
25
|
params.merge!(webhook_url: webhook_url)
|
20
26
|
end
|
21
27
|
|
22
|
-
if subscribe =
|
28
|
+
if subscribe = values.delete(:subscribe)
|
23
29
|
params.merge!(subscribe: subscribe)
|
24
30
|
end
|
25
31
|
|
@@ -50,4 +56,4 @@ module Clearbit
|
|
50
56
|
self.class.post(uri('flag'), attrs)
|
51
57
|
end
|
52
58
|
end
|
53
|
-
end
|
59
|
+
end
|
data/lib/clearbit/person.rb
CHANGED
@@ -3,23 +3,29 @@ module Clearbit
|
|
3
3
|
endpoint 'https://person.clearbit.com'
|
4
4
|
path '/v1/people'
|
5
5
|
|
6
|
-
def self.find(values,
|
6
|
+
def self.find(values, old_options = nil)
|
7
7
|
unless values.is_a?(Hash)
|
8
8
|
values = {:id => values}
|
9
9
|
end
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
if old_options
|
12
|
+
# Deprecated API
|
13
|
+
warn '[DEPRECATION] passing multiple args to find() is deprecated'
|
14
|
+
values.merge!(old_options)
|
15
|
+
end
|
16
|
+
|
17
|
+
options = values.delete(:request) || {}
|
18
|
+
params = values.delete(:params) || {}
|
13
19
|
|
14
|
-
if webhook_id =
|
20
|
+
if webhook_id = values.delete(:webhook_id)
|
15
21
|
params.merge!(webhook_id: webhook_id)
|
16
22
|
end
|
17
23
|
|
18
|
-
if webhook_url =
|
24
|
+
if webhook_url = values.delete(:webhook_url)
|
19
25
|
params.merge!(webhook_url: webhook_url)
|
20
26
|
end
|
21
27
|
|
22
|
-
if subscribe =
|
28
|
+
if subscribe = values.delete(:subscribe)
|
23
29
|
params.merge!(subscribe: subscribe)
|
24
30
|
end
|
25
31
|
|
@@ -56,4 +62,4 @@ module Clearbit
|
|
56
62
|
self.class.post(uri('flag'), attrs)
|
57
63
|
end
|
58
64
|
end
|
59
|
-
end
|
65
|
+
end
|
@@ -3,23 +3,29 @@ module Clearbit
|
|
3
3
|
endpoint 'https://person.clearbit.com'
|
4
4
|
path '/v1/combined'
|
5
5
|
|
6
|
-
def self.find(values,
|
6
|
+
def self.find(values, old_options = nil)
|
7
7
|
unless values.is_a?(Hash)
|
8
8
|
values = {:id => values}
|
9
9
|
end
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
if old_options
|
12
|
+
# Deprecated API
|
13
|
+
warn '[DEPRECATION] passing multiple args to find() is deprecated'
|
14
|
+
values.merge!(old_options)
|
15
|
+
end
|
16
|
+
|
17
|
+
options = values.delete(:request) || {}
|
18
|
+
params = values.delete(:params) || {}
|
13
19
|
|
14
|
-
if webhook_id =
|
20
|
+
if webhook_id = values.delete(:webhook_id)
|
15
21
|
params.merge!(webhook_id: webhook_id)
|
16
22
|
end
|
17
23
|
|
18
|
-
if webhook_url =
|
24
|
+
if webhook_url = values.delete(:webhook_url)
|
19
25
|
params.merge!(webhook_url: webhook_url)
|
20
26
|
end
|
21
27
|
|
22
|
-
if subscribe =
|
28
|
+
if subscribe = values.delete(:subscribe)
|
23
29
|
params.merge!(subscribe: subscribe)
|
24
30
|
end
|
25
31
|
|
@@ -41,4 +47,4 @@ module Clearbit
|
|
41
47
|
alias_method :[], :find
|
42
48
|
end
|
43
49
|
end
|
44
|
-
end
|
50
|
+
end
|
data/lib/clearbit/version.rb
CHANGED
data/lib/clearbit/watchlist.rb
CHANGED
@@ -15,5 +15,28 @@ module Clearbit
|
|
15
15
|
class Entity < Watchlist
|
16
16
|
path '/v1/search/entities'
|
17
17
|
end
|
18
|
+
|
19
|
+
class Candidate < Watchlist
|
20
|
+
path '/v1/candidates'
|
21
|
+
|
22
|
+
def self.find(id, options = {})
|
23
|
+
response = get(id, {}, options)
|
24
|
+
self.new(response)
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.all(options = {})
|
28
|
+
response = get('', {}, options)
|
29
|
+
self.new(response)
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.create(params, options = {})
|
33
|
+
response = post('', params, options)
|
34
|
+
self.new(response)
|
35
|
+
end
|
36
|
+
|
37
|
+
def destroy
|
38
|
+
self.class.delete(id)
|
39
|
+
end
|
40
|
+
end
|
18
41
|
end
|
19
|
-
end
|
42
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clearbit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex MacCaw
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- bin/clearbit
|
69
69
|
- examples/company.rb
|
70
70
|
- examples/person.rb
|
71
|
+
- examples/person_company.rb
|
71
72
|
- examples/watchlist.rb
|
72
73
|
- lib/clearbit.rb
|
73
74
|
- lib/clearbit/base.rb
|
@@ -107,3 +108,4 @@ signing_key:
|
|
107
108
|
specification_version: 4
|
108
109
|
summary: API client for clearbit.com
|
109
110
|
test_files: []
|
111
|
+
has_rdoc:
|