crx_packmgr_api_client 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -16
  3. data/crx_packmgr_api_client-0.2.0.gem +0 -0
  4. data/crx_packmgr_api_client.gemspec +9 -4
  5. data/docs/DefaultApi.md +457 -7
  6. data/docs/{PackageFilter.md → Filter.md} +2 -2
  7. data/docs/FilterRule.md +9 -0
  8. data/docs/Group.md +11 -0
  9. data/docs/{InlineResponse200.md → GroupList.md} +2 -2
  10. data/docs/InitData.md +13 -0
  11. data/docs/InstallStatus.md +8 -0
  12. data/docs/InstallStatusStatus.md +9 -0
  13. data/docs/Package.md +1 -1
  14. data/docs/PackageList.md +1 -0
  15. data/docs/ServiceResponse.md +12 -0
  16. data/docs/ServiceResponseRequest.md +8 -0
  17. data/docs/ServiceResponseRequestParam.md +9 -0
  18. data/docs/ServiceResponseResponse.md +9 -0
  19. data/docs/UpdateStatus.md +10 -0
  20. data/git_push.sh +1 -1
  21. data/lib/crx_packmgr_api_client.rb +13 -2
  22. data/lib/crx_packmgr_api_client/api/default_api.rb +491 -8
  23. data/lib/crx_packmgr_api_client/api_client.rb +1 -1
  24. data/lib/crx_packmgr_api_client/api_error.rb +1 -1
  25. data/lib/crx_packmgr_api_client/configuration.rb +1 -1
  26. data/lib/crx_packmgr_api_client/models/{package_filter.rb → filter.rb} +3 -3
  27. data/lib/crx_packmgr_api_client/models/filter_rule.rb +241 -0
  28. data/lib/crx_packmgr_api_client/models/group.rb +226 -0
  29. data/lib/crx_packmgr_api_client/models/{inline_response_200.rb → group_list.rb} +10 -10
  30. data/lib/crx_packmgr_api_client/models/init_data.rb +246 -0
  31. data/lib/crx_packmgr_api_client/models/install_status.rb +199 -0
  32. data/lib/crx_packmgr_api_client/models/install_status_status.rb +208 -0
  33. data/lib/crx_packmgr_api_client/models/package.rb +2 -2
  34. data/lib/crx_packmgr_api_client/models/package_list.rb +14 -5
  35. data/lib/crx_packmgr_api_client/models/service_response.rb +235 -0
  36. data/lib/crx_packmgr_api_client/models/service_response_request.rb +201 -0
  37. data/lib/crx_packmgr_api_client/models/service_response_request_param.rb +208 -0
  38. data/lib/crx_packmgr_api_client/models/service_response_response.rb +208 -0
  39. data/lib/crx_packmgr_api_client/models/update_status.rb +217 -0
  40. data/lib/crx_packmgr_api_client/version.rb +2 -2
  41. data/spec/acceptance/default_api_spec.rb +150 -0
  42. data/spec/api/default_api_spec.rb +2 -14
  43. data/spec/api/download_api_spec.rb +95 -0
  44. data/spec/api/groups_api_spec.rb +193 -0
  45. data/spec/api/init_api_spec.rb +104 -0
  46. data/spec/api/installstatus_api_spec.rb +91 -0
  47. data/spec/api/list_api_spec.rb +130 -0
  48. data/spec/api/screenshot_api_spec.rb +93 -0
  49. data/spec/api/service_api_spec.rb +374 -0
  50. data/spec/api/thumbnail_api_spec.rb +93 -0
  51. data/spec/api_client_spec.rb +1 -1
  52. data/spec/configuration_spec.rb +1 -1
  53. data/spec/files/list.json +533 -0
  54. data/spec/files/service_response.txt +11 -0
  55. data/spec/files/service_response1.txt +12 -0
  56. data/spec/files/test-1.0.0.zip +0 -0
  57. data/spec/files/thumbnail.png +0 -0
  58. data/spec/models/filter_rule_spec.rb +63 -0
  59. data/spec/models/{package_filter_spec.rb → filter_spec.rb} +7 -7
  60. data/spec/models/{inline_response_200_spec.rb → group_list_spec.rb} +8 -8
  61. data/spec/models/group_spec.rb +71 -0
  62. data/spec/models/init_data_spec.rb +83 -0
  63. data/spec/models/install_status_spec.rb +53 -0
  64. data/spec/models/install_status_status_spec.rb +59 -0
  65. data/spec/models/package_list_spec.rb +1 -1
  66. data/spec/models/package_spec.rb +1 -1
  67. data/spec/models/service_response_request_param_spec.rb +59 -0
  68. data/spec/models/service_response_request_spec.rb +53 -0
  69. data/spec/models/service_response_response_spec.rb +59 -0
  70. data/spec/models/service_response_spec.rb +77 -0
  71. data/spec/models/update_status_spec.rb +65 -0
  72. data/spec/spec_helper.rb +10 -1
  73. data/spec/spec_helper_acceptance.rb +19 -0
  74. metadata +130 -17
