Class: CrxPackageManager::DefaultApi

Inherits:
Object
  • Object
show all
Defined in:
lib/crx_packmgr_api_client/api/default_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DefaultApi

Returns a new instance of DefaultApi.



30
31
32
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 30

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



28
29
30
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 28

def api_client
  @api_client
end

Instance Method Details

#download(opts = {}) ⇒ File

Download a package Downloads the package at the specified path. Returns a Tempfile object.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :path (String)

    The path to the package to download.

Returns:

  • (File)


39
40
41
42
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 39

def download(opts = {})
  data, _status_code, _headers = download_with_http_info(opts)
  return data
end

#download_with_http_info(opts = {}) ⇒ Array<(File, Fixnum, Hash)>

Download a package Downloads the package at the specified path. Returns a Tempfile object.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :path (String)

    The path to the package to download.

Returns:

  • (Array<(File, Fixnum, Hash)>)

    File data, response status code and response headers



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 49

def download_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.download ..."
  end
  # resource path
  local_var_path = "/download.jsp".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/octet-stream', 'application/zip']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basic']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#groups(opts = {}) ⇒ GroupList

List package groups Returns a list of all package groups available.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :compress_version (String)

    Compress versions; count all versions of the same packages as a single entry.

  • :include_all (BOOLEAN)

    Return a total count of all packages. Defaults to false.

  • :include_root (BOOLEAN)

    Include the root package. Defaults to false.

  • :include_my_packages (BOOLEAN)

    Include the &#39;my_packages&#39; group. Only applicable if the group has no packages. Defaults to false.

  • :only_top_level (BOOLEAN)

    Only list top-level groups, ie. do not list all nested groups.

Returns:



99
100
101
102
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 99

def groups(opts = {})
  data, _status_code, _headers = groups_with_http_info(opts)
  return data
end

#groups_with_http_info(opts = {}) ⇒ Array<(GroupList, Fixnum, Hash)>

List package groups Returns a list of all package groups available.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :compress_version (String)

    Compress versions; count all versions of the same packages as a single entry.

  • :include_all (BOOLEAN)

    Return a total count of all packages. Defaults to false.

  • :include_root (BOOLEAN)

    Include the root package. Defaults to false.

  • :include_my_packages (BOOLEAN)

    Include the &#39;my_packages&#39; group. Only applicable if the group has no packages. Defaults to false.

  • :only_top_level (BOOLEAN)

    Only list top-level groups, ie. do not list all nested groups.

Returns:

  • (Array<(GroupList, Fixnum, Hash)>)

    GroupList data, response status code and response headers



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 113

def groups_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.groups ..."
  end
  # resource path
  local_var_path = "/groups.jsp".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'compressVersion'] = opts[:'compress_version'] if !opts[:'compress_version'].nil?
  query_params[:'includeAll'] = opts[:'include_all'] if !opts[:'include_all'].nil?
  query_params[:'includeRoot'] = opts[:'include_root'] if !opts[:'include_root'].nil?
  query_params[:'includeMyPackages'] = opts[:'include_my_packages'] if !opts[:'include_my_packages'].nil?
  query_params[:'onlyTopLevel'] = opts[:'only_top_level'] if !opts[:'only_top_level'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basic']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GroupList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#init(opts = {}) ⇒ InitData

Metadata Display metadata about this package manager.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



162
163
164
165
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 162

def init(opts = {})
  data, _status_code, _headers = init_with_http_info(opts)
  return data
end

#init_with_http_info(opts = {}) ⇒ Array<(InitData, Fixnum, Hash)>

Metadata Display metadata about this package manager.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InitData, Fixnum, Hash)>)

    InitData data, response status code and response headers



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 171

def init_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.init ..."
  end
  # resource path
  local_var_path = "/init.jsp".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basic']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InitData')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#init\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#installstatus(opts = {}) ⇒ InstallStatus

Package Installation Status Returns a status of the installation of OSGi packages.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



215
216
217
218
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 215

def installstatus(opts = {})
  data, _status_code, _headers = installstatus_with_http_info(opts)
  return data
end

#installstatus_with_http_info(opts = {}) ⇒ Array<(InstallStatus, Fixnum, Hash)>

Package Installation Status Returns a status of the installation of OSGi packages.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InstallStatus, Fixnum, Hash)>)

    InstallStatus data, response status code and response headers



224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 224

def installstatus_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.installstatus ..."
  end
  # resource path
  local_var_path = "/installstatus.jsp".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basic']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InstallStatus')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#installstatus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list(opts = {}) ⇒ PackageList

List packages Returns a list of all available packages defined.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :q (String)

    Term to search within package names.

  • :include_versions (BOOLEAN)

    Include versions of package in results.

  • :path (String)

    The path to a specific package definition.

Returns:



271
272
273
274
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 271

def list(opts = {})
  data, _status_code, _headers = list_with_http_info(opts)
  return data
end

#list_with_http_info(opts = {}) ⇒ Array<(PackageList, Fixnum, Hash)>

List packages Returns a list of all available packages defined.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :q (String)

    Term to search within package names.

  • :include_versions (BOOLEAN)

    Include versions of package in results.

  • :path (String)

    The path to a specific package definition.

Returns:

  • (Array<(PackageList, Fixnum, Hash)>)

    PackageList data, response status code and response headers



283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 283

