closeio 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -5
- data/lib/closeio.rb +8 -0
- data/lib/closeio/base.rb +1 -1
- data/lib/closeio/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a1a13aafac29d1f3bf6a4a3371ee17cc5220fc9
|
4
|
+
data.tar.gz: 2409ed93ab181ff700ba66bc5cd50413837848ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9daca88badb5a9f82f44a7e0b5a73b53af2ceae2a807125e0d2a5771344b6003dc75253d3e9d65e0ac56a7d431310625fd9065f5487e14c6bc6c6d5e7994231c
|
7
|
+
data.tar.gz: b3ead07cddf432c44f6dbb9a879bc520289fbed247c57b22ea401e6a03c19482a9109c208964c8c2131263ed95efa5335cbbf70f954f24f1b172350858de36c6
|
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
Learn about the Closeio API at http://developer.close.io.
|
4
4
|
|
5
|
+
I :heart: Close.io, so if you have problems using the gem or would like to see support for new endpoints, please open a GitHub issue -- I'll get it resolved as quick as I can.
|
6
|
+
|
5
7
|
### Installation
|
6
8
|
Add this line to your application's Gemfile:
|
7
9
|
````ruby
|
@@ -11,14 +13,14 @@ Add this line to your application's Gemfile:
|
|
11
13
|
# then...
|
12
14
|
bundle install
|
13
15
|
|
14
|
-
# Set your Api Key (
|
16
|
+
# Set your Api Key (`config/initializers/closeio.rb` or `config/environment/*.rb`)
|
15
17
|
Closeio.configure("xxxxxx")
|
16
18
|
````
|
17
19
|
|
18
20
|
### Usage
|
19
21
|
````ruby
|
20
22
|
# Find a specific lead
|
21
|
-
lead = Closeio::Lead.find
|
23
|
+
lead = Closeio::Lead.find('lead_xxxxxxxxxxxx')
|
22
24
|
|
23
25
|
# See some data about the lead
|
24
26
|
lead.addresses
|
@@ -26,16 +28,23 @@ Add this line to your application's Gemfile:
|
|
26
28
|
lead.opportunities
|
27
29
|
|
28
30
|
# Find leads that match fields
|
29
|
-
Closeio::Lead.where
|
31
|
+
Closeio::Lead.where(query: 'custom.current_system:[Simple Donation]')
|
30
32
|
|
31
33
|
# Create a lead
|
32
|
-
Closeio::Lead.create
|
34
|
+
Closeio::Lead.create(
|
35
|
+
name: "Bluth Company",
|
36
|
+
contacts: [{
|
37
|
+
name: "Buster Bluth",
|
38
|
+
emails: [{type: "office", email: "cartographer@bluthcompany.com"}]
|
39
|
+
}]
|
40
|
+
)
|
33
41
|
|
34
42
|
# Saved Search (SmartView)
|
35
43
|
saved_search = Closeio::SavedSearch.all.first
|
36
44
|
saved_search.leads
|
37
45
|
````
|
38
46
|
|
47
|
+
|
39
48
|
### Contributing
|
40
49
|
|
41
50
|
1. Fork it
|
@@ -46,4 +55,4 @@ Add this line to your application's Gemfile:
|
|
46
55
|
|
47
56
|
|
48
57
|
### Copyright
|
49
|
-
Copyright (c)
|
58
|
+
Copyright (c) 2015 Taylor Brooks. See LICENSE for details.
|
data/lib/closeio.rb
CHANGED
@@ -28,4 +28,12 @@ module Closeio
|
|
28
28
|
def self.configure(api_key=nil)
|
29
29
|
Base.configure(api_key)
|
30
30
|
end
|
31
|
+
|
32
|
+
def self.reset
|
33
|
+
Closeio::Base.default_options[:basic_auth][:username] = nil
|
34
|
+
|
35
|
+
Closeio::Base.descendants.each do |resource|
|
36
|
+
resource.default_options[:basic_auth][:username] = nil
|
37
|
+
end
|
38
|
+
end
|
31
39
|
end
|
data/lib/closeio/base.rb
CHANGED
data/lib/closeio/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: closeio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taylor Brooks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: crack
|