@@ -1,9 +1,9 @@
1
- # CrxPackageManager::PackageFilter
1
+ # CrxPackageManager::Filter
2
2
 
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **root** | **String** | | [optional]
7
- **rules** | **Array<String>** | | [optional]
7
+ **rules** | [**Array<FilterRule>**](FilterRule.md) | | [optional]
8
8
 
9
9
 
@@ -0,0 +1,9 @@
1
+ # CrxPackageManager::FilterRule
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **modifier** | **String** | | [optional]
7
+ **pattern** | **String** | | [optional]
8
+
9
+
@@ -0,0 +1,11 @@
1
+ # CrxPackageManager::Group
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **name** | **String** | | [optional]
7
+ **title** | **String** | | [optional]
8
+ **count** | **Integer** | | [optional]
9
+ **deep_count** | **Integer** | | [optional]
10
+
11
+
@@ -1,8 +1,8 @@
1
- # CrxPackageManager::InlineResponse200
1
+ # CrxPackageManager::GroupList
2
2
 
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **results** | [**Array<Package>**](Package.md) | | [optional]
6
+ **groups** | [**Array<Group>**](Group.md) | | [optional]
7
7
 
8
8
 
@@ -0,0 +1,13 @@
1
+ # CrxPackageManager::InitData
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **context_path** | **String** | | [optional]
7
+ **launchpad_context_path** | **String** | | [optional]
8
+ **jcr_version** | **String** | | [optional]
9
+ **workspace** | **String** | | [optional]
10
+ **user_id** | **String** | | [optional]
11
+ **workspaces** | **Array<String>** | | [optional]
12
+
13
+
@@ -0,0 +1,8 @@
1
+ # CrxPackageManager::InstallStatus
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **status** | [**InstallStatusStatus**](InstallStatusStatus.md) | | [optional]
7
+
8
+
@@ -0,0 +1,9 @@
1
+ # CrxPackageManager::InstallStatusStatus
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **finished** | **BOOLEAN** | | [optional]
7
+ **item_count** | **Integer** | | [optional]
8
+
9
+
@@ -34,7 +34,7 @@ Name | Type | Description | Notes
34
34
  **ac_handling** | **String** | | [optional]
35
35
  **dependencies** | **Array<String>** | | [optional]
36
36
  **resolved** | **BOOLEAN** | | [optional]
37
- **filter** | [**Array<PackageFilter>**](PackageFilter.md) | | [optional]
37
+ **filter** | [**Array<Filter>**](Filter.md) | | [optional]
38
38
  **screenshots** | **Array<String>** | | [optional]
39
39
 
40
40
 
@@ -4,5 +4,6 @@
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **results** | [**Array<Package>**](Package.md) | | [optional]
7
+ **total** | **Integer** | | [optional]
7
8
 
8
9
 