def list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.list ..."
  end
  # resource path
  local_var_path = "/list.jsp".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
  query_params[:'includeVersions'] = opts[:'include_versions'] if !opts[:'include_versions'].nil?
  query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basic']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PackageList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#screenshot(opts = {}) ⇒ File

Get screenshot Returns the screenshot at the specified path.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :path (String)

    The path to the screenshot.

Returns:

  • (File)


331
332
333
334
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 331

def screenshot(opts = {})
  data, _status_code, _headers = screenshot_with_http_info(opts)
  return data
end

#screenshot_with_http_info(opts = {}) ⇒ Array<(File, Fixnum, Hash)>

Get screenshot Returns the screenshot at the specified path.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :path (String)

    The path to the screenshot.

Returns:

  • (Array<(File, Fixnum, Hash)>)

    File data, response status code and response headers



341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 341

def screenshot_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.screenshot ..."
  end
  # resource path
  local_var_path = "/screenshot.jsp".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['image/jpg', 'image/jpeg', 'image/png']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basic']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#screenshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#service_get(cmd, opts = {}) ⇒ String

Generic operation service. Provides endpoint for executing package manipulation commands. Responses are in the format of the ServiceResponse in the defintions section.

Parameters:

  • cmd

    The command to execute.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :name (String)

    The name of the package on which to execute the command.

  • :group (String)

    The group of the package on which to execute the command.

  • :strict (BOOLEAN)

    Fail on an error.

Returns:

  • (String)


390
391
392
393
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 390

def service_get(cmd, opts = {})
  data, _status_code, _headers = service_get_with_http_info(cmd, opts)
  return data
end

#service_get_with_http_info(cmd, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Generic operation service. Provides endpoint for executing package manipulation commands. Responses are in the format of the ServiceResponse in the defintions section.

Parameters:

  • cmd

    The command to execute.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :name (String)

    The name of the package on which to execute the command.

  • :group (String)

    The group of the package on which to execute the command.

  • :strict (BOOLEAN)

    Fail on an error.

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 403

def service_get_with_http_info(cmd, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.service_get ..."
  end
  # verify the required parameter 'cmd' is set
  fail ArgumentError, "Missing the required parameter 'cmd' when calling DefaultApi.service_get" if cmd.nil?
  # verify enum value
  unless ['help', 'ls', 'rm', 'build', 'inst', 'uninst', 'get'].include?(cmd)
    fail ArgumentError, "invalid value for 'cmd', must be one of help, ls, rm, build, inst, uninst, get"
  end
  # resource path
  local_var_path = "/service.jsp".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'cmd'] = cmd
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'group'] = opts[:'group'] if !opts[:'group'].nil?
  query_params[:'strict'] = opts[:'strict'] if !opts[:'strict'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/octet-stream', 'application/zip', 'text/plain']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basic']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#service_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#service_post(file, opts = {}) ⇒ String

Generic operation service. Provides endpoint for executing package manipulation commands. Responses are in the format of the ServiceResponse in the defintions section.

Parameters:

  • file

    Package file to upload

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :name (String)

    The hint for the package&#39;s name if the definiton doesn&#39;t have one.

  • :strict (BOOLEAN)

    Fail on an error.

  • :force (BOOLEAN)

    Force the package upload.

  • :install (BOOLEAN)

    Install the package upon upload

Returns:

  • (String)


462
463
464
465
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 462

def service_post(file, opts = {})
  data, _status_code, _headers = service_post_with_http_info(file, opts)
  return data
end

#service_post_with_http_info(file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Generic operation service. Provides endpoint for executing package manipulation commands. Responses are in the format of the ServiceResponse in the defintions section.

Parameters:

  • file

    Package file to upload

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :name (String)

    The hint for the package&#39;s name if the definiton doesn&#39;t have one.

  • :strict (BOOLEAN)

    Fail on an error.

  • :force (BOOLEAN)

    Force the package upload.

  • :install (BOOLEAN)

    Install the package upon upload

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 476

def service_post_with_http_info(file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.service_post ..."
  end
  # verify the required parameter 'file' is set
  fail ArgumentError, "Missing the required parameter 'file' when calling DefaultApi.service_post" if file.nil?
  # resource path
  local_var_path = "/service.jsp".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['multipart/form-data']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["file"] = file
  form_params["name"] = opts[:'name'] if !opts[:'name'].nil?
  form_params["strict"] = opts[:'strict'] if !opts[:'strict'].nil?
  form_params["force"] = opts[:'force'] if !opts[:'force'].nil?
  form_params["install"] = opts[:'install'] if !opts[:'install'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['basic']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#service_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#thumbnail(opts = {}) ⇒ File

Get package thumbnail Returns the package’s thumbnail image.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :path (String)

    The path to the package.

Returns:

  • (File)


528
529
530
531
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 528

def thumbnail(opts = {})
  data, _status_code, _headers = thumbnail_with_http_info(opts)
  return data
end

#thumbnail_with_http_info(opts = {}) ⇒ Array<(File, Fixnum, Hash)>

Get package thumbnail Returns the package&#39;s thumbnail image.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :path (String)

    The path to the package.

Returns:

  • (Array<(File, Fixnum, Hash)>)

    File data, response status code and response headers



538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
# File 'lib/crx_packmgr_api_client/api/default_api.rb', line 538

def thumbnail_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.thumbnail ..."
  end
  # resource path
  local_var_path = "/thumbnail.jsp".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['image/jpg', 'image/jpeg', 'image/png']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basic']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#thumbnail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end