enrich-api 1.1.3 → 1.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/README.md +12 -1
- data/enrich-api.gemspec +1 -1
- data/examples/enrich_company.rb +21 -0
- data/lib/enrich.rb +2 -2
- data/lib/resources/enrich.rb +4 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 409dc491e1957ec7d81c31cbf8bb6ab1b91767fc
|
4
|
+
data.tar.gz: 7badbef3ed1e494c39bd0a1b10583889af4e3a03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82f147499d106ea9eb20d3438fd030a8927d46e5d84f26f5c17705f00594c76a57002f218eaef9804a73fe5a2f0339d9765b17a882bd99a60ca4df2a69588e89
|
7
|
+
data.tar.gz: 9865d7ba1dea618aca8c8d15a2d67fec15bed47822fb99fae8fdffa8d3c9134efcabd2252b704e3cab7bb6f6388799c4d3651f5243d0dd6f1b329d790f2ceba9
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Copyright 2017 Enrich. See LICENSE for copying information.
|
|
12
12
|
Add the library to your `Gemfile`:
|
13
13
|
|
14
14
|
```bash
|
15
|
-
gem 'enrich-api', '~> 1.
|
15
|
+
gem 'enrich-api', '~> 1.1'
|
16
16
|
```
|
17
17
|
|
18
18
|
Then, import it:
|
@@ -88,6 +88,17 @@ data = client.enrich.person({
|
|
88
88
|
})
|
89
89
|
```
|
90
90
|
|
91
|
+
#### Enrich a Company
|
92
|
+
|
93
|
+
* **Method:** `client.enrich.company(query)`
|
94
|
+
* **Docs:** [https://docs.enrichdata.com/api/v1/#enrich-a-company](https://docs.enrichdata.com/api/v1/#enrich-a-company)
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
data = client.enrich.company({
|
98
|
+
domain: "crisp.chat"
|
99
|
+
})
|
100
|
+
```
|
101
|
+
|
91
102
|
#### Enrich a Network
|
92
103
|
|
93
104
|
* **Method:** `client.enrich.network(query)`
|
data/enrich-api.gemspec
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
##
|
2
|
+
# enrich-api-ruby
|
3
|
+
#
|
4
|
+
# Copyright 2017, Valerian Saliou
|
5
|
+
# Author: Valerian Saliou <valerian@valeriansaliou.name>
|
6
|
+
##
|
7
|
+
|
8
|
+
require 'enrich-api'
|
9
|
+
|
10
|
+
client = Enrich::Client.new
|
11
|
+
|
12
|
+
client.authenticate(
|
13
|
+
"ui_a311da78-6b89-459c-8028-b331efab20d5",
|
14
|
+
"sk_f293d44f-675d-4cb1-9c78-52b8a9af0df2"
|
15
|
+
)
|
16
|
+
|
17
|
+
data = client.enrich.company({
|
18
|
+
domain: "crisp.chat"
|
19
|
+
})
|
20
|
+
|
21
|
+
puts data.inspect
|
data/lib/enrich.rb
CHANGED
@@ -21,7 +21,7 @@ module Enrich
|
|
21
21
|
|
22
22
|
@@created_status_code = 201
|
23
23
|
@@not_found_status_code = 404
|
24
|
-
@@created_retry_count_max =
|
24
|
+
@@created_retry_count_max = 10
|
25
25
|
|
26
26
|
def initialize()
|
27
27
|
@auth = {}
|
@@ -73,7 +73,7 @@ module Enrich
|
|
73
73
|
:password => @auth["secret_key"],
|
74
74
|
|
75
75
|
:headers => {
|
76
|
-
:user_agent => "enrich-api-ruby/1.1.
|
76
|
+
:user_agent => "enrich-api-ruby/1.1.4",
|
77
77
|
:accept => :json,
|
78
78
|
:content_type => :json,
|
79
79
|
:params => query
|
data/lib/resources/enrich.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enrich-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valerian Saliou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -35,6 +35,7 @@ files:
|
|
35
35
|
- LICENSE
|
36
36
|
- README.md
|
37
37
|
- enrich-api.gemspec
|
38
|
+
- examples/enrich_company.rb
|
38
39
|
- examples/enrich_network.rb
|
39
40
|
- examples/enrich_person.rb
|
40
41
|
- examples/verify_validate_email.rb
|