@@ -0,0 +1,12 @@
1
+ # CrxPackageManager::ServiceResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **version** | **String** | | [optional]
7
+ **user** | **String** | | [optional]
8
+ **workspace** | **String** | | [optional]
9
+ **request** | [**ServiceResponseRequest**](ServiceResponseRequest.md) | | [optional]
10
+ **response** | [**ServiceResponseResponse**](ServiceResponseResponse.md) | | [optional]
11
+
12
+
@@ -0,0 +1,8 @@
1
+ # CrxPackageManager::ServiceResponseRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **param** | [**Array<ServiceResponseRequestParam>**](ServiceResponseRequestParam.md) | | [optional]
7
+
8
+
@@ -0,0 +1,9 @@
1
+ # CrxPackageManager::ServiceResponseRequestParam
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **name** | **String** | | [optional]
7
+ **value** | **String** | | [optional]
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # CrxPackageManager::ServiceResponseResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | **Object** | | [optional]
7
+ **status** | **Object** | | [optional]
8
+
9
+
@@ -0,0 +1,10 @@
1
+ # CrxPackageManager::UpdateStatus
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **success** | **BOOLEAN** | | [optional]
7
+ **msg** | **String** | | [optional]
8
+ **path** | **String** | | [optional]
9
+
10
+
@@ -7,7 +7,7 @@
7
7
  # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
8
 
9
9
  git_user_id="bstopp"
10
- git_repo_id="crx_packmgr_api_client"
10
+ git_repo_id="crx-packmgr-api-client-gem"
11
11
  release_note=$1
12
12
 
13
13
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  #API for interacting with the CRX Package Manager in AEM.
5
5
 
6
- OpenAPI spec version: 1.0.0
6
+ OpenAPI spec version: 6.2.0
7
7
  Contact: bryan.stopp@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -28,9 +28,20 @@ require 'crx_packmgr_api_client/version'
28
28
  require 'crx_packmgr_api_client/configuration'
29
29
 
30
30
  # Models
31
+ require 'crx_packmgr_api_client/models/filter'
32
+ require 'crx_packmgr_api_client/models/filter_rule'
33
+ require 'crx_packmgr_api_client/models/group'
34
+ require 'crx_packmgr_api_client/models/group_list'
35
+ require 'crx_packmgr_api_client/models/init_data'
36
+ require 'crx_packmgr_api_client/models/install_status'
37
+ require 'crx_packmgr_api_client/models/install_status_status'
31
38
  require 'crx_packmgr_api_client/models/package'
32
- require 'crx_packmgr_api_client/models/package_filter'
33
39
  require 'crx_packmgr_api_client/models/package_list'
40
+ require 'crx_packmgr_api_client/models/service_response'
41
+ require 'crx_packmgr_api_client/models/service_response_request'
42
+ require 'crx_packmgr_api_client/models/service_response_request_param'
43
+ require 'crx_packmgr_api_client/models/service_response_response'
44
+ require 'crx_packmgr_api_client/models/update_status'
34
45
 
35
46
  # APIs
36
47
  require 'crx_packmgr_api_client/api/default_api'
@@ -3,7 +3,7 @@
3
3
 
4
4
  #API for interacting with the CRX Package Manager in AEM.
5
5
 
6
- OpenAPI spec version: 1.0.0
6
+ OpenAPI spec version: 6.2.0
7
7
  Contact: bryan.stopp@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -31,24 +31,254 @@ module CrxPackageManager
31
31
  @api_client = api_client
32
32
  end
33
33
 
