closeio 3.1.0 → 3.2.0
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 +1 -1
- data/Rakefile +2 -2
- data/closeio.gemspec +13 -14
- data/lib/closeio/client.rb +21 -16
- data/lib/closeio/error.rb +1 -1
- data/lib/closeio/resources/activity.rb +13 -15
- data/lib/closeio/resources/bulk_action.rb +4 -6
- data/lib/closeio/resources/contact.rb +3 -5
- data/lib/closeio/resources/custom_field.rb +3 -5
- data/lib/closeio/resources/email_account.rb +1 -3
- data/lib/closeio/resources/email_template.rb +3 -4
- data/lib/closeio/resources/event.rb +1 -3
- data/lib/closeio/resources/integration_link.rb +3 -5
- data/lib/closeio/resources/lead.rb +3 -5
- data/lib/closeio/resources/lead_status.rb +4 -6
- data/lib/closeio/resources/opportunity.rb +5 -7
- data/lib/closeio/resources/opportunity_status.rb +4 -6
- data/lib/closeio/resources/organization.rb +0 -2
- data/lib/closeio/resources/report.rb +0 -2
- data/lib/closeio/resources/sequence.rb +31 -0
- data/lib/closeio/resources/smart_view.rb +4 -6
- data/lib/closeio/resources/task.rb +5 -7
- data/lib/closeio/resources/user.rb +2 -3
- data/lib/closeio/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3054bac4abdd81bd3cd5cb436530281636e786a7
|
4
|
+
data.tar.gz: 3f1b82b28b6fe8a5a1c005690e094a9e77171e27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ffdb6265bc31a1fce272abfeed0342980e527276a7f3ad967126b65ba2c6ee90dc42bd1abae6020109d90f52c7ed9b403a3af8401a01e9517f1065c5611af28
|
7
|
+
data.tar.gz: 954c4e2653d6086b5503ee557655998bc520b09bb1b0b3c8afa85f022d24d71a72138d5bfdc5a1463439addb35829e4adbab6b9dc914291e0250ab201f590331
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
2
|
|
3
3
|
require 'rdoc/task'
|
4
4
|
Rake::RDocTask.new do |rdoc|
|
5
|
-
version = File.exist?('VERSION') ? File.read('VERSION') :
|
5
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ''
|
6
6
|
|
7
7
|
rdoc.rdoc_dir = 'rdoc'
|
8
8
|
rdoc.title = "closeio #{version}"
|
data/closeio.gemspec
CHANGED
@@ -1,31 +1,30 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require
|
4
|
-
require "base64"
|
1
|
+
$:.push File.expand_path('../lib', __FILE__)
|
2
|
+
require 'closeio/version'
|
3
|
+
require 'base64'
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
6
|
+
s.name = 'closeio'
|
8
7
|
s.version = Closeio::VERSION
|
9
|
-
s.authors = [
|
10
|
-
s.email = [
|
11
|
-
s.homepage =
|
12
|
-
s.summary =
|
13
|
-
s.description =
|
14
|
-
s.license =
|
8
|
+
s.authors = ['Taylor Brooks']
|
9
|
+
s.email = ['dGJyb29rc0BnbWFpbC5jb20='].map { |e| Base64.decode64(e) }
|
10
|
+
s.homepage = 'https://github.com/taylorbrooks/closeio'
|
11
|
+
s.summary = 'A Ruby wrapper for the CloseIO API'
|
12
|
+
s.description = 'A Ruby wrapper for the CloseIO API -- a sales CRM built by salespeople, for salespeople.'
|
13
|
+
s.license = 'MIT'
|
15
14
|
|
16
15
|
s.files = `git ls-files`.split($/)
|
17
|
-
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
16
|
+
s.executables = s.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
18
17
|
s.test_files = s.files.grep(%r{^(test)/})
|
19
18
|
|
20
|
-
s.require_paths = [
|
19
|
+
s.require_paths = ['lib']
|
21
20
|
|
22
21
|
s.add_runtime_dependency 'faraday'
|
23
22
|
s.add_runtime_dependency 'faraday_middleware'
|
24
23
|
s.add_runtime_dependency 'json'
|
25
24
|
|
26
25
|
s.add_development_dependency 'bundler'
|
27
|
-
s.add_development_dependency 'rake'
|
28
26
|
s.add_development_dependency 'minitest'
|
27
|
+
s.add_development_dependency 'rake'
|
29
28
|
s.add_development_dependency 'vcr'
|
30
29
|
s.add_development_dependency 'webmock'
|
31
30
|
end
|
data/lib/closeio/client.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
require 'faraday'
|
2
2
|
require 'faraday_middleware'
|
3
|
-
require_relative
|
4
|
-
require_relative
|
3
|
+
require_relative 'error'
|
4
|
+
require_relative 'version'
|
5
5
|
|
6
|
-
Dir[File.expand_path('../resources/*.rb', __FILE__)].each{|f| require f}
|
6
|
+
Dir[File.expand_path('../resources/*.rb', __FILE__)].each { |f| require f }
|
7
7
|
|
8
8
|
module Closeio
|
9
9
|
class Client
|
@@ -21,6 +21,7 @@ module Closeio
|
|
21
21
|
include Closeio::Client::OpportunityStatus
|
22
22
|
include Closeio::Client::Organization
|
23
23
|
include Closeio::Client::Report
|
24
|
+
include Closeio::Client::Sequence
|
24
25
|
include Closeio::Client::SmartView
|
25
26
|
include Closeio::Client::Task
|
26
27
|
include Closeio::Client::User
|
@@ -35,7 +36,7 @@ module Closeio
|
|
35
36
|
@utc_offset = utc_offset
|
36
37
|
end
|
37
38
|
|
38
|
-
def get(path, options={})
|
39
|
+
def get(path, options = {})
|
39
40
|
connection.get(path, options).body
|
40
41
|
end
|
41
42
|
|
@@ -46,7 +47,7 @@ module Closeio
|
|
46
47
|
end.body
|
47
48
|
end
|
48
49
|
|
49
|
-
def put(path, options={})
|
50
|
+
def put(path, options = {})
|
50
51
|
connection.put(path, options).body
|
51
52
|
end
|
52
53
|
|
@@ -54,7 +55,7 @@ module Closeio
|
|
54
55
|
connection.delete(path, options).body
|
55
56
|
end
|
56
57
|
|
57
|
-
def paginate(path, options={})
|
58
|
+
def paginate(path, options = {})
|
58
59
|
results = []
|
59
60
|
skip = 0
|
60
61
|
|
@@ -65,27 +66,31 @@ module Closeio
|
|
65
66
|
skip += res['data'].count
|
66
67
|
end
|
67
68
|
end while res['has_more']
|
68
|
-
{has_more: false, total_results: res['total_results'], data: results.flatten}
|
69
|
+
{ has_more: false, total_results: res['total_results'], data: results.flatten }
|
69
70
|
end
|
70
71
|
|
71
72
|
private
|
72
73
|
|
73
74
|
def assemble_list_query(query, options)
|
74
75
|
options[:query] = if query.respond_to? :map
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
query.map { |k, v| "#{k}:'#{v}'" }.join(' ')
|
77
|
+
else
|
78
|
+
query
|
79
|
+
end
|
79
80
|
|
80
81
|
options
|
81
82
|
end
|
82
83
|
|
83
84
|
def connection
|
84
|
-
Faraday.new(
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
85
|
+
Faraday.new(
|
86
|
+
url: 'https://app.close.io/api/v1',
|
87
|
+
headers: {
|
88
|
+
accept: 'application/json',
|
89
|
+
'User-Agent' => "closeio-ruby-gem/v#{Closeio::VERSION}",
|
90
|
+
'X-TZ-Offset' => utc_offset.to_s
|
91
|
+
},
|
92
|
+
ssl: { ca_file: ca_file }
|
93
|
+
) do |conn|
|
89
94
|
conn.basic_auth api_key, ''
|
90
95
|
conn.request :json
|
91
96
|
conn.response :logger if logger
|
data/lib/closeio/error.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
module Closeio
|
2
2
|
class Client
|
3
3
|
module Activity
|
4
|
-
|
5
|
-
def list_activities(options={})
|
4
|
+
def list_activities(options = {})
|
6
5
|
get(activity_path, options)
|
7
6
|
end
|
8
7
|
|
@@ -10,7 +9,7 @@ module Closeio
|
|
10
9
|
# Note Activities
|
11
10
|
#
|
12
11
|
|
13
|
-
def list_notes(options={})
|
12
|
+
def list_notes(options = {})
|
14
13
|
get(note_path, options)
|
15
14
|
end
|
16
15
|
|
@@ -22,7 +21,7 @@ module Closeio
|
|
22
21
|
post(note_path, options)
|
23
22
|
end
|
24
23
|
|
25
|
-
def update_note(id, options={})
|
24
|
+
def update_note(id, options = {})
|
26
25
|
put("#{note_path}#{id}/", options)
|
27
26
|
end
|
28
27
|
|
@@ -34,7 +33,7 @@ module Closeio
|
|
34
33
|
# Email Activities
|
35
34
|
#
|
36
35
|
|
37
|
-
def list_emails(options={})
|
36
|
+
def list_emails(options = {})
|
38
37
|
get(email_path, options)
|
39
38
|
end
|
40
39
|
|
@@ -46,7 +45,7 @@ module Closeio
|
|
46
45
|
post(email_path, body)
|
47
46
|
end
|
48
47
|
|
49
|
-
def update_email(id, options={})
|
48
|
+
def update_email(id, options = {})
|
50
49
|
put("#{email_path}#{id}/", options)
|
51
50
|
end
|
52
51
|
|
@@ -58,7 +57,7 @@ module Closeio
|
|
58
57
|
# EmailThread Activities
|
59
58
|
#
|
60
59
|
|
61
|
-
def list_emailthreads(options={})
|
60
|
+
def list_emailthreads(options = {})
|
62
61
|
get(emailthread_path, options)
|
63
62
|
end
|
64
63
|
|
@@ -74,11 +73,11 @@ module Closeio
|
|
74
73
|
# Call Activities
|
75
74
|
#
|
76
75
|
|
77
|
-
def list_calls(options={})
|
76
|
+
def list_calls(options = {})
|
78
77
|
get(call_path, options)
|
79
78
|
end
|
80
79
|
|
81
|
-
def create_call(options={})
|
80
|
+
def create_call(options = {})
|
82
81
|
post(call_path, options)
|
83
82
|
end
|
84
83
|
|
@@ -89,25 +88,24 @@ module Closeio
|
|
89
88
|
private
|
90
89
|
|
91
90
|
def activity_path
|
92
|
-
|
91
|
+
'activity/'
|
93
92
|
end
|
94
93
|
|
95
94
|
def note_path
|
96
|
-
|
95
|
+
'activity/note/'
|
97
96
|
end
|
98
97
|
|
99
98
|
def email_path
|
100
|
-
|
99
|
+
'activity/email/'
|
101
100
|
end
|
102
101
|
|
103
102
|
def emailthread_path
|
104
|
-
|
103
|
+
'activity/emailthread/'
|
105
104
|
end
|
106
105
|
|
107
106
|
def call_path
|
108
|
-
|
107
|
+
'activity/call/'
|
109
108
|
end
|
110
|
-
|
111
109
|
end
|
112
110
|
end
|
113
111
|
end
|
@@ -1,20 +1,19 @@
|
|
1
1
|
module Closeio
|
2
2
|
class Client
|
3
3
|
module BulkAction
|
4
|
-
|
5
4
|
def list_bulk_emails
|
6
5
|
get(bulk_action_path)
|
7
6
|
end
|
8
7
|
|
9
|
-
def send_bulk_email(options={})
|
8
|
+
def send_bulk_email(options = {})
|
10
9
|
post("#{bulk_action_path}email/", options)
|
11
10
|
end
|
12
11
|
|
13
|
-
def bulk_delete(options={})
|
12
|
+
def bulk_delete(options = {})
|
14
13
|
post("#{bulk_action_path}delete/", options)
|
15
14
|
end
|
16
15
|
|
17
|
-
def bulk_edit(options={})
|
16
|
+
def bulk_edit(options = {})
|
18
17
|
# query: search query for the edit
|
19
18
|
# type:
|
20
19
|
# set_lead_status: lead_status_id
|
@@ -26,9 +25,8 @@ module Closeio
|
|
26
25
|
private
|
27
26
|
|
28
27
|
def bulk_action_path
|
29
|
-
|
28
|
+
'bulk_action/'
|
30
29
|
end
|
31
|
-
|
32
30
|
end
|
33
31
|
end
|
34
32
|
end
|
@@ -1,8 +1,7 @@
|
|
1
1
|
module Closeio
|
2
2
|
class Client
|
3
3
|
module Contact
|
4
|
-
|
5
|
-
def list_contacts(params=nil)
|
4
|
+
def list_contacts(_params = nil)
|
6
5
|
get(contact_path)
|
7
6
|
end
|
8
7
|
|
@@ -24,10 +23,9 @@ module Closeio
|
|
24
23
|
|
25
24
|
private
|
26
25
|
|
27
|
-
def contact_path(id=nil)
|
28
|
-
id ? "contact/#{id}/" :
|
26
|
+
def contact_path(id = nil)
|
27
|
+
id ? "contact/#{id}/" : 'contact/'
|
29
28
|
end
|
30
|
-
|
31
29
|
end
|
32
30
|
end
|
33
31
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Closeio
|
2
2
|
class Client
|
3
3
|
module CustomField
|
4
|
-
|
5
4
|
def list_custom_fields
|
6
5
|
get(custom_field_path)
|
7
6
|
end
|
@@ -10,11 +9,11 @@ module Closeio
|
|
10
9
|
get("#{custom_field_path}#{id}/")
|
11
10
|
end
|
12
11
|
|
13
|
-
def create_custom_field(options={})
|
12
|
+
def create_custom_field(options = {})
|
14
13
|
post(custom_field_path, options)
|
15
14
|
end
|
16
15
|
|
17
|
-
def update_custom_field(id, options={})
|
16
|
+
def update_custom_field(id, options = {})
|
18
17
|
put("#{custom_field_path}#{id}/", options)
|
19
18
|
end
|
20
19
|
|
@@ -25,9 +24,8 @@ module Closeio
|
|
25
24
|
private
|
26
25
|
|
27
26
|
def custom_field_path
|
28
|
-
|
27
|
+
'custom_fields/lead/'
|
29
28
|
end
|
30
|
-
|
31
29
|
end
|
32
30
|
end
|
33
31
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Closeio
|
2
2
|
class Client
|
3
3
|
module EmailTemplate
|
4
|
-
|
5
4
|
def list_email_templates(params = {}, paginate = false)
|
6
5
|
if paginate
|
7
6
|
paginate(email_template_path, params)
|
@@ -22,11 +21,11 @@ module Closeio
|
|
22
21
|
end
|
23
22
|
end
|
24
23
|
|
25
|
-
def create_email_template(
|
24
|
+
def create_email_template(_id, options = {})
|
26
25
|
post(email_template_path, options)
|
27
26
|
end
|
28
27
|
|
29
|
-
def update_email_template(id, options={})
|
28
|
+
def update_email_template(id, options = {})
|
30
29
|
put("#{email_template_path}#{id}/", options)
|
31
30
|
end
|
32
31
|
|
@@ -37,7 +36,7 @@ module Closeio
|
|
37
36
|
private
|
38
37
|
|
39
38
|
def email_template_path
|
40
|
-
|
39
|
+
'email_template/'
|
41
40
|
end
|
42
41
|
end
|
43
42
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Closeio
|
2
2
|
class Client
|
3
3
|
module IntegrationLink
|
4
|
-
|
5
4
|
def list_integration_links
|
6
5
|
get(integration_link_path)
|
7
6
|
end
|
@@ -10,11 +9,11 @@ module Closeio
|
|
10
9
|
get("#{integration_link_path}#{id}/")
|
11
10
|
end
|
12
11
|
|
13
|
-
def create_integration_link(options={})
|
12
|
+
def create_integration_link(options = {})
|
14
13
|
post(integration_link_path, options)
|
15
14
|
end
|
16
15
|
|
17
|
-
def update_integration_link(id, options={})
|
16
|
+
def update_integration_link(id, options = {})
|
18
17
|
put("#{integration_link_path}#{id}/", options)
|
19
18
|
end
|
20
19
|
|
@@ -25,9 +24,8 @@ module Closeio
|
|
25
24
|
private
|
26
25
|
|
27
26
|
def integration_link_path
|
28
|
-
|
27
|
+
'integration_link/'
|
29
28
|
end
|
30
|
-
|
31
29
|
end
|
32
30
|
end
|
33
31
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Closeio
|
2
2
|
class Client
|
3
3
|
module Lead
|
4
|
-
|
5
4
|
def list_leads(query = {}, paginate = false, fields = nil, options = {})
|
6
5
|
options[:_fields] = fields if fields
|
7
6
|
params = assemble_list_query query, options
|
@@ -30,15 +29,14 @@ module Closeio
|
|
30
29
|
end
|
31
30
|
|
32
31
|
def merge_leads(id_source, id_destination)
|
33
|
-
post('lead/merge/',
|
32
|
+
post('lead/merge/', source: id_source, destination: id_destination)
|
34
33
|
end
|
35
34
|
|
36
35
|
private
|
37
36
|
|
38
|
-
def lead_path(id=nil)
|
39
|
-
id ? "lead/#{id}/" :
|
37
|
+
def lead_path(id = nil)
|
38
|
+
id ? "lead/#{id}/" : 'lead/'
|
40
39
|
end
|
41
|
-
|
42
40
|
end
|
43
41
|
end
|
44
42
|
end
|
@@ -1,16 +1,15 @@
|
|
1
1
|
module Closeio
|
2
2
|
class Client
|
3
3
|
module LeadStatus
|
4
|
-
|
5
4
|
def list_lead_statuses
|
6
5
|
get(lead_status_path)
|
7
6
|
end
|
8
7
|
|
9
|
-
def create_lead_status(options={})
|
8
|
+
def create_lead_status(options = {})
|
10
9
|
post(lead_status_path, options)
|
11
10
|
end
|
12
11
|
|
13
|
-
def update_lead_status(id, options={})
|
12
|
+
def update_lead_status(id, options = {})
|
14
13
|
put(lead_status_path(id), options)
|
15
14
|
end
|
16
15
|
|
@@ -20,10 +19,9 @@ module Closeio
|
|
20
19
|
|
21
20
|
private
|
22
21
|
|
23
|
-
def lead_status_path(id=nil)
|
24
|
-
id ? "status/lead/#{id}/" :
|
22
|
+
def lead_status_path(id = nil)
|
23
|
+
id ? "status/lead/#{id}/" : 'status/lead/'
|
25
24
|
end
|
26
|
-
|
27
25
|
end
|
28
26
|
end
|
29
27
|
end
|
@@ -1,8 +1,7 @@
|
|
1
1
|
module Closeio
|
2
2
|
class Client
|
3
3
|
module Opportunity
|
4
|
-
|
5
|
-
def list_opportunities(options={}, paginate = false)
|
4
|
+
def list_opportunities(options = {}, paginate = false)
|
6
5
|
if paginate
|
7
6
|
paginate(opportunity_path, options)
|
8
7
|
else
|
@@ -14,11 +13,11 @@ module Closeio
|
|
14
13
|
get(opportunity_path(id))
|
15
14
|
end
|
16
15
|
|
17
|
-
def create_opportunity(options={})
|
16
|
+
def create_opportunity(options = {})
|
18
17
|
post(opportunity_path, options)
|
19
18
|
end
|
20
19
|
|
21
|
-
def update_opportunity(id, options={})
|
20
|
+
def update_opportunity(id, options = {})
|
22
21
|
put(opportunity_path(id), options)
|
23
22
|
end
|
24
23
|
|
@@ -28,10 +27,9 @@ module Closeio
|
|
28
27
|
|
29
28
|
private
|
30
29
|
|
31
|
-
def opportunity_path(id=nil)
|
32
|
-
id ? "opportunity/#{id}/" :
|
30
|
+
def opportunity_path(id = nil)
|
31
|
+
id ? "opportunity/#{id}/" : 'opportunity/'
|
33
32
|
end
|
34
|
-
|
35
33
|
end
|
36
34
|
end
|
37
35
|
end
|
@@ -1,16 +1,15 @@
|
|
1
1
|
module Closeio
|
2
2
|
class Client
|
3
3
|
module OpportunityStatus
|
4
|
-
|
5
4
|
def list_opportunity_statuses
|
6
5
|
get(opportunity_status_path)
|
7
6
|
end
|
8
7
|
|
9
|
-
def create_opportunity_status(options={})
|
8
|
+
def create_opportunity_status(options = {})
|
10
9
|
post(opportunity_status_path, options)
|
11
10
|
end
|
12
11
|
|
13
|
-
def update_opportunity_status(id, options={})
|
12
|
+
def update_opportunity_status(id, options = {})
|
14
13
|
put(opportunity_status_path(id), options)
|
15
14
|
end
|
16
15
|
|
@@ -20,10 +19,9 @@ module Closeio
|
|
20
19
|
|
21
20
|
private
|
22
21
|
|
23
|
-
def opportunity_status_path(id=nil)
|
24
|
-
id ? "status/opportunity/#{id}/" :
|
22
|
+
def opportunity_status_path(id = nil)
|
23
|
+
id ? "status/opportunity/#{id}/" : 'status/opportunity/'
|
25
24
|
end
|
26
|
-
|
27
25
|
end
|
28
26
|
end
|
29
27
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Closeio
|
2
2
|
class Client
|
3
3
|
module Organization
|
4
|
-
|
5
4
|
def find_organization(id)
|
6
5
|
get("organization/#{id}/")
|
7
6
|
end
|
@@ -9,7 +8,6 @@ module Closeio
|
|
9
8
|
def update_organization(id, options = {})
|
10
9
|
put("organization/#{id}/", options)
|
11
10
|
end
|
12
|
-
|
13
11
|
end
|
14
12
|
end
|
15
13
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Closeio
|
2
2
|
class Client
|
3
3
|
module Report
|
4
|
-
|
5
4
|
# OPTIONS [date_start, date_end, user_id]
|
6
5
|
def activity_report(organization_id, options = {})
|
7
6
|
get("report/activity/#{organization_id}/?", options)
|
@@ -16,7 +15,6 @@ module Closeio
|
|
16
15
|
def sent_emails_report(organization_id, options = {})
|
17
16
|
get("report/sent_emails/#{organization_id}/", options)
|
18
17
|
end
|
19
|
-
|
20
18
|
end
|
21
19
|
end
|
22
20
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Closeio
|
2
|
+
class Client
|
3
|
+
module Sequence
|
4
|
+
def list_sequences
|
5
|
+
get(sequence_path, {})
|
6
|
+
end
|
7
|
+
|
8
|
+
def find_sequence(id)
|
9
|
+
get(sequence_path(id))
|
10
|
+
end
|
11
|
+
|
12
|
+
def create_sequence(options = {})
|
13
|
+
post(sequence_path, options)
|
14
|
+
end
|
15
|
+
|
16
|
+
def update_sequence(id, options = {})
|
17
|
+
put(sequence_path(id), options)
|
18
|
+
end
|
19
|
+
|
20
|
+
def delete_sequence(id)
|
21
|
+
delete(sequence_path(id))
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def sequence_path(id = nil)
|
27
|
+
id ? "sequence/#{id}/" : 'sequence/'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Closeio
|
2
2
|
class Client
|
3
3
|
module SmartView
|
4
|
-
|
5
4
|
def list_smart_views
|
6
5
|
get(smart_view_path)
|
7
6
|
end
|
@@ -10,11 +9,11 @@ module Closeio
|
|
10
9
|
get(smart_view_path(id))
|
11
10
|
end
|
12
11
|
|
13
|
-
def create_smart_view(options={})
|
12
|
+
def create_smart_view(options = {})
|
14
13
|
post(smart_view_path, options)
|
15
14
|
end
|
16
15
|
|
17
|
-
def update_smart_view(id, options={})
|
16
|
+
def update_smart_view(id, options = {})
|
18
17
|
put(smart_view_path(id), options)
|
19
18
|
end
|
20
19
|
|
@@ -24,10 +23,9 @@ module Closeio
|
|
24
23
|
|
25
24
|
private
|
26
25
|
|
27
|
-
def smart_view_path(id=nil)
|
28
|
-
id ? "saved_search/#{id}/" :
|
26
|
+
def smart_view_path(id = nil)
|
27
|
+
id ? "saved_search/#{id}/" : 'saved_search/'
|
29
28
|
end
|
30
|
-
|
31
29
|
end
|
32
30
|
end
|
33
31
|
end
|
@@ -1,8 +1,7 @@
|
|
1
1
|
module Closeio
|
2
2
|
class Client
|
3
3
|
module Task
|
4
|
-
|
5
|
-
def list_tasks(options={})
|
4
|
+
def list_tasks(options = {})
|
6
5
|
get(task_path, options)
|
7
6
|
end
|
8
7
|
|
@@ -10,11 +9,11 @@ module Closeio
|
|
10
9
|
get(task_path(id))
|
11
10
|
end
|
12
11
|
|
13
|
-
def create_task(options={})
|
12
|
+
def create_task(options = {})
|
14
13
|
post(task_path, options)
|
15
14
|
end
|
16
15
|
|
17
|
-
def update_task(id, options={})
|
16
|
+
def update_task(id, options = {})
|
18
17
|
put(task_path(id), options)
|
19
18
|
end
|
20
19
|
|
@@ -24,10 +23,9 @@ module Closeio
|
|
24
23
|
|
25
24
|
private
|
26
25
|
|
27
|
-
def task_path(id=nil)
|
28
|
-
id ? "task/#{id}/" :
|
26
|
+
def task_path(id = nil)
|
27
|
+
id ? "task/#{id}/" : 'task/'
|
29
28
|
end
|
30
|
-
|
31
29
|
end
|
32
30
|
end
|
33
31
|
end
|
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: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taylor Brooks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: minitest
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -156,6 +156,7 @@ files:
|
|
156
156
|
- lib/closeio/resources/organization.rb
|
157
157
|
- lib/closeio/resources/paginated_list.rb
|
158
158
|
- lib/closeio/resources/report.rb
|
159
|
+
- lib/closeio/resources/sequence.rb
|
159
160
|
- lib/closeio/resources/smart_view.rb
|
160
161
|
- lib/closeio/resources/task.rb
|
161
162
|
- lib/closeio/resources/user.rb
|