class CrxPackageManager::DefaultApi
Attributes
Public Class Methods
# File lib/crx_packmgr_api_client/api/default_api.rb, line 30 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Download a package Downloads the package at the specified path. Returns a Tempfile object. @param [Hash] opts the optional parameters @option opts [String] :path The path to the package to download. @return [File]
# File lib/crx_packmgr_api_client/api/default_api.rb, line 38 def download(opts = {}) data, _status_code, _headers = download_with_http_info(opts) data end
Download a package Downloads the package at the specified path. Returns a Tempfile object. @param [Hash] opts the optional parameters @option opts [String] :path The path to the package to download. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
# File lib/crx_packmgr_api_client/api/default_api.rb, line 48 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' # query parameters query_params = {} query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/zip']) # 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
List package groups Returns a list of all package groups available. @param [Hash] opts the optional parameters @option opts [String] :compress_version Compress versions; count all versions of the same packages as a single entry. @option opts [BOOLEAN] :include_all Return a total count of all packages. Defaults to false. @option opts [BOOLEAN] :include_root Include the root package. Defaults to false. @option opts [BOOLEAN] :include_my_packages Include the 'my_packages' group. Only applicable if the group has no packages. Defaults to false. @option opts [BOOLEAN] :only_top_level Only list top-level groups, ie. do not list all nested groups. @return [GroupList]
# File lib/crx_packmgr_api_client/api/default_api.rb, line 91 def groups(opts = {}) data, _status_code, _headers = groups_with_http_info(opts) data end
List package groups Returns a list of all package groups available. @param [Hash] opts the optional parameters @option opts [String] :compress_version Compress versions; count all versions of the same packages as a single entry. @option opts [BOOLEAN] :include_all Return a total count of all packages. Defaults to false. @option opts [BOOLEAN] :include_root Include the root package. Defaults to false. @option opts [BOOLEAN] :include_my_packages Include the 'my_packages' group. Only applicable if the group has no packages. Defaults to false. @option opts [BOOLEAN] :only_top_level Only list top-level groups, ie. do not list all nested groups. @return [Array<(GroupList
, Fixnum, Hash)>] GroupList
data, response status code and response headers
# File lib/crx_packmgr_api_client/api/default_api.rb, line 105 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' # 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) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # 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
Metadata Display metadata about this package manager. @param [Hash] opts the optional parameters @return [InitData]
# File lib/crx_packmgr_api_client/api/default_api.rb, line 147 def init(opts = {}) data, _status_code, _headers = init_with_http_info(opts) data end
Metadata Display metadata about this package manager. @param [Hash] opts the optional parameters @return [Array<(InitData
, Fixnum, Hash)>] InitData
data, response status code and response headers
# File lib/crx_packmgr_api_client/api/default_api.rb, line 156 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' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # 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
Package
Installation Status Returns a status of the installation of OSGi packages. @param [Hash] opts the optional parameters @return [InstallStatus]
# File lib/crx_packmgr_api_client/api/default_api.rb, line 193 def installstatus(opts = {}) data, _status_code, _headers = installstatus_with_http_info(opts) data end
Package
Installation Status Returns a status of the installation of OSGi packages. @param [Hash] opts the optional parameters @return [Array<(InstallStatus
, Fixnum, Hash)>] InstallStatus
data, response status code and response headers
# File lib/crx_packmgr_api_client/api/default_api.rb, line 202 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' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # 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 packages Returns a list of all available packages defined. @param [Hash] opts the optional parameters @option opts [String] :q Term to search within package names. @option opts [BOOLEAN] :include_versions Include versions of package in results. @option opts [String] :path The path to a specific package definition. @return [PackageList]
# File lib/crx_packmgr_api_client/api/default_api.rb, line 242 def list(opts = {}) data, _status_code, _headers = list_with_http_info(opts) data end
List packages Returns a list of all available packages defined. @param [Hash] opts the optional parameters @option opts [String] :q Term to search within package names. @option opts [BOOLEAN] :include_versions Include versions of package in results. @option opts [String] :path The path to a specific package definition. @return [Array<(PackageList
, Fixnum, Hash)>] PackageList
data, response status code and response headers
# File lib/crx_packmgr_api_client/api/default_api.rb, line 254 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' # 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) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # 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
Get screenshot Returns the screenshot at the specified path. @param [Hash] opts the optional parameters @option opts [String] :path The path to the screenshot. @return [File]
# File lib/crx_packmgr_api_client/api/default_api.rb, line 295 def screenshot(opts = {}) data, _status_code, _headers = screenshot_with_http_info(opts) data end
Get screenshot Returns the screenshot at the specified path. @param [Hash] opts the optional parameters @option opts [String] :path The path to the screenshot. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
# File lib/crx_packmgr_api_client/api/default_api.rb, line 305 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' # query parameters query_params = {} query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['image/jpg', 'image/jpeg', 'image/png']) # 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
Generic operation service. Provides a different API for executing package manipulation commands. Operates on a specific version of the package. @param cmd The command to execute. @param name The name of the package on which to execute the command. @param group The group of the package on which to execute the command. @param version The version of the package on which to execute the command. @param [Hash] opts the optional parameters @return [ServiceExecResponse]
# File lib/crx_packmgr_api_client/api/default_api.rb, line 347 def service_exec(cmd, name, group, version, opts = {}) data, _status_code, _headers = service_exec_with_http_info(cmd, name, group, version, opts) data end
Generic operation service. Provides a different API for executing package manipulation commands. Operates on a specific version of the package. @param cmd The command to execute. @param name The name of the package on which to execute the command. @param group The group of the package on which to execute the command. @param version The version of the package on which to execute the command. @param [Hash] opts the optional parameters @return [Array<(ServiceExecResponse
, Fixnum, Hash)>] ServiceExecResponse
data, response status code and response headers
# File lib/crx_packmgr_api_client/api/default_api.rb, line 360 def service_exec_with_http_info(cmd, name, group, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.service_exec ...' end # verify the required parameter 'cmd' is set if @api_client.config.client_side_validation && cmd.nil? fail ArgumentError, "Missing the required parameter 'cmd' when calling DefaultApi.service_exec" end # verify enum value if @api_client.config.client_side_validation && !['build', 'install', 'delete', 'uninstall', 'dryrun', 'replicate'].include?(cmd) fail ArgumentError, "invalid value for 'cmd', must be one of build, install, delete, uninstall, dryrun, replicate" end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? fail ArgumentError, "Missing the required parameter 'name' when calling DefaultApi.service_exec" end # verify the required parameter 'group' is set if @api_client.config.client_side_validation && group.nil? fail ArgumentError, "Missing the required parameter 'group' when calling DefaultApi.service_exec" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling DefaultApi.service_exec" end # resource path local_var_path = '/service/exec.json/etc/packages/{group}/{name}-{version}.zip'.sub('{' + 'name' + '}', name.to_s).sub('{' + 'group' + '}', group.to_s).sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'cmd'] = cmd # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # 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 => 'ServiceExecResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#service_exec\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Generic operation service. Provides endpoint for executing package manipulation commands. Responses are in the format of the ServiceResponse
in the defintions section. @param cmd The command to execute. @param [Hash] opts the optional parameters @option opts [String] :name The name of the package on which to execute the command. @option opts [String] :group The group of the package on which to execute the command. @option opts [BOOLEAN] :strict Fail on an error. @return [String]
# File lib/crx_packmgr_api_client/api/default_api.rb, line 422 def service_get(cmd, opts = {}) data, _status_code, _headers = service_get_with_http_info(cmd, opts) data end
Generic operation service. Provides endpoint for executing package manipulation commands. Responses are in the format of the ServiceResponse
in the defintions section. @param cmd The command to execute. @param [Hash] opts the optional parameters @option opts [String] :name The name of the package on which to execute the command. @option opts [String] :group The group of the package on which to execute the command. @option opts [BOOLEAN] :strict Fail on an error. @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
# File lib/crx_packmgr_api_client/api/default_api.rb, line 435 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 if @api_client.config.client_side_validation && cmd.nil? fail ArgumentError, "Missing the required parameter 'cmd' when calling DefaultApi.service_get" end # verify enum value if @api_client.config.client_side_validation && !['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' # 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) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/zip', 'text/plain']) # 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
Generic operation service. Provides endpoint for executing package manipulation commands. Responses are in the format of the ServiceResponse
in the defintions section. @param file Package
file to upload @param [Hash] opts the optional parameters @option opts [String] :name The hint for the package's name if the definiton doesn't have one. @option opts [BOOLEAN] :strict Fail on an error. @option opts [BOOLEAN] :force Force the package upload. @option opts [BOOLEAN] :install Install the package upon upload @return [String]
# File lib/crx_packmgr_api_client/api/default_api.rb, line 489 def service_post(file, opts = {}) data, _status_code, _headers = service_post_with_http_info(file, opts) data end
Generic operation service. Provides endpoint for executing package manipulation commands. Responses are in the format of the ServiceResponse
in the defintions section. @param file Package
file to upload @param [Hash] opts the optional parameters @option opts [String] :name The hint for the package's name if the definiton doesn't have one. @option opts [BOOLEAN] :strict Fail on an error. @option opts [BOOLEAN] :force Force the package upload. @option opts [BOOLEAN] :install Install the package upon upload @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
# File lib/crx_packmgr_api_client/api/default_api.rb, line 503 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 if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling DefaultApi.service_post" end # resource path local_var_path = '/service.jsp' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # 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
Get package thumbnail Returns the package's thumbnail image. @param [Hash] opts the optional parameters @option opts [String] :path The path to the package. @return [File]
# File lib/crx_packmgr_api_client/api/default_api.rb, line 550 def thumbnail(opts = {}) data, _status_code, _headers = thumbnail_with_http_info(opts) data end
Get package thumbnail Returns the package's thumbnail image. @param [Hash] opts the optional parameters @option opts [String] :path The path to the package. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
# File lib/crx_packmgr_api_client/api/default_api.rb, line 560 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' # query parameters query_params = {} query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['image/jpg', 'image/jpeg', 'image/png']) # 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