34
- # List all available packages.
34
+ # Download a package
35
+ # Downloads the package at the specified path. Returns a Tempfile object.
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :path The path to the package to download.
38
+ # @return [File]
39
+ def download(opts = {})
40
+ data, _status_code, _headers = download_with_http_info(opts)
41
+ return data
42
+ end
43
+
44
+ # Download a package
45
+ # Downloads the package at the specified path. Returns a Tempfile object.
46
+ # @param [Hash] opts the optional parameters
47
+ # @option opts [String] :path The path to the package to download.
48
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
49
+ def download_with_http_info(opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug "Calling API: DefaultApi.download ..."
52
+ end
53
+ # resource path
54
+ local_var_path = "/download.jsp".sub('{format}','json')
55
+
56
+ # query parameters
57
+ query_params = {}
58
+ query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
59
+
60
+ # header parameters
61
+ header_params = {}
62
+
63
+ # HTTP header 'Accept' (if needed)
64
+ local_header_accept = ['application/octet-stream', 'application/zip']
65
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
66
+
67
+ # HTTP header 'Content-Type'
68
+ local_header_content_type = []
69
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
70
+
71
+ # form parameters
72
+ form_params = {}
73
+
74
+ # http body (model)
75
+ post_body = nil
76
+ auth_names = ['basic']
77
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
78
+ :header_params => header_params,
79
+ :query_params => query_params,
80
+ :form_params => form_params,
81
+ :body => post_body,
82
+ :auth_names => auth_names,
83
+ :return_type => 'File')
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: DefaultApi#download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # List package groups
91
+ # Returns a list of all package groups available.
92
+ # @param [Hash] opts the optional parameters
93
+ # @option opts [String] :compress_version Compress versions; count all versions of the same packages as a single entry.
94
+ # @option opts [BOOLEAN] :include_all Return a total count of all packages. Defaults to false.
95
+ # @option opts [BOOLEAN] :include_root Include the root package. Defaults to false.
96
+ # @option opts [BOOLEAN] :include_my_packages Include the &#39;my_packages&#39; group. Only applicable if the group has no packages. Defaults to false.
97
+ # @option opts [BOOLEAN] :only_top_level Only list top-level groups, ie. do not list all nested groups.
98
+ # @return [GroupList]
99
+ def groups(opts = {})
100
+ data, _status_code, _headers = groups_with_http_info(opts)
101
+ return data
102
+ end
103
+
104
+ # List package groups
105
+ # Returns a list of all package groups available.
106
+ # @param [Hash] opts the optional parameters
107
+ # @option opts [String] :compress_version Compress versions; count all versions of the same packages as a single entry.
108
+ # @option opts [BOOLEAN] :include_all Return a total count of all packages. Defaults to false.
109
+ # @option opts [BOOLEAN] :include_root Include the root package. Defaults to false.
110
+ # @option opts [BOOLEAN] :include_my_packages Include the &#39;my_packages&#39; group. Only applicable if the group has no packages. Defaults to false.
111
+ # @option opts [BOOLEAN] :only_top_level Only list top-level groups, ie. do not list all nested groups.
112
+ # @return [Array<(GroupList, Fixnum, Hash)>] GroupList data, response status code and response headers
113
+ def groups_with_http_info(opts = {})
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug "Calling API: DefaultApi.groups ..."
116
+ end
117
+ # resource path
118
+ local_var_path = "/groups.jsp".sub('{format}','json')
119
+
120
+ # query parameters
121
+ query_params = {}
122
+ query_params[:'compressVersion'] = opts[:'compress_version'] if !opts[:'compress_version'].nil?
123
+ query_params[:'includeAll'] = opts[:'include_all'] if !opts[:'include_all'].nil?
124
+ query_params[:'includeRoot'] = opts[:'include_root'] if !opts[:'include_root'].nil?
125
+ query_params[:'includeMyPackages'] = opts[:'include_my_packages'] if !opts[:'include_my_packages'].nil?
126
+ query_params[:'onlyTopLevel'] = opts[:'only_top_level'] if !opts[:'only_top_level'].nil?
127
+
128
+ # header parameters
129
+ header_params = {}
130
+
131
+ # HTTP header 'Accept' (if needed)
132
+ local_header_accept = ['application/json']
133
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
134
+
135
+ # HTTP header 'Content-Type'
136
+ local_header_content_type = []
137
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
138
+
139
+ # form parameters
140
+ form_params = {}
141
+
142
+ # http body (model)
143
+ post_body = nil
144
+ auth_names = ['basic']
145
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
146
+ :header_params => header_params,
147
+ :query_params => query_params,
148
+ :form_params => form_params,
149
+ :body => post_body,
150
+ :auth_names => auth_names,
151
+ :return_type => 'GroupList')
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: DefaultApi#groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
158
+ # Metadata
159
+ # Display metadata about this package manager.
160
+ # @param [Hash] opts the optional parameters
161
+ # @return [InitData]
162
+ def init(opts = {})
163
+ data, _status_code, _headers = init_with_http_info(opts)
164
+ return data
165
+ end
166
+
167
+ # Metadata
168
+ # Display metadata about this package manager.
169
+ # @param [Hash] opts the optional parameters
170
+ # @return [Array<(InitData, Fixnum, Hash)>] InitData data, response status code and response headers
171
+ def init_with_http_info(opts = {})
172
+ if @api_client.config.debugging
173
+ @api_client.config.logger.debug "Calling API: DefaultApi.init ..."
174
+ end
175
+ # resource path
176
+ local_var_path = "/init.jsp".sub('{format}','json')
177
+
178
+ # query parameters
179
+ query_params = {}
180
+
181
+ # header parameters
182
+ header_params = {}
183
+
184
+ # HTTP header 'Accept' (if needed)
185
+ local_header_accept = ['application/json']
186
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
187
+
188
+ # HTTP header 'Content-Type'
189
+ local_header_content_type = []
190
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
191
+
192
+ # form parameters
193
+ form_params = {}
194
+
195
+ # http body (model)
196
+ post_body = nil
197
+ auth_names = ['basic']
198
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
199
+ :header_params => header_params,
200
+ :query_params => query_params,
201
+ :form_params => form_params,
202
+ :body => post_body,
203
+ :auth_names => auth_names,
204
+ :return_type => 'InitData')
205
+ if @api_client.config.debugging
206
+ @api_client.config.logger.debug "API called: DefaultApi#init\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
207
+ end
208
+ return data, status_code, headers
209
+ end
210
+
211
+ # Package Installation Status
212
+ # Returns a status of the installation of OSGi packages.
213
+ # @param [Hash] opts the optional parameters
214
+ # @return [InstallStatus]
215
+ def installstatus(opts = {})
216
+ data, _status_code, _headers = installstatus_with_http_info(opts)
217
+ return data
218
+ end
219
+
220
+ # Package Installation Status
221
+ # Returns a status of the installation of OSGi packages.
222
+ # @param [Hash] opts the optional parameters
223
+ # @return [Array<(InstallStatus, Fixnum, Hash)>] InstallStatus data, response status code and response headers
224
+ def installstatus_with_http_info(opts = {})
225
+ if @api_client.config.debugging
226
+ @api_client.config.logger.debug "Calling API: DefaultApi.installstatus ..."
227
+ end
228
+ # resource path
229
+ local_var_path = "/installstatus.jsp".sub('{format}','json')
230
+
231
+ # query parameters
232
+ query_params = {}
233
+
234
+ # header parameters
235
+ header_params = {}
236
+
237
+ # HTTP header 'Accept' (if needed)
238
+ local_header_accept = ['application/json']
239
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
240
+
241
+ # HTTP header 'Content-Type'
242
+ local_header_content_type = []
243
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
244
+
245
+ # form parameters
246
+ form_params = {}
247
+
248
+ # http body (model)
249
+ post_body = nil
250
+ auth_names = ['basic']
251
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
252
+ :header_params => header_params,
253
+ :query_params => query_params,
254
+ :form_params => form_params,
255
+ :body => post_body,
256
+ :auth_names => auth_names,
257
+ :return_type => 'InstallStatus')
258
+ if @api_client.config.debugging
259
+ @api_client.config.logger.debug "API called: DefaultApi#installstatus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
260
+ end
261
+ return data, status_code, headers
262
+ end
263
+
264
+ # List packages
35
265
  # Returns a list of all available packages defined.
