closeio 0.0.1 → 0.0.2
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/Gemfile.lock +1 -0
- data/README.md +11 -5
- data/lib/closeio/base.rb +3 -3
- data/lib/closeio/lead.rb +4 -0
- data/lib/closeio/saved_search.rb +5 -1
- data/lib/closeio/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1600ceff9b8b8494a591515b366f7424113acbae
|
4
|
+
data.tar.gz: b626c8c44011b2a2935070ba53121548a8f44248
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c67cb359a41f27b33d733c0d83a25e26395271e69d8b676e4832da091a2b5e6da40df7edaf20c7b05fe21fc061474081f682094485ff7c20d8cbde09e5a4f0a5
|
7
|
+
data.tar.gz: c94d6409db8dc05a739ea8c98308433f8b9320f2e5fed69a90bd213f1903584fbfb1a896ba2f046d825a5f0e51131bdee3e2aa39e0edc9e4d1b1d9c6eebe4935
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -4,13 +4,16 @@ Learn about the Closeio API at http://developer.close.io.
|
|
4
4
|
|
5
5
|
### Installation
|
6
6
|
Add this line to your application's Gemfile:
|
7
|
+
````ruby
|
8
|
+
# in your Gemfile
|
7
9
|
gem 'closeio'
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
+
# then...
|
12
|
+
bundle install
|
11
13
|
|
12
|
-
|
13
|
-
|
14
|
+
# Add your Close.io api key as an ENV variable
|
15
|
+
ENV['CLOSEIO_API_KEY']='xxxxxxxx'
|
16
|
+
````
|
14
17
|
|
15
18
|
### Usage
|
16
19
|
````ruby
|
@@ -25,8 +28,11 @@ Or install it yourself as:
|
|
25
28
|
# Find leads that match fields
|
26
29
|
Closeio::Lead.where query: 'custom.current_system:[Simple Donation]'
|
27
30
|
|
31
|
+
# Create a lead
|
32
|
+
Closeio::Lead.create name: "Bluth Company", contacts: [{name: "Buster Bluth", emails: [{email: "cartographer@bluthcompany.com"}]}]
|
33
|
+
|
28
34
|
# Saved Search (SmartView)
|
29
|
-
saved_search = Closeio::SavedSearch.first
|
35
|
+
saved_search = Closeio::SavedSearch.all.first
|
30
36
|
saved_search.leads
|
31
37
|
````
|
32
38
|
|
data/lib/closeio/base.rb
CHANGED
@@ -5,7 +5,7 @@ module Closeio
|
|
5
5
|
base_uri 'https://app.close.io/api/v1'
|
6
6
|
basic_auth ENV['CLOSEIO_API_KEY'], ''
|
7
7
|
headers 'Content-Type' => 'application/json'
|
8
|
-
debug_output $stdout
|
8
|
+
#debug_output $stdout
|
9
9
|
format :json
|
10
10
|
|
11
11
|
extend Forwardable
|
@@ -39,7 +39,7 @@ module Closeio
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
# Closeio::Lead.create
|
42
|
+
# Closeio::Lead.create name: "Bluth Company", contacts: [{name: "Buster Bluth", emails: [{email: "cartographer@bluthcompany.com"}]}]
|
43
43
|
def create opts={}
|
44
44
|
res = post resource_path, body: opts.to_json
|
45
45
|
res.success? ? new(res) : bad_response(res)
|
@@ -52,7 +52,7 @@ module Closeio
|
|
52
52
|
def destroy
|
53
53
|
if res['data'].is_a? Array
|
54
54
|
raise "Yo I'm an array"
|
55
|
-
|
55
|
+
else
|
56
56
|
delete "#{resource_path}#{id}"
|
57
57
|
end
|
58
58
|
|
data/lib/closeio/lead.rb
CHANGED
data/lib/closeio/saved_search.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: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taylor Brooks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: crack
|
@@ -127,8 +127,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
129
|
rubyforge_project:
|
130
|
-
rubygems_version: 2.0.
|
130
|
+
rubygems_version: 2.0.3
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: A Ruby wrapper for the CloseIO API
|
134
134
|
test_files: []
|
135
|
+
has_rdoc:
|