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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37f45990f1be5bce18af3ddf71d80511a5ed49e4
4
- data.tar.gz: 54401a9dc12c152106112931515d60b819264ad4
3
+ metadata.gz: 409dc491e1957ec7d81c31cbf8bb6ab1b91767fc
4
+ data.tar.gz: 7badbef3ed1e494c39bd0a1b10583889af4e3a03
5
5
  SHA512:
6
- metadata.gz: 5953fe739691b0e09c7e29202d22efa55f059cfdad942e92fe37ec169e1087ccfc172126fc7a739d978fef75757a5372872c1a1cfe2f6042f1e8ed2ea66ecd3f
7
- data.tar.gz: d92dfa40089fba33c72c28c3c4002f2f0b7fe8acb39776dc902effaa0459d21a27fdc6f146eb47818d6393427dc7f86f6f4089703f3ae4b8e2beb0b327387088
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.0'
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'enrich-api'
3
- s.version = '1.1.3'
3
+ s.version = '1.1.4'
4
4
  s.date = Date.today
5
5
  s.summary = "Enrich API Ruby"
6
6
  s.description = "Enrich API Ruby"
@@ -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 = 2
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.3",
76
+ :user_agent => "enrich-api-ruby/1.1.4",
77
77
  :accept => :json,
78
78
  :content_type => :json,
79
79
  :params => query
@@ -17,6 +17,10 @@ module Enrich
17
17
  return @parent._get("/enrich/person", query)
18
18
  end
19
19
 
20
+ def company(query)
21
+ return @parent._get("/enrich/company", query)
22
+ end
23
+
20
24
  def network(query)
21
25
  return @parent._get("/enrich/network", query)
22
26
  end
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.3
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-02 00:00:00.000000000 Z
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