36
266
  # @param [Hash] opts the optional parameters
37
267
  # @option opts [String] :q Term to search within package names.
38
268
  # @option opts [BOOLEAN] :include_versions Include versions of package in results.
39
- # @option opts [String] :path The path to a specific package definition.
269
+ # @option opts [String] :null The path to a specific package definition.
40
270
  # @return [PackageList]
41
271
  def list(opts = {})
42
272
  data, _status_code, _headers = list_with_http_info(opts)
43
273
  return data
44
274
  end
45
275
 
46
- # List all available packages.
276
+ # List packages
47
277
  # Returns a list of all available packages defined.
48
278
  # @param [Hash] opts the optional parameters
49
279
  # @option opts [String] :q Term to search within package names.
50
280
  # @option opts [BOOLEAN] :include_versions Include versions of package in results.
51
- # @option opts [String] :path The path to a specific package definition.
281
+ # @option opts [String] :null The path to a specific package definition.
52
282
  # @return [Array<(PackageList, Fixnum, Hash)>] PackageList data, response status code and response headers
53
283
  def list_with_http_info(opts = {})
54
284
  if @api_client.config.debugging
@@ -61,17 +291,17 @@ module CrxPackageManager
61
291
  query_params = {}
62
292
  query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
63
293
  query_params[:'includeVersions'] = opts[:'include_versions'] if !opts[:'include_versions'].nil?
