supportify_client 1.0.2 → 3.0.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/VERSION +1 -1
- data/lib/supportify_client.rb +11 -9
- data/lib/supportify_client/api/supportify_api.rb +222 -84
- data/lib/supportify_client/api_client.rb +100 -53
- data/lib/supportify_client/configuration.rb +35 -29
- data/lib/supportify_client/models/category.rb +125 -9
- data/lib/supportify_client/models/error.rb +125 -9
- data/lib/supportify_client/models/faq.rb +173 -22
- data/lib/supportify_client/models/info.rb +121 -10
- data/lib/supportify_client/models/info_application.rb +158 -0
- data/lib/supportify_client/models/info_supportify.rb +147 -0
- data/lib/supportify_client/models/tag.rb +125 -9
- data/lib/supportify_client/models/user.rb +121 -8
- data/supportify_client.gemspec +5 -4
- metadata +4 -3
- data/lib/supportify_client/models/base_object.rb +0 -87
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffc905c22118c5c5e4448a9d2d83994b1ccd2de7
|
4
|
+
data.tar.gz: e8d5bfc2267a81bd510448463a784942991300ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c483487c85e04b3d11b4168dd6a3ac826ad3e2b488b1bcf1a603aeeb11fa23014601812772c755483c33afd2ba1063bc32d2708e57f1e8e4c4a7b021f5ffb455
|
7
|
+
data.tar.gz: cc514a02d5d3e3e8b4a04b694a98792fce0cd0a960373377830c3f10a8031c43e0b436c3c30bfbfff319dd0de6920b6610c84e53bba4db0437627fb1166faacd
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@ The Supportify Ruby Client Library makes it easy for you to build and deploy dyn
|
|
5
5
|
|
6
6
|
## Requirements
|
7
7
|
|
8
|
-
Our client library is compatible with MRI Ruby
|
8
|
+
Our client library is compatible with MRI Ruby 1.9.3+ or JRuby 1.9+.
|
9
9
|
|
10
10
|
## Installation
|
11
11
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.0
|
data/lib/supportify_client.rb
CHANGED
@@ -1,33 +1,35 @@
|
|
1
1
|
# Common files
|
2
2
|
require 'supportify_client/api_client'
|
3
3
|
require 'supportify_client/api_error'
|
4
|
+
require 'supportify_client/version'
|
4
5
|
require 'supportify_client/configuration'
|
5
6
|
|
6
7
|
# Models
|
7
|
-
require 'supportify_client/models/base_object'
|
8
8
|
require 'supportify_client/models/info'
|
9
9
|
require 'supportify_client/models/category'
|
10
10
|
require 'supportify_client/models/tag'
|
11
11
|
require 'supportify_client/models/user'
|
12
12
|
require 'supportify_client/models/faq'
|
13
13
|
require 'supportify_client/models/error'
|
14
|
+
require 'supportify_client/models/info_application'
|
15
|
+
require 'supportify_client/models/info_supportify'
|
14
16
|
|
15
17
|
# APIs
|
16
18
|
require 'supportify_client/api/supportify_api'
|
17
19
|
|
18
20
|
module Supportify
|
19
21
|
class << self
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
# If no block given, return the
|
22
|
+
# Customize default settings for the SDK using block.
|
23
|
+
# Supportify.configure do |config|
|
24
|
+
# config.username = "xxx"
|
25
|
+
# config.password = "xxx"
|
26
|
+
# end
|
27
|
+
# If no block given, return the default Configuration object.
|
26
28
|
def configure
|
27
29
|
if block_given?
|
28
|
-
yield
|
30
|
+
yield(Configuration.default)
|
29
31
|
else
|
30
|
-
Configuration.
|
32
|
+
Configuration.default
|
31
33
|
end
|
32
34
|
end
|
33
35
|
end
|
@@ -4,20 +4,38 @@ module Supportify
|
|
4
4
|
class SupportifyApi
|
5
5
|
attr_accessor :api_client
|
6
6
|
|
7
|
-
def initialize(api_client =
|
8
|
-
@api_client = api_client
|
7
|
+
def initialize(api_client = ApiClient.default)
|
8
|
+
@api_client = api_client
|
9
9
|
end
|
10
10
|
|
11
11
|
#
|
12
12
|
# Returns all categories from the application.
|
13
13
|
# @param [Hash] opts the optional parameters
|
14
|
+
# @option opts [String] :categories A string expression of the form \\"Category 1 AND (Category 2 OR Category 3)\\" that will filter for categories attached to content with these categories.
|
14
15
|
# @option opts [Integer] :limit The maximum number of entries to return in the collection.
|
15
16
|
# @option opts [Integer] :skip The number of entries to skip over when returning the results.
|
16
|
-
# @option opts [
|
17
|
+
# @option opts [BOOLEAN] :sort_asc A flag to indicate whether or not the results should be sorted in ascending order.
|
18
|
+
# @option opts [String] :sort_by The property by which the results are sorted.
|
19
|
+
# @option opts [String] :tags A string expression of the form \\"Tag 1 AND (Tag 2 OR Tag 3)\\" that will filter for categories attached to content with these tags.
|
17
20
|
# @return [Array<Category>]
|
18
21
|
def get_categories(opts = {})
|
19
|
-
|
20
|
-
|
22
|
+
data, status_code, headers = get_categories_with_http_info(opts)
|
23
|
+
return data
|
24
|
+
end
|
25
|
+
|
26
|
+
#
|
27
|
+
# Returns all categories from the application.
|
28
|
+
# @param [Hash] opts the optional parameters
|
29
|
+
# @option opts [String] :categories A string expression of the form \\"Category 1 AND (Category 2 OR Category 3)\\" that will filter for categories attached to content with these categories.
|
30
|
+
# @option opts [Integer] :limit The maximum number of entries to return in the collection.
|
31
|
+
# @option opts [Integer] :skip The number of entries to skip over when returning the results.
|
32
|
+
# @option opts [BOOLEAN] :sort_asc A flag to indicate whether or not the results should be sorted in ascending order.
|
33
|
+
# @option opts [String] :sort_by The property by which the results are sorted.
|
34
|
+
# @option opts [String] :tags A string expression of the form \\"Tag 1 AND (Tag 2 OR Tag 3)\\" that will filter for categories attached to content with these tags.
|
35
|
+
# @return [Array<(Array<Category>, Fixnum, Hash)>] Array<Category> data, response status code and response headers
|
36
|
+
def get_categories_with_http_info(opts = {})
|
37
|
+
if @api_client.config.debugging
|
38
|
+
@api_client.config.logger.debug "Calling API: SupportifyApi#get_categories ..."
|
21
39
|
end
|
22
40
|
|
23
41
|
# resource path
|
@@ -25,9 +43,12 @@ module Supportify
|
|
25
43
|
|
26
44
|
# query parameters
|
27
45
|
query_params = {}
|
46
|
+
query_params[:'categories'] = opts[:'categories'] if opts[:'categories']
|
28
47
|
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
29
48
|
query_params[:'skip'] = opts[:'skip'] if opts[:'skip']
|
30
|
-
query_params[:'
|
49
|
+
query_params[:'sort_asc'] = opts[:'sort_asc'] if opts[:'sort_asc']
|
50
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if opts[:'sort_by']
|
51
|
+
query_params[:'tags'] = opts[:'tags'] if opts[:'tags']
|
31
52
|
|
32
53
|
# header parameters
|
33
54
|
header_params = {}
|
@@ -37,7 +58,7 @@ module Supportify
|
|
37
58
|
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
38
59
|
|
39
60
|
# HTTP header 'Content-Type'
|
40
|
-
_header_content_type = []
|
61
|
+
_header_content_type = ['application/json']
|
41
62
|
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
42
63
|
|
43
64
|
# form parameters
|
@@ -48,17 +69,17 @@ module Supportify
|
|
48
69
|
|
49
70
|
|
50
71
|
auth_names = ['api_key', 'app_key']
|
51
|
-
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, path,
|
52
73
|
:header_params => header_params,
|
53
74
|
:query_params => query_params,
|
54
75
|
:form_params => form_params,
|
55
76
|
:body => post_body,
|
56
77
|
:auth_names => auth_names,
|
57
78
|
:return_type => 'Array<Category>')
|
58
|
-
if
|
59
|
-
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: SupportifyApi#get_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
60
81
|
end
|
61
|
-
return
|
82
|
+
return data, status_code, headers
|
62
83
|
end
|
63
84
|
|
64
85
|
#
|
@@ -67,8 +88,18 @@ module Supportify
|
|
67
88
|
# @param [Hash] opts the optional parameters
|
68
89
|
# @return [Category]
|
69
90
|
def get_category_by_id(id, opts = {})
|
70
|
-
|
71
|
-
|
91
|
+
data, status_code, headers = get_category_by_id_with_http_info(id, opts)
|
92
|
+
return data
|
93
|
+
end
|
94
|
+
|
95
|
+
#
|
96
|
+
# Returns a category based on a single ID.
|
97
|
+
# @param id ID of category to fetch
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @return [Array<(Category, Fixnum, Hash)>] Category data, response status code and response headers
|
100
|
+
def get_category_by_id_with_http_info(id, opts = {})
|
101
|
+
if @api_client.config.debugging
|
102
|
+
@api_client.config.logger.debug "Calling API: SupportifyApi#get_category_by_id ..."
|
72
103
|
end
|
73
104
|
|
74
105
|
# verify the required parameter 'id' is set
|
@@ -88,7 +119,7 @@ module Supportify
|
|
88
119
|
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
89
120
|
|
90
121
|
# HTTP header 'Content-Type'
|
91
|
-
_header_content_type = []
|
122
|
+
_header_content_type = ['application/json']
|
92
123
|
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
93
124
|
|
94
125
|
# form parameters
|
@@ -99,31 +130,47 @@ module Supportify
|
|
99
130
|
|
100
131
|
|
101
132
|
auth_names = ['api_key', 'app_key']
|
102
|
-
|
133
|
+
data, status_code, headers = @api_client.call_api(:GET, path,
|
103
134
|
:header_params => header_params,
|
104
135
|
:query_params => query_params,
|
105
136
|
:form_params => form_params,
|
106
137
|
:body => post_body,
|
107
138
|
:auth_names => auth_names,
|
108
139
|
:return_type => 'Category')
|
109
|
-
if
|
110
|
-
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: SupportifyApi#get_category_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
111
142
|
end
|
112
|
-
return
|
143
|
+
return data, status_code, headers
|
113
144
|
end
|
114
145
|
|
115
146
|
#
|
116
147
|
# Returns all content entries from the application.
|
117
148
|
# @param [Hash] opts the optional parameters
|
118
|
-
# @option opts [
|
149
|
+
# @option opts [String] :categories A string expression of the form \\"Category 1 AND (Category 2 OR Category 3)\\" that will filter for content with these categories.
|
119
150
|
# @option opts [Integer] :limit The maximum number of entries to return in the collection.
|
120
151
|
# @option opts [Integer] :skip The number of entries to skip over when returning the results.
|
121
|
-
# @option opts [
|
122
|
-
# @option opts [
|
152
|
+
# @option opts [BOOLEAN] :sort_asc A flag to indicate whether or not the results should be sorted in ascending order.
|
153
|
+
# @option opts [String] :sort_by The property by which the results are sorted.
|
154
|
+
# @option opts [String] :tags A string expression of the form \\"Tag 1 AND (Tag 2 OR Tag 3)\\" that will filter for content with these tags.
|
123
155
|
# @return [Array<Faq>]
|
124
156
|
def get_faqs(opts = {})
|
125
|
-
|
126
|
-
|
157
|
+
data, status_code, headers = get_faqs_with_http_info(opts)
|
158
|
+
return data
|
159
|
+
end
|
160
|
+
|
161
|
+
#
|
162
|
+
# Returns all content entries from the application.
|
163
|
+
# @param [Hash] opts the optional parameters
|
164
|
+
# @option opts [String] :categories A string expression of the form \\"Category 1 AND (Category 2 OR Category 3)\\" that will filter for content with these categories.
|
165
|
+
# @option opts [Integer] :limit The maximum number of entries to return in the collection.
|
166
|
+
# @option opts [Integer] :skip The number of entries to skip over when returning the results.
|
167
|
+
# @option opts [BOOLEAN] :sort_asc A flag to indicate whether or not the results should be sorted in ascending order.
|
168
|
+
# @option opts [String] :sort_by The property by which the results are sorted.
|
169
|
+
# @option opts [String] :tags A string expression of the form \\"Tag 1 AND (Tag 2 OR Tag 3)\\" that will filter for content with these tags.
|
170
|
+
# @return [Array<(Array<Faq>, Fixnum, Hash)>] Array<Faq> data, response status code and response headers
|
171
|
+
def get_faqs_with_http_info(opts = {})
|
172
|
+
if @api_client.config.debugging
|
173
|
+
@api_client.config.logger.debug "Calling API: SupportifyApi#get_faqs ..."
|
127
174
|
end
|
128
175
|
|
129
176
|
# resource path
|
@@ -134,7 +181,8 @@ module Supportify
|
|
134
181
|
query_params[:'categories'] = opts[:'categories'] if opts[:'categories']
|
135
182
|
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
136
183
|
query_params[:'skip'] = opts[:'skip'] if opts[:'skip']
|
137
|
-
query_params[:'
|
184
|
+
query_params[:'sort_asc'] = opts[:'sort_asc'] if opts[:'sort_asc']
|
185
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if opts[:'sort_by']
|
138
186
|
query_params[:'tags'] = opts[:'tags'] if opts[:'tags']
|
139
187
|
|
140
188
|
# header parameters
|
@@ -145,7 +193,7 @@ module Supportify
|
|
145
193
|
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
146
194
|
|
147
195
|
# HTTP header 'Content-Type'
|
148
|
-
_header_content_type = []
|
196
|
+
_header_content_type = ['application/json']
|
149
197
|
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
150
198
|
|
151
199
|
# form parameters
|
@@ -156,17 +204,17 @@ module Supportify
|
|
156
204
|
|
157
205
|
|
158
206
|
auth_names = ['api_key', 'app_key']
|
159
|
-
|
207
|
+
data, status_code, headers = @api_client.call_api(:GET, path,
|
160
208
|
:header_params => header_params,
|
161
209
|
:query_params => query_params,
|
162
210
|
:form_params => form_params,
|
163
211
|
:body => post_body,
|
164
212
|
:auth_names => auth_names,
|
165
213
|
:return_type => 'Array<Faq>')
|
166
|
-
if
|
167
|
-
|
214
|
+
if @api_client.config.debugging
|
215
|
+
@api_client.config.logger.debug "API called: SupportifyApi#get_faqs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
168
216
|
end
|
169
|
-
return
|
217
|
+
return data, status_code, headers
|
170
218
|
end
|
171
219
|
|
172
220
|
#
|
@@ -180,8 +228,23 @@ module Supportify
|
|
180
228
|
# @option opts [Array<String>] :tags The tags that the content entry belongs to.
|
181
229
|
# @return [nil]
|
182
230
|
def create_faq(answer, author, question, opts = {})
|
183
|
-
|
184
|
-
|
231
|
+
create_faq_with_http_info(answer, author, question, opts)
|
232
|
+
return nil
|
233
|
+
end
|
234
|
+
|
235
|
+
#
|
236
|
+
# Create a new content entry and add it to the application.
|
237
|
+
# @param answer The body of the content entry. Can be an answer to a FAQ, a knowledge base entry, or any other type of string. This is a non-encoded string and may contain HTML.
|
238
|
+
# @param author The e-mail address of the user that created the content entry. This e-mail address must correspond to a user on your Supportify account.
|
239
|
+
# @param question The title of the content entry. Can be a question, a title, or any other type of string. This is a non-encoded string and may contain HTML.
|
240
|
+
# @param [Hash] opts the optional parameters
|
241
|
+
# @option opts [Array<String>] :categories The categories that the content entry belongs to.
|
242
|
+
# @option opts [String] :format The format of the content that has been posted. Currently, the only accepted values are 'markdown' and 'html'.
|
243
|
+
# @option opts [Array<String>] :tags The tags that the content entry belongs to.
|
244
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
245
|
+
def create_faq_with_http_info(answer, author, question, opts = {})
|
246
|
+
if @api_client.config.debugging
|
247
|
+
@api_client.config.logger.debug "Calling API: SupportifyApi#create_faq ..."
|
185
248
|
end
|
186
249
|
|
187
250
|
# verify the required parameter 'answer' is set
|
@@ -207,7 +270,7 @@ module Supportify
|
|
207
270
|
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
208
271
|
|
209
272
|
# HTTP header 'Content-Type'
|
210
|
-
_header_content_type = []
|
273
|
+
_header_content_type = ['application/json']
|
211
274
|
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
212
275
|
|
213
276
|
# form parameters
|
@@ -215,25 +278,25 @@ module Supportify
|
|
215
278
|
form_params["answer"] = answer
|
216
279
|
form_params["author"] = author
|
217
280
|
form_params["question"] = question
|
218
|
-
form_params["categories"] = opts[:'categories'] if opts[:'categories']
|
281
|
+
form_params["categories"] = @api_client.build_collection_param(opts[:'categories'], :csv) if opts[:'categories']
|
219
282
|
form_params["format"] = opts[:'format'] if opts[:'format']
|
220
|
-
form_params["tags"] = opts[:'tags'] if opts[:'tags']
|
283
|
+
form_params["tags"] = @api_client.build_collection_param(opts[:'tags'], :csv) if opts[:'tags']
|
221
284
|
|
222
285
|
# http body (model)
|
223
286
|
post_body = nil
|
224
287
|
|
225
288
|
|
226
289
|
auth_names = ['api_key', 'app_key']
|
227
|
-
@api_client.call_api(:POST, path,
|
290
|
+
data, status_code, headers = @api_client.call_api(:POST, path,
|
228
291
|
:header_params => header_params,
|
229
292
|
:query_params => query_params,
|
230
293
|
:form_params => form_params,
|
231
294
|
:body => post_body,
|
232
295
|
:auth_names => auth_names)
|
233
|
-
if
|
234
|
-
|
296
|
+
if @api_client.config.debugging
|
297
|
+
@api_client.config.logger.debug "API called: SupportifyApi#create_faq\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
235
298
|
end
|
236
|
-
return
|
299
|
+
return data, status_code, headers
|
237
300
|
end
|
238
301
|
|
239
302
|
#
|
@@ -242,8 +305,18 @@ module Supportify
|
|
242
305
|
# @param [Hash] opts the optional parameters
|
243
306
|
# @return [Faq]
|
244
307
|
def get_faq_by_id(id, opts = {})
|
245
|
-
|
246
|
-
|
308
|
+
data, status_code, headers = get_faq_by_id_with_http_info(id, opts)
|
309
|
+
return data
|
310
|
+
end
|
311
|
+
|
312
|
+
#
|
313
|
+
# Returns a content entry based on a single ID.
|
314
|
+
# @param id ID of the content entry to fetch.
|
315
|
+
# @param [Hash] opts the optional parameters
|
316
|
+
# @return [Array<(Faq, Fixnum, Hash)>] Faq data, response status code and response headers
|
317
|
+
def get_faq_by_id_with_http_info(id, opts = {})
|
318
|
+
if @api_client.config.debugging
|
319
|
+
@api_client.config.logger.debug "Calling API: SupportifyApi#get_faq_by_id ..."
|
247
320
|
end
|
248
321
|
|
249
322
|
# verify the required parameter 'id' is set
|
@@ -263,7 +336,7 @@ module Supportify
|
|
263
336
|
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
264
337
|
|
265
338
|
# HTTP header 'Content-Type'
|
266
|
-
_header_content_type = []
|
339
|
+
_header_content_type = ['application/json']
|
267
340
|
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
268
341
|
|
269
342
|
# form parameters
|
@@ -274,17 +347,17 @@ module Supportify
|
|
274
347
|
|
275
348
|
|
276
349
|
auth_names = ['api_key', 'app_key']
|
277
|
-
|
350
|
+
data, status_code, headers = @api_client.call_api(:GET, path,
|
278
351
|
:header_params => header_params,
|
279
352
|
:query_params => query_params,
|
280
353
|
:form_params => form_params,
|
281
354
|
:body => post_body,
|
282
355
|
:auth_names => auth_names,
|
283
356
|
:return_type => 'Faq')
|
284
|
-
if
|
285
|
-
|
357
|
+
if @api_client.config.debugging
|
358
|
+
@api_client.config.logger.debug "API called: SupportifyApi#get_faq_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
286
359
|
end
|
287
|
-
return
|
360
|
+
return data, status_code, headers
|
288
361
|
end
|
289
362
|
|
290
363
|
#
|
@@ -294,8 +367,19 @@ module Supportify
|
|
294
367
|
# @param [Hash] opts the optional parameters
|
295
368
|
# @return [nil]
|
296
369
|
def vote_on_faq(id, vote, opts = {})
|
297
|
-
|
298
|
-
|
370
|
+
vote_on_faq_with_http_info(id, vote, opts)
|
371
|
+
return nil
|
372
|
+
end
|
373
|
+
|
374
|
+
#
|
375
|
+
# Record a vote for a content entry.
|
376
|
+
# @param id ID of the content entry to record the vote for.
|
377
|
+
# @param vote The direction of the vote to be recorded. Currently, the only accepted values are 'up' and 'down'.
|
378
|
+
# @param [Hash] opts the optional parameters
|
379
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
380
|
+
def vote_on_faq_with_http_info(id, vote, opts = {})
|
381
|
+
if @api_client.config.debugging
|
382
|
+
@api_client.config.logger.debug "Calling API: SupportifyApi#vote_on_faq ..."
|
299
383
|
end
|
300
384
|
|
301
385
|
# verify the required parameter 'id' is set
|
@@ -318,7 +402,7 @@ module Supportify
|
|
318
402
|
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
319
403
|
|
320
404
|
# HTTP header 'Content-Type'
|
321
|
-
_header_content_type = []
|
405
|
+
_header_content_type = ['application/json']
|
322
406
|
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
323
407
|
|
324
408
|
# form parameters
|
@@ -330,16 +414,16 @@ module Supportify
|
|
330
414
|
|
331
415
|
|
332
416
|
auth_names = ['api_key', 'app_key']
|
333
|
-
@api_client.call_api(:POST, path,
|
417
|
+
data, status_code, headers = @api_client.call_api(:POST, path,
|
334
418
|
:header_params => header_params,
|
335
419
|
:query_params => query_params,
|
336
420
|
:form_params => form_params,
|
337
421
|
:body => post_body,
|
338
422
|
:auth_names => auth_names)
|
339
|
-
if
|
340
|
-
|
423
|
+
if @api_client.config.debugging
|
424
|
+
@api_client.config.logger.debug "API called: SupportifyApi#vote_on_faq\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
341
425
|
end
|
342
|
-
return
|
426
|
+
return data, status_code, headers
|
343
427
|
end
|
344
428
|
|
345
429
|
#
|
@@ -347,8 +431,17 @@ module Supportify
|
|
347
431
|
# @param [Hash] opts the optional parameters
|
348
432
|
# @return [Info]
|
349
433
|
def get_info(opts = {})
|
350
|
-
|
351
|
-
|
434
|
+
data, status_code, headers = get_info_with_http_info(opts)
|
435
|
+
return data
|
436
|
+
end
|
437
|
+
|
438
|
+
#
|
439
|
+
# The Info endpoint returns an information object containing details of the application being accessed.\n\nThis endpoint is mostly used for diagnostic purposes.
|
440
|
+
# @param [Hash] opts the optional parameters
|
441
|
+
# @return [Array<(Info, Fixnum, Hash)>] Info data, response status code and response headers
|
442
|
+
def get_info_with_http_info(opts = {})
|
443
|
+
if @api_client.config.debugging
|
444
|
+
@api_client.config.logger.debug "Calling API: SupportifyApi#get_info ..."
|
352
445
|
end
|
353
446
|
|
354
447
|
# resource path
|
@@ -365,7 +458,7 @@ module Supportify
|
|
365
458
|
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
366
459
|
|
367
460
|
# HTTP header 'Content-Type'
|
368
|
-
_header_content_type = []
|
461
|
+
_header_content_type = ['application/json']
|
369
462
|
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
370
463
|
|
371
464
|
# form parameters
|
@@ -376,31 +469,45 @@ module Supportify
|
|
376
469
|
|
377
470
|
|
378
471
|
auth_names = ['api_key', 'app_key']
|
379
|
-
|
472
|
+
data, status_code, headers = @api_client.call_api(:GET, path,
|
380
473
|
:header_params => header_params,
|
381
474
|
:query_params => query_params,
|
382
475
|
:form_params => form_params,
|
383
476
|
:body => post_body,
|
384
477
|
:auth_names => auth_names,
|
385
478
|
:return_type => 'Info')
|
386
|
-
if
|
387
|
-
|
479
|
+
if @api_client.config.debugging
|
480
|
+
@api_client.config.logger.debug "API called: SupportifyApi#get_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
388
481
|
end
|
389
|
-
return
|
482
|
+
return data, status_code, headers
|
390
483
|
end
|
391
484
|
|
392
485
|
#
|
393
486
|
# Search for a collection of content entries that match the supplied query.
|
394
487
|
# @param query The string to match the content entry against.
|
395
488
|
# @param [Hash] opts the optional parameters
|
396
|
-
# @option opts [
|
489
|
+
# @option opts [String] :categories A string expression of the form \\"Category 1 AND (Category 2 OR Category 3)\\" that will filter for content with these categories.
|
397
490
|
# @option opts [Integer] :limit The maximum number of entries to return in the collection.
|
398
491
|
# @option opts [Integer] :skip The number of entries to skip over when returning the results.
|
399
|
-
# @option opts [
|
492
|
+
# @option opts [String] :tags A string expression of the form \\"Tag 1 AND (Tag 2 OR Tag 3)\\" that will filter for content with these tags.
|
400
493
|
# @return [Array<Faq>]
|
401
494
|
def search(query, opts = {})
|
402
|
-
|
403
|
-
|
495
|
+
data, status_code, headers = search_with_http_info(query, opts)
|
496
|
+
return data
|
497
|
+
end
|
498
|
+
|
499
|
+
#
|
500
|
+
# Search for a collection of content entries that match the supplied query.
|
501
|
+
# @param query The string to match the content entry against.
|
502
|
+
# @param [Hash] opts the optional parameters
|
503
|
+
# @option opts [String] :categories A string expression of the form \\"Category 1 AND (Category 2 OR Category 3)\\" that will filter for content with these categories.
|
504
|
+
# @option opts [Integer] :limit The maximum number of entries to return in the collection.
|
505
|
+
# @option opts [Integer] :skip The number of entries to skip over when returning the results.
|
506
|
+
# @option opts [String] :tags A string expression of the form \\"Tag 1 AND (Tag 2 OR Tag 3)\\" that will filter for content with these tags.
|
507
|
+
# @return [Array<(Array<Faq>, Fixnum, Hash)>] Array<Faq> data, response status code and response headers
|
508
|
+
def search_with_http_info(query, opts = {})
|
509
|
+
if @api_client.config.debugging
|
510
|
+
@api_client.config.logger.debug "Calling API: SupportifyApi#search ..."
|
404
511
|
end
|
405
512
|
|
406
513
|
# verify the required parameter 'query' is set
|
@@ -425,7 +532,7 @@ module Supportify
|
|
425
532
|
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
426
533
|
|
427
534
|
# HTTP header 'Content-Type'
|
428
|
-
_header_content_type = []
|
535
|
+
_header_content_type = ['application/json']
|
429
536
|
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
430
537
|
|
431
538
|
# form parameters
|
@@ -436,29 +543,47 @@ module Supportify
|
|
436
543
|
|
437
544
|
|
438
545
|
auth_names = ['api_key', 'app_key']
|
439
|
-
|
546
|
+
data, status_code, headers = @api_client.call_api(:GET, path,
|
440
547
|
:header_params => header_params,
|
441
548
|
:query_params => query_params,
|
442
549
|
:form_params => form_params,
|
443
550
|
:body => post_body,
|
444
551
|
:auth_names => auth_names,
|
445
552
|
:return_type => 'Array<Faq>')
|
446
|
-
if
|
447
|
-
|
553
|
+
if @api_client.config.debugging
|
554
|
+
@api_client.config.logger.debug "API called: SupportifyApi#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
448
555
|
end
|
449
|
-
return
|
556
|
+
return data, status_code, headers
|
450
557
|
end
|
451
558
|
|
452
559
|
#
|
453
560
|
# Returns all tags from the application.
|
454
561
|
# @param [Hash] opts the optional parameters
|
562
|
+
# @option opts [String] :categories A string expression of the form \\"Category 1 AND (Category 2 OR Category 3)\\" that will filter for tags attached to content with these categories.
|
455
563
|
# @option opts [Integer] :limit The maximum number of entries to return in the collection.
|
456
564
|
# @option opts [Integer] :skip The number of entries to skip over when returning the results.
|
457
|
-
# @option opts [
|
565
|
+
# @option opts [BOOLEAN] :sort_asc A flag to indicate whether or not the results should be sorted in ascending order.
|
566
|
+
# @option opts [String] :sort_by The property by which the results are sorted.
|
567
|
+
# @option opts [String] :tags A string expression of the form \\"Tag 1 AND (Tag 2 OR Tag 3)\\" that will filter for tags attached to content with these tags.
|
458
568
|
# @return [Array<Tag>]
|
459
569
|
def get_tags(opts = {})
|
460
|
-
|
461
|
-
|
570
|
+
data, status_code, headers = get_tags_with_http_info(opts)
|
571
|
+
return data
|
572
|
+
end
|
573
|
+
|
574
|
+
#
|
575
|
+
# Returns all tags from the application.
|
576
|
+
# @param [Hash] opts the optional parameters
|
577
|
+
# @option opts [String] :categories A string expression of the form \\"Category 1 AND (Category 2 OR Category 3)\\" that will filter for tags attached to content with these categories.
|
578
|
+
# @option opts [Integer] :limit The maximum number of entries to return in the collection.
|
579
|
+
# @option opts [Integer] :skip The number of entries to skip over when returning the results.
|
580
|
+
# @option opts [BOOLEAN] :sort_asc A flag to indicate whether or not the results should be sorted in ascending order.
|
581
|
+
# @option opts [String] :sort_by The property by which the results are sorted.
|
582
|
+
# @option opts [String] :tags A string expression of the form \\"Tag 1 AND (Tag 2 OR Tag 3)\\" that will filter for tags attached to content with these tags.
|
583
|
+
# @return [Array<(Array<Tag>, Fixnum, Hash)>] Array<Tag> data, response status code and response headers
|
584
|
+
def get_tags_with_http_info(opts = {})
|
585
|
+
if @api_client.config.debugging
|
586
|
+
@api_client.config.logger.debug "Calling API: SupportifyApi#get_tags ..."
|
462
587
|
end
|
463
588
|
|
464
589
|
# resource path
|
@@ -466,9 +591,12 @@ module Supportify
|
|
466
591
|
|
467
592
|
# query parameters
|
468
593
|
query_params = {}
|
594
|
+
query_params[:'categories'] = opts[:'categories'] if opts[:'categories']
|
469
595
|
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
470
596
|
query_params[:'skip'] = opts[:'skip'] if opts[:'skip']
|
471
|
-
query_params[:'
|
597
|
+
query_params[:'sort_asc'] = opts[:'sort_asc'] if opts[:'sort_asc']
|
598
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if opts[:'sort_by']
|
599
|
+
query_params[:'tags'] = opts[:'tags'] if opts[:'tags']
|
472
600
|
|
473
601
|
# header parameters
|
474
602
|
header_params = {}
|
@@ -478,7 +606,7 @@ module Supportify
|
|
478
606
|
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
479
607
|
|
480
608
|
# HTTP header 'Content-Type'
|
481
|
-
_header_content_type = []
|
609
|
+
_header_content_type = ['application/json']
|
482
610
|
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
483
611
|
|
484
612
|
# form parameters
|
@@ -489,17 +617,17 @@ module Supportify
|
|
489
617
|
|
490
618
|
|
491
619
|
auth_names = ['api_key', 'app_key']
|
492
|
-
|
620
|
+
data, status_code, headers = @api_client.call_api(:GET, path,
|
493
621
|
:header_params => header_params,
|
494
622
|
:query_params => query_params,
|
495
623
|
:form_params => form_params,
|
496
624
|
:body => post_body,
|
497
625
|
:auth_names => auth_names,
|
498
626
|
:return_type => 'Array<Tag>')
|
499
|
-
if
|
500
|
-
|
627
|
+
if @api_client.config.debugging
|
628
|
+
@api_client.config.logger.debug "API called: SupportifyApi#get_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
501
629
|
end
|
502
|
-
return
|
630
|
+
return data, status_code, headers
|
503
631
|
end
|
504
632
|
|
505
633
|
#
|
@@ -508,8 +636,18 @@ module Supportify
|
|
508
636
|
# @param [Hash] opts the optional parameters
|
509
637
|
# @return [Tag]
|
510
638
|
def get_tag_by_id(id, opts = {})
|
511
|
-
|
512
|
-
|
639
|
+
data, status_code, headers = get_tag_by_id_with_http_info(id, opts)
|
640
|
+
return data
|
641
|
+
end
|
642
|
+
|
643
|
+
#
|
644
|
+
# Returns a tag based on a single ID.
|
645
|
+
# @param id ID of tag to fetch
|
646
|
+
# @param [Hash] opts the optional parameters
|
647
|
+
# @return [Array<(Tag, Fixnum, Hash)>] Tag data, response status code and response headers
|
648
|
+
def get_tag_by_id_with_http_info(id, opts = {})
|
649
|
+
if @api_client.config.debugging
|
650
|
+
@api_client.config.logger.debug "Calling API: SupportifyApi#get_tag_by_id ..."
|
513
651
|
end
|
514
652
|
|
515
653
|
# verify the required parameter 'id' is set
|
@@ -529,7 +667,7 @@ module Supportify
|
|
529
667
|
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
530
668
|
|
531
669
|
# HTTP header 'Content-Type'
|
532
|
-
_header_content_type = []
|
670
|
+
_header_content_type = ['application/json']
|
533
671
|
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
534
672
|
|
535
673
|
# form parameters
|
@@ -540,17 +678,17 @@ module Supportify
|
|
540
678
|
|
541
679
|
|
542
680
|
auth_names = ['api_key', 'app_key']
|
543
|
-
|
681
|
+
data, status_code, headers = @api_client.call_api(:GET, path,
|
544
682
|
:header_params => header_params,
|
545
683
|
:query_params => query_params,
|
546
684
|
:form_params => form_params,
|
547
685
|
:body => post_body,
|
548
686
|
:auth_names => auth_names,
|
549
687
|
:return_type => 'Tag')
|
550
|
-
if
|
551
|
-
|
688
|
+
if @api_client.config.debugging
|
689
|
+
@api_client.config.logger.debug "API called: SupportifyApi#get_tag_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
552
690
|
end
|
553
|
-
return
|
691
|
+
return data, status_code, headers
|
554
692
|
end
|
555
693
|
end
|
556
694
|
end
|