rd_insightly 0.2.0 → 0.2.1

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: 50da386effc12bac3031b0e673aa4fd0eb9ecb7e
4
- data.tar.gz: 75099fa410071080d689d9ba75476253d7f91aec
3
+ metadata.gz: 0ca340d9ae23387682ff7ebc02eefe39467cb38b
4
+ data.tar.gz: 5a1b52212ed9c6089a1e9d080643e6bcf11d6e14
5
5
  SHA512:
6
- metadata.gz: 47036e5a5f3aed41c46404d13cf6b31ad9d7f430ef2cafd9cdc6f4d880d113222cf338bcffe8757c75bdf935e1c3edc014df22e0652b8abbafc5e798d85c6a3c
7
- data.tar.gz: cf480701d4e55e69d37efbe231b227be26af2c2db215f4ddd80bd6a5d14f0a31a1dc5522003b070eb3ed7cefab218dfb0c4e85bd42b2e832fb99281b0b0753df
6
+ metadata.gz: 7447324da8ab0fdc0d3caaa052969e8b308567ea5452995e4d9831c0f99d11c22c947e1c82484a93e194f88b08d624313493a2e6b28dcf107e4e1ad7ef5c193f
7
+ data.tar.gz: 795e448dc8d61f9acb5df0526c434647afd51155bba6c83fad9459002faac20b7c9193ec8ae9990c539cf35e0cc3adf8812efe5cf1ecc9c8e3dbdd50bac71ed6
data/README.md CHANGED
@@ -25,7 +25,44 @@ Or install it yourself as:
25
25
 
26
26
  ## Usage
27
27
 
28
- TODO: Write usage instructions here
28
+ Need create a authorization, you can use the method:
29
+
30
+ Rdinsightly.create_authorization API_KEY
31
+
32
+ With authorization created you can start use the features:
33
+
34
+ To create a lead(*last_name required):
35
+
36
+ ```ruby
37
+ HASH_ATTRIBUTES = {name: '', email: '', company: '', phone: '', job_title: '', website: ''}
38
+ RdInsightly::Lead.create last_name, HASH_ATTRIBUTES
39
+ ```
40
+
41
+ To find a lead:
42
+
43
+ ```ruby
44
+ lead = RdInsightly::Lead.find ID
45
+ ```
46
+
47
+ To update a lead:
48
+
49
+ ```ruby
50
+ lead = RdInsightly::Lead.find ID
51
+ lead.update HASH_ATTRIBUTES
52
+ ```
53
+
54
+ To delete a lead:
55
+
56
+ ```ruby
57
+ lead = RdInsightly::Lead.find ID
58
+ lead.delete
59
+ ```
60
+
61
+ To logout:
62
+
63
+ ```ruby
64
+ RdInsightly.logout
65
+ ```
29
66
 
30
67
  ## Development
31
68
 
data/lib/rd_insightly.rb CHANGED
@@ -29,4 +29,8 @@ module RdInsightly
29
29
  def self.logout
30
30
  @auth.logout
31
31
  end
32
+
33
+ def self.token=(token)
34
+ @auth.api_token = token
35
+ end
32
36
  end
@@ -1,6 +1,6 @@
1
1
  module RdInsightly
2
2
  class Auth
3
- attr_reader :api_token
3
+ attr_accessor :api_token
4
4
 
5
5
  def initialize(api_token)
6
6
  @api_token = api_token
@@ -1,3 +1,3 @@
1
1
  module RdInsightly
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rd_insightly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Douglas Oliveira