64
- query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
294
+ query_params[:'null'] = opts[:'null'] if !opts[:'null'].nil?
65
295
 
66
296
  # header parameters
67
297
  header_params = {}
68
298
 
69
299
  # HTTP header 'Accept' (if needed)
70
- local_header_accept = ['text/plain', 'text/html', 'application/json', 'application/xml']
300
+ local_header_accept = ['application/json']
71
301
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
72
302
 
73
303
  # HTTP header 'Content-Type'
74
- local_header_content_type = ['application/x-www-form-urlencoded', 'multipart/form-data']
304
+ local_header_content_type = []
75
305
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
76
306
 
77
307
  # form parameters
@@ -92,5 +322,258 @@ module CrxPackageManager
92
322
  end
93
323
  return data, status_code, headers
94
324
  end
325
+
326
+ # Get screenshot
327
+ # Returns the screenshot at the specified path.
328
+ # @param [Hash] opts the optional parameters
329
+ # @option opts [String] :path The path to the screenshot.
330
+ # @return [File]
331
+ def screenshot(opts = {})
332
+ data, _status_code, _headers = screenshot_with_http_info(opts)
333
+ return data
334
+ end
335
+
336
+ # Get screenshot
337
+ # Returns the screenshot at the specified path.
338
+ # @param [Hash] opts the optional parameters
339
+ # @option opts [String] :path The path to the screenshot.
340
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
341
+ def screenshot_with_http_info(opts = {})
342
+ if @api_client.config.debugging
343
+ @api_client.config.logger.debug "Calling API: DefaultApi.screenshot ..."
344
+ end
345
+ # resource path
346
+ local_var_path = "/screenshot.jsp".sub('{format}','json')
347
+
348
+ # query parameters
349
+ query_params = {}
350
+ query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
351
+
352
+ # header parameters
353
+ header_params = {}
354
+
355
+ # HTTP header 'Accept' (if needed)
356
+ local_header_accept = ['image/jpg', 'image/jpeg', 'image/png']
357
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
358
+
359
+ # HTTP header 'Content-Type'
360
+ local_header_content_type = []
361
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
362
+
363
+ # form parameters
364
+ form_params = {}
365
+
366
+ # http body (model)
367
+ post_body = nil
368
+ auth_names = ['basic']
369
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
370
+ :header_params => header_params,
371
+ :query_params => query_params,
372
+ :form_params => form_params,
373
+ :body => post_body,
374
+ :auth_names => auth_names,
375
+ :return_type => 'File')
376
+ if @api_client.config.debugging
377
+ @api_client.config.logger.debug "API called: DefaultApi#screenshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
378
+ end
379
+ return data, status_code, headers
380
+ end
381
+
382
+ # Generic operation service.
383
+ # Provides endpoint for executing package manipulation commands. Responses are in the format of the ServiceResponse in the defintions section.
384
+ # @param cmd The command to execute.
385
+ # @param [Hash] opts the optional parameters
386
+ # @option opts [String] :name The name of the package on which to execute the command.
387
+ # @option opts [String] :group The group of the package on which to execute the command.
388
+ # @option opts [BOOLEAN] :strict Fail on an error.
389
+ # @return [String]
390
+ def service_get(cmd, opts = {})
391
+ data, _status_code, _headers = service_get_with_http_info(cmd, opts)
392
+ return data
393
+ end
394
+
395
+ # Generic operation service.
396
+ # Provides endpoint for executing package manipulation commands. Responses are in the format of the ServiceResponse in the defintions section.
397
+ # @param cmd The command to execute.
398
+ # @param [Hash] opts the optional parameters
399
+ # @option opts [String] :name The name of the package on which to execute the command.
400
+ # @option opts [String] :group The group of the package on which to execute the command.
401
+ # @option opts [BOOLEAN] :strict Fail on an error.
402
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
403
+ def service_get_with_http_info(cmd, opts = {})
404
+ if @api_client.config.debugging
405
+ @api_client.config.logger.debug "Calling API: DefaultApi.service_get ..."
406
+ end
407
+ # verify the required parameter 'cmd' is set
408
+ fail ArgumentError, "Missing the required parameter 'cmd' when calling DefaultApi.service_get" if cmd.nil?
409
+ # verify enum value
410
+ unless ['help', 'ls', 'rm', 'build', 'inst', 'uninst', 'get'].include?(cmd)
411
+ fail ArgumentError, "invalid value for 'cmd', must be one of help, ls, rm, build, inst, uninst, get"
412
+ end
413
+ # resource path
414
+ local_var_path = "/service.jsp".sub('{format}','json')
415
+
416
+ # query parameters
417
+ query_params = {}
418
+ query_params[:'cmd'] = cmd
419
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
420
+ query_params[:'group'] = opts[:'group'] if !opts[:'group'].nil?
421
+ query_params[:'strict'] = opts[:'strict'] if !opts[:'strict'].nil?
422
+
423
+ # header parameters
424
+ header_params = {}
425
+
426
+ # HTTP header 'Accept' (if needed)
427
+ local_header_accept = ['application/octet-stream', 'application/zip', 'text/plain']
428
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
429
+
430
+ # HTTP header 'Content-Type'
431
+ local_header_content_type = []
432
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
433
+
434
+ # form parameters
435
+ form_params = {}
436
+
437
+ # http body (model)
438
+ post_body = nil
439
+ auth_names = ['basic']
440
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
441
+ :header_params => header_params,
442
+ :query_params => query_params,
443
+ :form_params => form_params,
444
+ :body => post_body,
445
+ :auth_names => auth_names,
446
+ :return_type => 'String')
447
+ if @api_client.config.debugging
448
+ @api_client.config.logger.debug "API called: DefaultApi#service_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
449
+ end
450
+ return data, status_code, headers
451
+ end
452
+
453
+ # Generic operation service.
454
+ # Provides endpoint for executing package manipulation commands. Responses are in the format of the ServiceResponse in the defintions section.
455
+ # @param file Package file to upload
456
+ # @param [Hash] opts the optional parameters
457
+ # @option opts [String] :name The hint for the package&#39;s name if the definiton doesn&#39;t have one.
458
+ # @option opts [BOOLEAN] :strict Fail on an error.
459
+ # @option opts [BOOLEAN] :force Force the package upload.
460
+ # @option opts [BOOLEAN] :install Install the package upon upload
461
+ # @return [String]
462
+ def service_post(file, opts = {})
463
+ data, _status_code, _headers = service_post_with_http_info(file, opts)
464
+ return data
465
+ end
466
+
467
+ # Generic operation service.
468
+ # Provides endpoint for executing package manipulation commands. Responses are in the format of the ServiceResponse in the defintions section.
469
+ # @param file Package file to upload
470
+ # @param [Hash] opts the optional parameters
471
+ # @option opts [String] :name The hint for the package&#39;s name if the definiton doesn&#39;t have one.
472
+ # @option opts [BOOLEAN] :strict Fail on an error.
473
+ # @option opts [BOOLEAN] :force Force the package upload.
474
+ # @option opts [BOOLEAN] :install Install the package upon upload
475
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
476
+ def service_post_with_http_info(file, opts = {})
477
+ if @api_client.config.debugging
478
+ @api_client.config.logger.debug "Calling API: DefaultApi.service_post ..."
479
+ end
480
+ # verify the required parameter 'file' is set
481
+ fail ArgumentError, "Missing the required parameter 'file' when calling DefaultApi.service_post" if file.nil?
482
+ # resource path
483
+ local_var_path = "/service.jsp".sub('{format}','json')
484
+
485
+ # query parameters
486
+ query_params = {}
487
+
488
+ # header parameters
489
+ header_params = {}
490
+
491
+ # HTTP header 'Accept' (if needed)
492
+ local_header_accept = []
493
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
494
+
495
+ # HTTP header 'Content-Type'
496
+ local_header_content_type = ['multipart/form-data']
497
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
498
+
499
+ # form parameters
500
+ form_params = {}
501
+ form_params["file"] = file
502
+ form_params["name"] = opts[:'name'] if !opts[:'name'].nil?
503
+ form_params["strict"] = opts[:'strict'] if !opts[:'strict'].nil?
504
+ form_params["force"] = opts[:'force'] if !opts[:'force'].nil?
505
+ form_params["install"] = opts[:'install'] if !opts[:'install'].nil?
506
+
507
+ # http body (model)
508
+ post_body = nil
509
+ auth_names = ['basic']
510
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
511
+ :header_params => header_params,
512
+ :query_params => query_params,
513
+ :form_params => form_params,
514
+ :body => post_body,
515
+ :auth_names => auth_names,
516
+ :return_type => 'String')
517
+ if @api_client.config.debugging
518
+ @api_client.config.logger.debug "API called: DefaultApi#service_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
519
+ end
520
+ return data, status_code, headers
521
+ end
522
+
523
+ # Get package thumbnail
524
+ # Returns the package's thumbnail image.
525
+ # @param [Hash] opts the optional parameters
526
+ # @option opts [String] :path The path to the package.
527
+ # @return [File]
528
+ def thumbnail(opts = {})
529
+ data, _status_code, _headers = thumbnail_with_http_info(opts)
530
+ return data
531
+ end
532
+
533
+ # Get package thumbnail
534
+ # Returns the package&#39;s thumbnail image.
535
+ # @param [Hash] opts the optional parameters
536
+ # @option opts [String] :path The path to the package.
537
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
538
+ def thumbnail_with_http_info(opts = {})
539
+ if @api_client.config.debugging
540
+ @api_client.config.logger.debug "Calling API: DefaultApi.thumbnail ..."
541
+ end
542
+ # resource path
543
+ local_var_path = "/thumbnail.jsp".sub('{format}','json')
544
+
545
+ # query parameters
546
+ query_params = {}
547
+ query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
548
+
549
+ # header parameters
550
+ header_params = {}
551
+
552
+ # HTTP header 'Accept' (if needed)
553
+ local_header_accept = ['image/jpg', 'image/jpeg', 'image/png']
554
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
555
+
556
+ # HTTP header 'Content-Type'
557
+ local_header_content_type = []
558
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
559
+
560
+ # form parameters
561
+ form_params = {}
562
+
563
+ # http body (model)
564
+ post_body = nil
565
+ auth_names = ['basic']
566
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
567
+ :header_params => header_params,
568
+ :query_params => query_params,
569
+ :form_params => form_params,
570
+ :body => post_body,
571
+ :auth_names => auth_names,
572
+ :return_type => 'File')
573
+ if @api_client.config.debugging
574
+ @api_client.config.logger.debug "API called: DefaultApi#thumbnail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
575
+ end
576
+ return data, status_code, headers
577
+ end
95
578
  end
96
579
  end