crx_packmgr_api_client 0.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/docs/Package.md ADDED
@@ -0,0 +1,40 @@
1
+ # CrxPackageManager::Package
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **pid** | **String** | | [optional]
7
+ **path** | **String** | | [optional]
8
+ **name** | **String** | | [optional]
9
+ **download_name** | **String** | | [optional]
10
+ **group** | **String** | | [optional]
11
+ **group_title** | **String** | | [optional]
12
+ **version** | **String** | | [optional]
13
+ **description** | **String** | | [optional]
14
+ **thumbnail** | **String** | | [optional]
15
+ **build_count** | **Integer** | | [optional]
16
+ **last_modified** | **Integer** | | [optional]
17
+ **last_modified_by** | **String** | | [optional]
18
+ **created** | **Integer** | | [optional]
19
+ **create_by** | **String** | | [optional]
20
+ **last_unpacked** | **Integer** | | [optional]
21
+ **last_unpacked_by** | **String** | | [optional]
22
+ **last_wrapped** | **Integer** | | [optional]
23
+ **last_wrapped_by** | **String** | | [optional]
24
+ **last_unwrapped** | **Integer** | | [optional]
25
+ **last_unwrapped_by** | **String** | | [optional]
26
+ **size** | **Integer** | | [optional]
27
+ **has_snapshot** | **BOOLEAN** | | [optional]
28
+ **needs_rewrap** | **BOOLEAN** | | [optional]
29
+ **built_with** | **String** | | [optional]
30
+ **tested_with** | **String** | | [optional]
31
+ **fixed_bugs** | **String** | | [optional]
32
+ **requires_root** | **BOOLEAN** | | [optional]
33
+ **requires_restart** | **BOOLEAN** | | [optional]
34
+ **ac_handling** | **String** | | [optional]
35
+ **dependencies** | **Array<String>** | | [optional]
36
+ **resolved** | **BOOLEAN** | | [optional]
37
+ **filter** | [**Array<PackageFilter>**](PackageFilter.md) | | [optional]
38
+ **screenshots** | **Array<String>** | | [optional]
39
+
40
+
@@ -0,0 +1,9 @@
1
+ # CrxPackageManager::PackageFilter
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **root** | **String** | | [optional]
7
+ **rules** | **Array<String>** | | [optional]
8
+
9
+
@@ -0,0 +1,8 @@
1
+ # CrxPackageManager::PackageList
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **results** | [**Array<Package>**](Package.md) | | [optional]
7
+
8
+
data/git_push.sh ADDED
@@ -0,0 +1,38 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id="bstopp"
10
+ git_repo_id="crx_packmgr_api_client"
11
+ release_note=$1
12
+
13
+
14
+ if [ "$release_note" = "" ]; then
15
+ release_note="Minor update"
16
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
17
+ fi
18
+
19
+ # Initialize the local directory as a Git repository
20
+ git init
21
+
22
+ # Adds the files in the local repository and stages them for commit.
23
+ git add .
24
+
25
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
26
+ git commit -m "$release_note"
27
+
28
+ # Sets the new remote
29
+ git_remote=`git remote`
30
+ if [ "$git_remote" = "" ]; then # git remote not defined
31
+ git remote add origin git@github.com:${git_user_id}/${git_repo_id}.git
32
+ fi
33
+
34
+ git pull origin master
35
+
36
+ # Pushes (Forces) the changes in the local repository up to the remote repository
37
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
38
+ git push origin master 2>&1
@@ -0,0 +1,54 @@
1
+ =begin
2
+ #CRX Package Manager API
3
+
4
+ #API for interacting with the CRX Package Manager in AEM.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: bryan.stopp@gmail.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ # Common files
25
+ require 'crx_packmgr_api_client/api_client'
26
+ require 'crx_packmgr_api_client/api_error'
27
+ require 'crx_packmgr_api_client/version'
28
+ require 'crx_packmgr_api_client/configuration'
29
+
30
+ # Models
31
+ require 'crx_packmgr_api_client/models/package'
32
+ require 'crx_packmgr_api_client/models/package_filter'
33
+ require 'crx_packmgr_api_client/models/package_list'
34
+
35
+ # APIs
36
+ require 'crx_packmgr_api_client/api/default_api'
37
+
38
+ module CrxPackageManager
39
+ class << self
40
+ # Customize default settings for the SDK using block.
41
+ # CrxPackageManager.configure do |config|
42
+ # config.username = "xxx"
43
+ # config.password = "xxx"
44
+ # end
45
+ # If no block given, return the default Configuration object.
46
+ def configure
47
+ if block_given?
48
+ yield(Configuration.default)
49
+ else
50
+ Configuration.default
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,96 @@
1
+ =begin
2
+ #CRX Package Manager API
3
+
4
+ #API for interacting with the CRX Package Manager in AEM.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: bryan.stopp@gmail.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module CrxPackageManager
27
+ class DefaultApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # List all available packages.
35
+ # Returns a list of all available packages defined.
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :q Term to search within package names.
38
+ # @option opts [BOOLEAN] :include_versions Include versions of package in results.
39
+ # @option opts [String] :path The path to a specific package definition.
40
+ # @return [PackageList]
41
+ def list(opts = {})
42
+ data, _status_code, _headers = list_with_http_info(opts)
43
+ return data
44
+ end
45
+
46
+ # List all available packages.
47
+ # Returns a list of all available packages defined.
48
+ # @param [Hash] opts the optional parameters
49
+ # @option opts [String] :q Term to search within package names.
50
+ # @option opts [BOOLEAN] :include_versions Include versions of package in results.
51
+ # @option opts [String] :path The path to a specific package definition.
52
+ # @return [Array<(PackageList, Fixnum, Hash)>] PackageList data, response status code and response headers
53
+ def list_with_http_info(opts = {})
54
+ if @api_client.config.debugging
55
+ @api_client.config.logger.debug "Calling API: DefaultApi.list ..."
56
+ end
57
+ # resource path
58
+ local_var_path = "/list.jsp".sub('{format}','json')
59
+
60
+ # query parameters
61
+ query_params = {}
62
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
63
+ query_params[:'includeVersions'] = opts[:'include_versions'] if !opts[:'include_versions'].nil?
64
+ query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
65
+
66
+ # header parameters
67
+ header_params = {}
68
+
69
+ # HTTP header 'Accept' (if needed)
70
+ local_header_accept = ['text/plain', 'text/html', 'application/json', 'application/xml']
71
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
72
+
73
+ # HTTP header 'Content-Type'
74
+ local_header_content_type = ['application/x-www-form-urlencoded', 'multipart/form-data']
75
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
76
+
77
+ # form parameters
78
+ form_params = {}
79
+
80
+ # http body (model)
81
+ post_body = nil
82
+ auth_names = ['basic']
83
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
84
+ :header_params => header_params,
85
+ :query_params => query_params,
86
+ :form_params => form_params,
87
+ :body => post_body,
88
+ :auth_names => auth_names,
89
+ :return_type => 'PackageList')
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: DefaultApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ return data, status_code, headers
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,379 @@
1
+ =begin
2
+ #CRX Package Manager API
3
+
4
+ #API for interacting with the CRX Package Manager in AEM.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: bryan.stopp@gmail.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require 'date'
25
+ require 'json'
26
+ require 'logger'
27
+ require 'tempfile'
28
+ require 'typhoeus'
29
+ require 'uri'
30
+
31
+ module CrxPackageManager
32
+ class ApiClient
33
+ # The Configuration object holding settings to be used in the API client.
34
+ attr_accessor :config
35
+
36
+ # Defines the headers to be used in HTTP requests of all API calls by default.
37
+ #
38
+ # @return [Hash]
39
+ attr_accessor :default_headers
40
+
41
+ # Initializes the ApiClient
42
+ # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
43
+ def initialize(config = Configuration.default)
44
+ @config = config
45
+ @user_agent = "Swagger-Codegen/#{VERSION}/ruby"
46
+ @default_headers = {
47
+ 'Content-Type' => "application/json",
48
+ 'User-Agent' => @user_agent
49
+ }
50
+ end
51
+
52
+ def self.default
53
+ @@default ||= ApiClient.new
54
+ end
55
+
56
+ # Call an API with given options.
57
+ #
58
+ # @return [Array<(Object, Fixnum, Hash)>] an array of 3 elements:
59
+ # the data deserialized from response body (could be nil), response status code and response headers.
60
+ def call_api(http_method, path, opts = {})
61
+ request = build_request(http_method, path, opts)
62
+ response = request.run
63
+
64
+ if @config.debugging
65
+ @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
66
+ end
67
+
68
+ unless response.success?
69
+ fail ApiError.new(:code => response.code,
70
+ :response_headers => response.headers,
71
+ :response_body => response.body),
72
+ response.status_message
73
+ end
74
+
75
+ if opts[:return_type]
76
+ data = deserialize(response, opts[:return_type])
77
+ else
78
+ data = nil
79
+ end
80
+ return data, response.code, response.headers
81
+ end
82
+
83
+ # Builds the HTTP request
84
+ #
85
+ # @param [String] http_method HTTP method/verb (e.g. POST)
86
+ # @param [String] path URL path (e.g. /account/new)
87
+ # @option opts [Hash] :header_params Header parameters
88
+ # @option opts [Hash] :query_params Query parameters
89
+ # @option opts [Hash] :form_params Query parameters
90
+ # @option opts [Object] :body HTTP body (JSON/XML)
91
+ # @return [Typhoeus::Request] A Typhoeus Request
92
+ def build_request(http_method, path, opts = {})
93
+ url = build_request_url(path)
94
+ http_method = http_method.to_sym.downcase
95
+
96
+ header_params = @default_headers.merge(opts[:header_params] || {})
97
+ query_params = opts[:query_params] || {}
98
+ form_params = opts[:form_params] || {}
99
+
100
+ update_params_for_auth! header_params, query_params, opts[:auth_names]
101
+
102
+ # set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
103
+ _verify_ssl_host = @config.verify_ssl_host ? 2 : 0
104
+
105
+ req_opts = {
106
+ :method => http_method,
107
+ :headers => header_params,
108
+ :params => query_params,
109
+ :params_encoding => @config.params_encoding,
110
+ :timeout => @config.timeout,
111
+ :ssl_verifypeer => @config.verify_ssl,
112
+ :ssl_verifyhost => _verify_ssl_host,
113
+ :sslcert => @config.cert_file,
114
+ :sslkey => @config.key_file,
115
+ :verbose => @config.debugging
116
+ }
117
+
118
+ # set custom cert, if provided
119
+ req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
120
+
121
+ if [:post, :patch, :put, :delete].include?(http_method)
122
+ req_body = build_request_body(header_params, form_params, opts[:body])
123
+ req_opts.update :body => req_body
124
+ if @config.debugging
125
+ @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
126
+ end
127
+ end
128
+
129
+ Typhoeus::Request.new(url, req_opts)
130
+ end
131
+
132
+ # Check if the given MIME is a JSON MIME.
133
+ # JSON MIME examples:
134
+ # application/json
135
+ # application/json; charset=UTF8
136
+ # APPLICATION/JSON
137
+ # @param [String] mime MIME
138
+ # @return [Boolean] True if the MIME is applicaton/json
139
+ def json_mime?(mime)
140
+ !(mime =~ /\Aapplication\/json(;.*)?\z/i).nil?
141
+ end
142
+
143
+ # Deserialize the response to the given return type.
144
+ #
145
+ # @param [Response] response HTTP response
146
+ # @param [String] return_type some examples: "User", "Array[User]", "Hash[String,Integer]"
147
+ def deserialize(response, return_type)
148
+ body = response.body
149
+ return nil if body.nil? || body.empty?
150
+
151
+ # return response body directly for String return type
152
+ return body if return_type == 'String'
153
+
154
+ # handle file downloading - save response body into a tmp file and return the File instance
155
+ return download_file(response) if return_type == 'File'
156
+
157
+ # ensuring a default content type
158
+ content_type = response.headers['Content-Type'] || 'application/json'
159
+
160
+ fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type)
161
+
162
+ begin
163
+ data = JSON.parse("[#{body}]", :symbolize_names => true)[0]
164
+ rescue JSON::ParserError => e
165
+ if %w(String Date DateTime).include?(return_type)
166
+ data = body
167
+ else
168
+ raise e
169
+ end
170
+ end
171
+
172
+ convert_to_type data, return_type
173
+ end
174
+
175
+ # Convert data to the given return type.
176
+ # @param [Object] data Data to be converted
177
+ # @param [String] return_type Return type
178
+ # @return [Mixed] Data in a particular type
179
+ def convert_to_type(data, return_type)
180
+ return nil if data.nil?
181
+ case return_type
182
+ when 'String'
183
+ data.to_s
184
+ when 'Integer'
185
+ data.to_i
186
+ when 'Float'
187
+ data.to_f
188
+ when 'BOOLEAN'
189
+ data == true
190
+ when 'DateTime'
191
+ # parse date time (expecting ISO 8601 format)
192
+ DateTime.parse data
193
+ when 'Date'
194
+ # parse date time (expecting ISO 8601 format)
195
+ Date.parse data
196
+ when 'Object'
197
+ # generic object (usually a Hash), return directly
198
+ data
199
+ when /\AArray<(.+)>\z/
200
+ # e.g. Array<Pet>
201
+ sub_type = $1
202
+ data.map {|item| convert_to_type(item, sub_type) }
203
+ when /\AHash\<String, (.+)\>\z/
204
+ # e.g. Hash<String, Integer>
205
+ sub_type = $1
206
+ {}.tap do |hash|
207
+ data.each {|k, v| hash[k] = convert_to_type(v, sub_type) }
208
+ end
209
+ else
210
+ # models, e.g. Pet
211
+ CrxPackageManager.const_get(return_type).new.tap do |model|
212
+ model.build_from_hash data
213
+ end
214
+ end
215
+ end
216
+
217
+ # Save response body into a file in (the defined) temporary folder, using the filename
218
+ # from the "Content-Disposition" header if provided, otherwise a random filename.
219
+ #
220
+ # @see Configuration#temp_folder_path
221
+ # @return [Tempfile] the file downloaded
222
+ def download_file(response)
223
+ content_disposition = response.headers['Content-Disposition']
224
+ if content_disposition and content_disposition =~ /filename=/i
225
+ filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
226
+ prefix = sanitize_filename(filename)
227
+ else
228
+ prefix = 'download-'
229
+ end
230
+ prefix = prefix + '-' unless prefix.end_with?('-')
231
+
232
+ tempfile = nil
233
+ encoding = response.body.encoding
234
+ Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) do |file|
235
+ file.write(response.body)
236
+ tempfile = file
237
+ end
238
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
239
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
240
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
241
+ "explicitly with `tempfile.delete`"
242
+ tempfile
243
+ end
244
+
245
+ # Sanitize filename by removing path.
246
+ # e.g. ../../sun.gif becomes sun.gif
247
+ #
248
+ # @param [String] filename the filename to be sanitized
249
+ # @return [String] the sanitized filename
250
+ def sanitize_filename(filename)
251
+ filename.gsub(/.*[\/\\]/, '')
252
+ end
253
+
254
+ def build_request_url(path)
255
+ # Add leading and trailing slashes to path
256
+ path = "/#{path}".gsub(/\/+/, '/')
257
+ URI.encode(@config.base_url + path)
258
+ end
259
+
260
+ # Builds the HTTP request body
261
+ #
262
+ # @param [Hash] header_params Header parameters
263
+ # @param [Hash] form_params Query parameters
264
+ # @param [Object] body HTTP body (JSON/XML)
265
+ # @return [String] HTTP body data in the form of string
266
+ def build_request_body(header_params, form_params, body)
267
+ # http form
268
+ if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
269
+ header_params['Content-Type'] == 'multipart/form-data'
270
+ data = {}
271
+ form_params.each do |key, value|
272
+ case value
273
+ when File, Array, nil
274
+ # let typhoeus handle File, Array and nil parameters
275
+ data[key] = value
276
+ else
277
+ data[key] = value.to_s
278
+ end
279
+ end
280
+ elsif body
281
+ data = body.is_a?(String) ? body : body.to_json
282
+ else
283
+ data = nil
284
+ end
285
+ data
286
+ end
287
+
288
+ # Update hearder and query params based on authentication settings.
289
+ #
290
+ # @param [Hash] header_params Header parameters
291
+ # @param [Hash] form_params Query parameters
292
+ # @param [String] auth_names Authentication scheme name
293
+ def update_params_for_auth!(header_params, query_params, auth_names)
294
+ Array(auth_names).each do |auth_name|
295
+ auth_setting = @config.auth_settings[auth_name]
296
+ next unless auth_setting
297
+ case auth_setting[:in]
298
+ when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
299
+ when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
300
+ else fail ArgumentError, 'Authentication token must be in `query` of `header`'
301
+ end
302
+ end
303
+ end
304
+
305
+ # Sets user agent in HTTP header
306
+ #
307
+ # @param [String] user_agent User agent (e.g. swagger-codegen/ruby/1.0.0)
308
+ def user_agent=(user_agent)
309
+ @user_agent = user_agent
310
+ @default_headers['User-Agent'] = @user_agent
311
+ end
312
+
313
+ # Return Accept header based on an array of accepts provided.
314
+ # @param [Array] accepts array for Accept
315
+ # @return [String] the Accept header (e.g. application/json)
316
+ def select_header_accept(accepts)
317
+ return nil if accepts.nil? || accepts.empty?
318
+ # use JSON when present, otherwise use all of the provided
319
+ json_accept = accepts.find { |s| json_mime?(s) }
320
+ return json_accept || accepts.join(',')
321
+ end
322
+
323
+ # Return Content-Type header based on an array of content types provided.
324
+ # @param [Array] content_types array for Content-Type
325
+ # @return [String] the Content-Type header (e.g. application/json)
326
+ def select_header_content_type(content_types)
327
+ # use application/json by default
328
+ return 'application/json' if content_types.nil? || content_types.empty?
329
+ # use JSON when present, otherwise use the first one
330
+ json_content_type = content_types.find { |s| json_mime?(s) }
331
+ return json_content_type || content_types.first
332
+ end
333
+
334
+ # Convert object (array, hash, object, etc) to JSON string.
335
+ # @param [Object] model object to be converted into JSON string
336
+ # @return [String] JSON string representation of the object
337
+ def object_to_http_body(model)
338
+ return model if model.nil? || model.is_a?(String)
339
+ local_body = nil
340
+ if model.is_a?(Array)
341
+ local_body = model.map{|m| object_to_hash(m) }
342
+ else
343
+ local_body = object_to_hash(model)
344
+ end
345
+ local_body.to_json
346
+ end
347
+
348
+ # Convert object(non-array) to hash.
349
+ # @param [Object] obj object to be converted into JSON string
350
+ # @return [String] JSON string representation of the object
351
+ def object_to_hash(obj)
352
+ if obj.respond_to?(:to_hash)
353
+ obj.to_hash
354
+ else
355
+ obj
356
+ end
357
+ end
358
+
359
+ # Build parameter value according to the given collection format.
360
+ # @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi
361
+ def build_collection_param(param, collection_format)
362
+ case collection_format
363
+ when :csv
364
+ param.join(',')
365
+ when :ssv
366
+ param.join(' ')
367
+ when :tsv
368
+ param.join("\t")
369
+ when :pipes
370
+ param.join('|')
371
+ when :multi
372
+ # return the array directly as typhoeus will handle it as expected
373
+ param
374
+ else
375
+ fail "unknown collection format: #{collection_format.inspect}"
376
+ end
377
+ end
378
+ end
379
+ end