KayakoClient 1.0.2 → 1.1.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.
- data/lib/kayako_client.rb +31 -0
- data/lib/kayako_client/base.rb +23 -0
- data/lib/kayako_client/custom_field.rb +14 -0
- data/lib/kayako_client/department.rb +18 -3
- data/lib/kayako_client/http/http.rb +14 -0
- data/lib/kayako_client/http/http_backend.rb +14 -0
- data/lib/kayako_client/http/http_client.rb +14 -0
- data/lib/kayako_client/http/http_response.rb +14 -0
- data/lib/kayako_client/http/net_http.rb +14 -0
- data/lib/kayako_client/knowledgebase_article.rb +131 -0
- data/lib/kayako_client/knowledgebase_attachment.rb +59 -0
- data/lib/kayako_client/knowledgebase_category.rb +71 -0
- data/lib/kayako_client/knowledgebase_comment.rb +32 -0
- data/lib/kayako_client/mixins/api.rb +14 -0
- data/lib/kayako_client/mixins/article_client.rb +76 -0
- data/lib/kayako_client/mixins/attachment.rb +16 -1
- data/lib/kayako_client/mixins/authentication.rb +14 -0
- data/lib/kayako_client/mixins/client.rb +300 -0
- data/lib/kayako_client/mixins/comment_object.rb +102 -0
- data/lib/kayako_client/mixins/convert_api.rb +39 -0
- data/lib/kayako_client/mixins/creator_api.rb +44 -0
- data/lib/kayako_client/mixins/knowledgebase_article_api.rb +69 -0
- data/lib/kayako_client/mixins/knowledgebase_category_client.rb +51 -0
- data/lib/kayako_client/mixins/logger.rb +14 -0
- data/lib/kayako_client/mixins/news_category_client.rb +51 -0
- data/lib/kayako_client/mixins/news_client.rb +51 -0
- data/lib/kayako_client/mixins/object.rb +24 -7
- data/lib/kayako_client/mixins/post_client.rb +14 -0
- data/lib/kayako_client/mixins/staff_visibility_api.rb +14 -0
- data/lib/kayako_client/mixins/ticket_api.rb +14 -0
- data/lib/kayako_client/mixins/ticket_client.rb +14 -0
- data/lib/kayako_client/mixins/troubleshooter_step_api.rb +69 -0
- data/lib/kayako_client/mixins/troubleshooter_step_client.rb +76 -0
- data/lib/kayako_client/mixins/user_visibility_api.rb +14 -0
- data/lib/kayako_client/news_category.rb +29 -0
- data/lib/kayako_client/news_comment.rb +32 -0
- data/lib/kayako_client/news_item.rb +81 -0
- data/lib/kayako_client/news_subscriber.rb +33 -0
- data/lib/kayako_client/staff.rb +14 -0
- data/lib/kayako_client/staff_group.rb +14 -0
- data/lib/kayako_client/ticket.rb +24 -1
- data/lib/kayako_client/ticket_attachment.rb +18 -0
- data/lib/kayako_client/ticket_count.rb +14 -0
- data/lib/kayako_client/ticket_custom_field.rb +14 -0
- data/lib/kayako_client/ticket_note.rb +14 -1
- data/lib/kayako_client/ticket_post.rb +15 -0
- data/lib/kayako_client/ticket_priority.rb +14 -0
- data/lib/kayako_client/ticket_status.rb +14 -0
- data/lib/kayako_client/ticket_time_track.rb +14 -0
- data/lib/kayako_client/ticket_type.rb +14 -0
- data/lib/kayako_client/troubleshooter_attachment.rb +68 -0
- data/lib/kayako_client/troubleshooter_category.rb +51 -0
- data/lib/kayako_client/troubleshooter_comment.rb +32 -0
- data/lib/kayako_client/troubleshooter_step.rb +100 -0
- data/lib/kayako_client/user.rb +42 -0
- data/lib/kayako_client/user_group.rb +14 -0
- data/lib/kayako_client/user_organization.rb +14 -0
- data/lib/kayako_client/xml/lib_xml.rb +14 -0
- data/lib/kayako_client/xml/rexml_document.rb +14 -0
- data/lib/kayako_client/xml/xml.rb +14 -0
- data/lib/kayako_client/xml/xml_backend.rb +14 -0
- data/test/test_attachment.rb +77 -0
- data/test/test_client.rb +191 -0
- data/test/test_configuration.rb +110 -0
- data/test/test_count.rb +162 -0
- data/test/test_custom_field.rb +86 -0
- data/test/test_department.rb +136 -0
- data/test/test_http.rb +34 -0
- data/test/test_knowledgebase.rb +155 -0
- data/test/test_news.rb +117 -0
- data/test/test_note.rb +64 -0
- data/test/test_post.rb +64 -0
- data/test/test_priority.rb +46 -0
- data/test/test_properties.rb +114 -0
- data/test/test_staff.rb +77 -0
- data/test/test_status.rb +52 -0
- data/test/test_ticket.rb +152 -0
- data/test/test_ticket_custom_field.rb +193 -0
- data/test/test_time_track.rb +68 -0
- data/test/test_troubleshooter.rb +106 -0
- data/test/test_type.rb +65 -0
- data/test/test_user.rb +95 -0
- data/test/test_xml.rb +183 -0
- metadata +89 -42
@@ -0,0 +1,32 @@
|
|
1
|
+
#######################################################################
|
2
|
+
#
|
3
|
+
# Kayako Ruby REST API library
|
4
|
+
# _____________________________________________________________________
|
5
|
+
#
|
6
|
+
# @author Andriy Lesyuk
|
7
|
+
#
|
8
|
+
# @package KayakoClient
|
9
|
+
# @copyright Copyright (c) 2011-2013, Kayako
|
10
|
+
# @license FreeBSD
|
11
|
+
# @link http://forge.kayako.com/projects/kayako-ruby-api-library
|
12
|
+
#
|
13
|
+
#######################################################################
|
14
|
+
|
15
|
+
require 'kayako_client/mixins/creator_api'
|
16
|
+
require 'kayako_client/mixins/comment_object'
|
17
|
+
|
18
|
+
require 'kayako_client/knowledgebase_article'
|
19
|
+
|
20
|
+
module KayakoClient
|
21
|
+
class KnowledgebaseComment < KayakoClient::Knowledgebase
|
22
|
+
include KayakoClient::CreatorAPI
|
23
|
+
include KayakoClient::CommentObject
|
24
|
+
|
25
|
+
path '/Knowledgebase/Comment'
|
26
|
+
|
27
|
+
property :kb_article_id, :integer, :required => :post, :set => :knowledgebasearticleid
|
28
|
+
|
29
|
+
associate :article, :kb_article_id, KnowledgebaseArticle
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
@@ -1,3 +1,17 @@
|
|
1
|
+
#######################################################################
|
2
|
+
#
|
3
|
+
# Kayako Ruby REST API library
|
4
|
+
# _____________________________________________________________________
|
5
|
+
#
|
6
|
+
# @author Andriy Lesyuk
|
7
|
+
#
|
8
|
+
# @package KayakoClient
|
9
|
+
# @copyright Copyright (c) 2011-2013, Kayako
|
10
|
+
# @license FreeBSD
|
11
|
+
# @link http://forge.kayako.com/projects/kayako-ruby-api-library
|
12
|
+
#
|
13
|
+
#######################################################################
|
14
|
+
|
1
15
|
module KayakoClient
|
2
16
|
module API
|
3
17
|
|
@@ -0,0 +1,76 @@
|
|
1
|
+
#######################################################################
|
2
|
+
#
|
3
|
+
# Kayako Ruby REST API library
|
4
|
+
# _____________________________________________________________________
|
5
|
+
#
|
6
|
+
# @author Andriy Lesyuk
|
7
|
+
#
|
8
|
+
# @package KayakoClient
|
9
|
+
# @copyright Copyright (c) 2011-2013, Kayako
|
10
|
+
# @license FreeBSD
|
11
|
+
# @link http://forge.kayako.com/projects/kayako-ruby-api-library
|
12
|
+
#
|
13
|
+
#######################################################################
|
14
|
+
|
15
|
+
module KayakoClient
|
16
|
+
module ArticleClient
|
17
|
+
|
18
|
+
def get_attachment(attachment, options = {})
|
19
|
+
KayakoClient::KnowledgebaseAttachment.get(kb_article_id, attachment, options.merge(inherited_options)) if kb_article_id
|
20
|
+
end
|
21
|
+
|
22
|
+
alias_method :find_attachment, :get_attachment
|
23
|
+
|
24
|
+
def post_attachment(options = {})
|
25
|
+
if kb_article_id
|
26
|
+
if logger && options[:kb_article_id] && options[:kb_article_id].to_i != kb_article_id
|
27
|
+
logger.warn "overwriting :kb_article_id"
|
28
|
+
end
|
29
|
+
options[:kb_article_id] = kb_article_id
|
30
|
+
KayakoClient::KnowledgebaseAttachment.post(options.merge(inherited_options))
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
alias_method :create_attachment, :post_attachment
|
35
|
+
|
36
|
+
def delete_attachment(attachment, options = {})
|
37
|
+
KayakoClient::KnowledgebaseAttachment.delete(kb_article_id, attachment, options.merge(inherited_options)) if kb_article_id
|
38
|
+
end
|
39
|
+
|
40
|
+
alias_method :destroy_attachment, :delete_attachment
|
41
|
+
|
42
|
+
|
43
|
+
def comments(options = {})
|
44
|
+
KayakoClient::KnowledgebaseComment.all(kb_article_id, options.merge(inherited_options)) if kb_article_id
|
45
|
+
end
|
46
|
+
|
47
|
+
def get_comment(comment, options = {})
|
48
|
+
if kb_article_id
|
49
|
+
value = KayakoClient::KnowledgebaseComment.get(comment, options.merge(inherited_options))
|
50
|
+
value && value.kb_article_id == kb_article_id ? value : nil
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
alias_method :find_comment, :get_comment
|
55
|
+
|
56
|
+
def post_comment(options = {})
|
57
|
+
if kb_article_id
|
58
|
+
if logger && options[:kb_article_id] && options[:kb_article_id].to_i != kb_article_id
|
59
|
+
logger.warn "overwriting :kb_article_id"
|
60
|
+
end
|
61
|
+
options[:kb_article_id] = kb_article_id
|
62
|
+
KayakoClient::KnowledgebaseComment.post(options.merge(inherited_options))
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
alias_method :create_comment, :post_comment
|
67
|
+
|
68
|
+
def delete_comment(comment, options = {})
|
69
|
+
article_comment = get_comment(comment, options.merge(inherited_options))
|
70
|
+
article_comment.delete if article_comment
|
71
|
+
end
|
72
|
+
|
73
|
+
alias_method :destroy_comment, :delete_comment
|
74
|
+
|
75
|
+
end
|
76
|
+
end
|
@@ -1,3 +1,17 @@
|
|
1
|
+
#######################################################################
|
2
|
+
#
|
3
|
+
# Kayako Ruby REST API library
|
4
|
+
# _____________________________________________________________________
|
5
|
+
#
|
6
|
+
# @author Andriy Lesyuk
|
7
|
+
#
|
8
|
+
# @package KayakoClient
|
9
|
+
# @copyright Copyright (c) 2011-2013, Kayako
|
10
|
+
# @license FreeBSD
|
11
|
+
# @link http://forge.kayako.com/projects/kayako-ruby-api-library
|
12
|
+
#
|
13
|
+
#######################################################################
|
14
|
+
|
1
15
|
require 'tempfile'
|
2
16
|
|
3
17
|
module KayakoClient
|
@@ -32,7 +46,7 @@ module KayakoClient
|
|
32
46
|
f.read
|
33
47
|
end
|
34
48
|
else
|
35
|
-
raise ArgumentError, "
|
49
|
+
raise ArgumentError, "argument must be either File or path"
|
36
50
|
end
|
37
51
|
changes(:contents)
|
38
52
|
if !self.class.options[:file_name] ||
|
@@ -56,6 +70,7 @@ module KayakoClient
|
|
56
70
|
elsif contents
|
57
71
|
raise RuntimeError, "not a remote file" unless id && !new?
|
58
72
|
@file = Tempfile.new(file_name.split('.').first || 'kayako_attachment')
|
73
|
+
@file.binmode
|
59
74
|
@file.write(contents)
|
60
75
|
@file.flush
|
61
76
|
@file.rewind
|
@@ -1,3 +1,17 @@
|
|
1
|
+
#######################################################################
|
2
|
+
#
|
3
|
+
# Kayako Ruby REST API library
|
4
|
+
# _____________________________________________________________________
|
5
|
+
#
|
6
|
+
# @author Andriy Lesyuk
|
7
|
+
#
|
8
|
+
# @package KayakoClient
|
9
|
+
# @copyright Copyright (c) 2011-2013, Kayako
|
10
|
+
# @license FreeBSD
|
11
|
+
# @link http://forge.kayako.com/projects/kayako-ruby-api-library
|
12
|
+
#
|
13
|
+
#######################################################################
|
14
|
+
|
1
15
|
require 'base64'
|
2
16
|
|
3
17
|
module KayakoClient
|
@@ -1,3 +1,17 @@
|
|
1
|
+
#######################################################################
|
2
|
+
#
|
3
|
+
# Kayako Ruby REST API library
|
4
|
+
# _____________________________________________________________________
|
5
|
+
#
|
6
|
+
# @author Andriy Lesyuk
|
7
|
+
#
|
8
|
+
# @package KayakoClient
|
9
|
+
# @copyright Copyright (c) 2011-2013, Kayako
|
10
|
+
# @license FreeBSD
|
11
|
+
# @link http://forge.kayako.com/projects/kayako-ruby-api-library
|
12
|
+
#
|
13
|
+
#######################################################################
|
14
|
+
|
1
15
|
module KayakoClient
|
2
16
|
module Client
|
3
17
|
|
@@ -24,6 +38,196 @@ module KayakoClient
|
|
24
38
|
alias_method :destroy_department, :delete_department
|
25
39
|
|
26
40
|
|
41
|
+
def knowledgebase_articles(*args)
|
42
|
+
options = args.last.is_a?(Hash) ? args.pop : {}
|
43
|
+
args << options.merge(inherited_options)
|
44
|
+
KayakoClient::KnowledgebaseArticle.all(*args)
|
45
|
+
end
|
46
|
+
|
47
|
+
def get_knowledgebase_article(id = :all, options = {})
|
48
|
+
KayakoClient::KnowledgebaseArticle.get(id, options.merge(inherited_options))
|
49
|
+
end
|
50
|
+
|
51
|
+
alias_method :find_knowledgebase_article, :get_knowledgebase_article
|
52
|
+
|
53
|
+
def post_knowledgebase_article(options = {})
|
54
|
+
KayakoClient::KnowledgebaseArticle.post(options.merge(inherited_options))
|
55
|
+
end
|
56
|
+
|
57
|
+
alias_method :create_knowledgebase_article, :post_knowledgebase_article
|
58
|
+
|
59
|
+
def delete_knowledgebase_article(id, options = {})
|
60
|
+
KayakoClient::KnowledgebaseArticle.delete(id, options.merge(inherited_options))
|
61
|
+
end
|
62
|
+
|
63
|
+
alias_method :destroy_knowledgebase_article, :delete_knowledgebase_article
|
64
|
+
|
65
|
+
|
66
|
+
def knowledgebase_attachments(article, options = {})
|
67
|
+
KayakoClient::KnowledgebaseAttachment.all(article, options.merge(inherited_options))
|
68
|
+
end
|
69
|
+
|
70
|
+
def get_knowledgebase_attachment(article, id, options = {})
|
71
|
+
KayakoClient::KnowledgebaseAttachment.get(article, id, options.merge(inherited_options))
|
72
|
+
end
|
73
|
+
|
74
|
+
alias_method :find_knowledgebase_attachment, :get_knowledgebase_attachment
|
75
|
+
|
76
|
+
def post_knowledgebase_attachment(options = {})
|
77
|
+
KayakoClient::KnowledgebaseAttachment.post(options.merge(inherited_options))
|
78
|
+
end
|
79
|
+
|
80
|
+
alias_method :create_knowledgebase_attachment, :post_knowledgebase_attachment
|
81
|
+
|
82
|
+
def delete_knowledgebase_attachment(article, id, options = {})
|
83
|
+
KayakoClient::KnowledgebaseAttachment.delete(article, id, options.merge(inherited_options))
|
84
|
+
end
|
85
|
+
|
86
|
+
alias_method :destroy_knowledgebase_attachment, :delete_knowledgebase_attachment
|
87
|
+
|
88
|
+
|
89
|
+
def knowledgebase_categories(options = {})
|
90
|
+
KayakoClient::KnowledgebaseCategory.all(options.merge(inherited_options))
|
91
|
+
end
|
92
|
+
|
93
|
+
def get_knowledgebase_category(id = :all, options = {})
|
94
|
+
KayakoClient::KnowledgebaseCategory.get(id, options.merge(inherited_options))
|
95
|
+
end
|
96
|
+
|
97
|
+
alias_method :find_knowledgebase_category, :get_knowledgebase_category
|
98
|
+
|
99
|
+
def post_knowledgebase_category(options = {})
|
100
|
+
KayakoClient::KnowledgebaseCategory.post(options.merge(inherited_options))
|
101
|
+
end
|
102
|
+
|
103
|
+
alias_method :create_knowledgebase_category, :post_knowledgebase_category
|
104
|
+
|
105
|
+
def delete_knowledgebase_category(id, options = {})
|
106
|
+
KayakoClient::KnowledgebaseCategory.delete(id, options.merge(inherited_options))
|
107
|
+
end
|
108
|
+
|
109
|
+
alias_method :destroy_knowledgebase_category, :delete_knowledgebase_category
|
110
|
+
|
111
|
+
|
112
|
+
def knowledgebase_comments(article, options = {})
|
113
|
+
KayakoClient::KnowledgebaseComment.all(article, options.merge(inherited_options))
|
114
|
+
end
|
115
|
+
|
116
|
+
def get_knowledgebase_comment(id = :all, options = {})
|
117
|
+
KayakoClient::KnowledgebaseComment.get(id, options.merge(inherited_options))
|
118
|
+
end
|
119
|
+
|
120
|
+
alias_method :find_knowledgebase_comment, :get_knowledgebase_comment
|
121
|
+
|
122
|
+
def post_knowledgebase_comment(options = {})
|
123
|
+
KayakoClient::KnowledgebaseComment.post(options.merge(inherited_options))
|
124
|
+
end
|
125
|
+
|
126
|
+
alias_method :create_knowledgebase_comment, :post_knowledgebase_comment
|
127
|
+
|
128
|
+
def delete_knowledgebase_comment(id, options = {})
|
129
|
+
KayakoClient::KnowledgebaseComment.delete(id, options.merge(inherited_options))
|
130
|
+
end
|
131
|
+
|
132
|
+
alias_method :destroy_knowledgebase_comment, :delete_knowledgebase_comment
|
133
|
+
|
134
|
+
|
135
|
+
def news_categories(options = {})
|
136
|
+
KayakoClient::NewsCategory.all(options.merge(inherited_options))
|
137
|
+
end
|
138
|
+
|
139
|
+
def get_news_category(id = :all, options = {})
|
140
|
+
KayakoClient::NewsCategory.get(id, options.merge(inherited_options))
|
141
|
+
end
|
142
|
+
|
143
|
+
alias_method :find_news_category, :get_news_category
|
144
|
+
|
145
|
+
def post_news_category(options = {})
|
146
|
+
KayakoClient::NewsCategory.post(options.merge(inherited_options))
|
147
|
+
end
|
148
|
+
|
149
|
+
alias_method :create_news_category, :post_news_category
|
150
|
+
|
151
|
+
def delete_news_category(id, options = {})
|
152
|
+
KayakoClient::NewsCategory.delete(id, options.merge(inherited_options))
|
153
|
+
end
|
154
|
+
|
155
|
+
alias_method :destroy_news_category, :delete_news_category
|
156
|
+
|
157
|
+
|
158
|
+
def news_comments(news, options = {})
|
159
|
+
KayakoClient::NewsComment.all(news, options.merge(inherited_options))
|
160
|
+
end
|
161
|
+
|
162
|
+
def get_news_comment(id = :all, options = {})
|
163
|
+
KayakoClient::NewsComment.get(id, options.merge(inherited_options))
|
164
|
+
end
|
165
|
+
|
166
|
+
alias_method :find_news_comment, :get_news_comment
|
167
|
+
|
168
|
+
def post_news_comment(options = {})
|
169
|
+
KayakoClient::NewsComment.post(options.merge(inherited_options))
|
170
|
+
end
|
171
|
+
|
172
|
+
alias_method :create_news_comment, :post_news_comment
|
173
|
+
|
174
|
+
def delete_news_comment(id, options = {})
|
175
|
+
KayakoClient::NewsComment.delete(id, options.merge(inherited_options))
|
176
|
+
end
|
177
|
+
|
178
|
+
alias_method :destroy_news_comment, :delete_news_comment
|
179
|
+
|
180
|
+
|
181
|
+
def news_items(*args)
|
182
|
+
options = args.last.is_a?(Hash) ? args.pop : {}
|
183
|
+
args << options.merge(inherited_options)
|
184
|
+
KayakoClient::NewsItem.all(*args)
|
185
|
+
end
|
186
|
+
|
187
|
+
alias_method :news, :news_items
|
188
|
+
|
189
|
+
def get_news_item(id = :all, options = {})
|
190
|
+
KayakoClient::NewsItem.get(id, options.merge(inherited_options))
|
191
|
+
end
|
192
|
+
|
193
|
+
alias_method :find_news_item, :get_news_item
|
194
|
+
|
195
|
+
def post_news_item(options = {})
|
196
|
+
KayakoClient::NewsItem.post(options.merge(inherited_options))
|
197
|
+
end
|
198
|
+
|
199
|
+
alias_method :create_news_item, :post_news_item
|
200
|
+
|
201
|
+
def delete_news_item(id, options = {})
|
202
|
+
KayakoClient::NewsItem.delete(id, options.merge(inherited_options))
|
203
|
+
end
|
204
|
+
|
205
|
+
alias_method :destroy_news_item, :delete_news_item
|
206
|
+
|
207
|
+
|
208
|
+
def news_subscribers(options = {})
|
209
|
+
KayakoClient::NewsSubscriber.all(options.merge(inherited_options))
|
210
|
+
end
|
211
|
+
|
212
|
+
def get_news_subscriber(id = :all, options = {})
|
213
|
+
KayakoClient::NewsSubscriber.get(id, options.merge(inherited_options))
|
214
|
+
end
|
215
|
+
|
216
|
+
alias_method :find_news_subscriber, :get_news_subscriber
|
217
|
+
|
218
|
+
def post_news_subscriber(options = {})
|
219
|
+
KayakoClient::NewsSubscriber.post(options.merge(inherited_options))
|
220
|
+
end
|
221
|
+
|
222
|
+
alias_method :create_news_subscriber, :post_news_subscriber
|
223
|
+
|
224
|
+
def delete_news_subscriber(id, options = {})
|
225
|
+
KayakoClient::NewsSubscriber.delete(id, options.merge(inherited_options))
|
226
|
+
end
|
227
|
+
|
228
|
+
alias_method :destroy_news_subscriber, :delete_news_subscriber
|
229
|
+
|
230
|
+
|
27
231
|
def staff(options = {})
|
28
232
|
KayakoClient::Staff.all(options.merge(inherited_options))
|
29
233
|
end
|
@@ -242,6 +446,98 @@ module KayakoClient
|
|
242
446
|
alias_method :find_ticket_type, :get_ticket_type
|
243
447
|
|
244
448
|
|
449
|
+
def troubleshooter_attachments(step, options = {})
|
450
|
+
KayakoClient::TroubleshooterAttachment.all(step, options.merge(inherited_options))
|
451
|
+
end
|
452
|
+
|
453
|
+
def get_troubleshooter_attachment(step, id, options = {})
|
454
|
+
KayakoClient::TroubleshooterAttachment.get(step, id, options.merge(inherited_options))
|
455
|
+
end
|
456
|
+
|
457
|
+
alias_method :find_troubleshooter_attachment, :get_troubleshooter_attachment
|
458
|
+
|
459
|
+
def post_troubleshooter_attachment(options = {})
|
460
|
+
KayakoClient::TroubleshooterAttachment.post(options.merge(inherited_options))
|
461
|
+
end
|
462
|
+
|
463
|
+
alias_method :create_troubleshooter_attachment, :post_troubleshooter_attachment
|
464
|
+
|
465
|
+
def delete_troubleshooter_attachment(step, id, options = {})
|
466
|
+
KayakoClient::TroubleshooterAttachment.delete(step, id, options.merge(inherited_options))
|
467
|
+
end
|
468
|
+
|
469
|
+
alias_method :destroy_troubleshooter_attachment, :delete_troubleshooter_attachment
|
470
|
+
|
471
|
+
|
472
|
+
def troubleshooter_categories(options = {})
|
473
|
+
KayakoClient::TroubleshooterCategory.all(options.merge(inherited_options))
|
474
|
+
end
|
475
|
+
|
476
|
+
def get_troubleshooter_category(id = :all, options = {})
|
477
|
+
KayakoClient::TroubleshooterCategory.get(id, options.merge(inherited_options))
|
478
|
+
end
|
479
|
+
|
480
|
+
alias_method :find_troubleshooter_category, :get_troubleshooter_category
|
481
|
+
|
482
|
+
def post_troubleshooter_category(options = {})
|
483
|
+
KayakoClient::TroubleshooterCategory.post(options.merge(inherited_options))
|
484
|
+
end
|
485
|
+
|
486
|
+
alias_method :create_troubleshooter_category, :post_troubleshooter_category
|
487
|
+
|
488
|
+
def delete_troubleshooter_category(id, options = {})
|
489
|
+
KayakoClient::TroubleshooterCategory.delete(id, options.merge(inherited_options))
|
490
|
+
end
|
491
|
+
|
492
|
+
alias_method :destroy_troubleshooter_category, :delete_troubleshooter_category
|
493
|
+
|
494
|
+
|
495
|
+
def troubleshooter_comments(step, options = {})
|
496
|
+
KayakoClient::TroubleshooterComment.all(step, options.merge(inherited_options))
|
497
|
+
end
|
498
|
+
|
499
|
+
def get_troubleshooter_comment(id = :all, options = {})
|
500
|
+
KayakoClient::TroubleshooterComment.get(id, options.merge(inherited_options))
|
501
|
+
end
|
502
|
+
|
503
|
+
alias_method :find_troubleshooter_comment, :get_troubleshooter_comment
|
504
|
+
|
505
|
+
def post_troubleshooter_comment(options = {})
|
506
|
+
KayakoClient::TroubleshooterComment.post(options.merge(inherited_options))
|
507
|
+
end
|
508
|
+
|
509
|
+
alias_method :create_troubleshooter_comment, :post_troubleshooter_comment
|
510
|
+
|
511
|
+
def delete_troubleshooter_comment(id, options = {})
|
512
|
+
KayakoClient::TroubleshooterComment.delete(id, options.merge(inherited_options))
|
513
|
+
end
|
514
|
+
|
515
|
+
alias_method :destroy_troubleshooter_comment, :delete_troubleshooter_comment
|
516
|
+
|
517
|
+
|
518
|
+
def troubleshooter_steps(options = {})
|
519
|
+
KayakoClient::TroubleshooterStep.all(options.merge(inherited_options))
|
520
|
+
end
|
521
|
+
|
522
|
+
def get_troubleshooter_step(id = :all, options = {})
|
523
|
+
KayakoClient::TroubleshooterStep.get(id, options.merge(inherited_options))
|
524
|
+
end
|
525
|
+
|
526
|
+
alias_method :find_troubleshooter_step, :get_troubleshooter_step
|
527
|
+
|
528
|
+
def post_troubleshooter_step(options = {})
|
529
|
+
KayakoClient::TroubleshooterStep.post(options.merge(inherited_options))
|
530
|
+
end
|
531
|
+
|
532
|
+
alias_method :create_troubleshooter_step, :post_troubleshooter_step
|
533
|
+
|
534
|
+
def delete_troubleshooter_step(id, options = {})
|
535
|
+
KayakoClient::TroubleshooterStep.delete(id, options.merge(inherited_options))
|
536
|
+
end
|
537
|
+
|
538
|
+
alias_method :destroy_troubleshooter_step, :delete_troubleshooter_step
|
539
|
+
|
540
|
+
|
245
541
|
def users(marker = nil, limit = nil, options = {})
|
246
542
|
KayakoClient::User.all(marker, limit, options.merge(inherited_options))
|
247
543
|
end
|
@@ -252,6 +548,10 @@ module KayakoClient
|
|
252
548
|
|
253
549
|
alias_method :find_user, :get_user
|
254
550
|
|
551
|
+
def user_search(query, options = {})
|
552
|
+
KayakoClient::User.search(query, options.merge(inherited_options))
|
553
|
+
end
|
554
|
+
|
255
555
|
def post_user(options = {})
|
256
556
|
KayakoClient::User.post(options.merge(inherited_options))
|
257
557
|
end
|