Class: RokkaClientCodegen::SourceimagesApi
- Inherits:
-
Object
- Object
- RokkaClientCodegen::SourceimagesApi
- Defined in:
- lib/rokka_client_codegen/api/sourceimages_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#copy_source_image(destination, organization, hash, opts = {}) ⇒ nil
Copy a single source image to another org.
-
#copy_source_image_with_http_info(destination, organization, hash, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Copy a single source image to another org.
-
#create_source_image(filedata, organization, opts = {}) ⇒ ListSourceImagesResponse
Upload new source images.
-
#create_source_image_meta_dynamic_with_name(meta_dynamic_definition, organization, hash, meta_name, opts = {}) ⇒ SourceImage
Adds or updates a specific dynamic meta data for an image.
-
#create_source_image_meta_dynamic_with_name_with_http_info(meta_dynamic_definition, organization, hash, meta_name, opts = {}) ⇒ Array<(SourceImage, Fixnum, Hash)>
Adds or updates a specific dynamic meta data for an image.
-
#create_source_image_meta_user(user_meta_data, organization, hash, opts = {}) ⇒ nil
Replace the image meta data with new information.
-
#create_source_image_meta_user_with_http_info(user_meta_data, organization, hash, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Replace the image meta data with new information.
-
#create_source_image_meta_user_wth_name(user_meta_data_single_field, organization, hash, meta_name, opts = {}) ⇒ nil
Adds or updates one user meta data field for an image.
-
#create_source_image_meta_user_wth_name_with_http_info(user_meta_data_single_field, organization, hash, meta_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Adds or updates one user meta data field for an image.
-
#create_source_image_with_http_info(filedata, organization, opts = {}) ⇒ Array<(ListSourceImagesResponse, Fixnum, Hash)>
Upload new source images.
-
#delete_source_image(organization, hash, opts = {}) ⇒ nil
Delete a single source image.
-
#delete_source_image_meta_dynamic_with_name(organization, hash, meta_name, opts = {}) ⇒ SourceImage
Deletes a specific dynamic meta data.
-
#delete_source_image_meta_dynamic_with_name_with_http_info(organization, hash, meta_name, opts = {}) ⇒ Array<(SourceImage, Fixnum, Hash)>
Deletes a specific dynamic meta data.
-
#delete_source_image_meta_user(organization, hash, opts = {}) ⇒ nil
Deletes all user meta data.
-
#delete_source_image_meta_user_with_http_info(organization, hash, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Deletes all user meta data.
-
#delete_source_image_meta_user_with_name(organization, hash, meta_name, opts = {}) ⇒ nil
Deletes user meta data for a specified field.
-
#delete_source_image_meta_user_with_name_with_http_info(organization, hash, meta_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Deletes user meta data for a specified field.
-
#delete_source_image_with_http_info(organization, hash, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a single source image.
-
#download_source_image(organization, hash, opts = {}) ⇒ File
Download original source image binary.
-
#download_source_image_with_http_info(organization, hash, opts = {}) ⇒ Array<(File, Fixnum, Hash)>
Download original source image binary.
-
#get_source_image(organization, hash, opts = {}) ⇒ SourceImage
Get information about a source image.
-
#get_source_image_meta_user(organization, hash, opts = {}) ⇒ Object
Get all user meta data.
-
#get_source_image_meta_user_with_http_info(organization, hash, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Get all user meta data.
-
#get_source_image_meta_user_with_name(organization, hash, meta_name, opts = {}) ⇒ String
Get user meta for a specific field.
-
#get_source_image_meta_user_with_name_with_http_info(organization, hash, meta_name, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get user meta for a specific field.
-
#get_source_image_with_http_info(organization, hash, opts = {}) ⇒ Array<(SourceImage, Fixnum, Hash)>
Get information about a source image.
-
#initialize(api_client = ApiClient.default) ⇒ SourceimagesApi
constructor
A new instance of SourceimagesApi.
-
#list_source_images(organization, opts = {}) ⇒ ListSourceImagesResponse
Get all images of an organization, with paging.
-
#list_source_images_by_binary_hash(organization, binary_hash, opts = {}) ⇒ ListSourceImagesResponse
Get all images in this organization that match a binaryhash.
-
#list_source_images_by_binary_hash_with_http_info(organization, binary_hash, opts = {}) ⇒ Array<(ListSourceImagesResponse, Fixnum, Hash)>
Get all images in this organization that match a binaryhash.
-
#list_source_images_with_http_info(organization, opts = {}) ⇒ Array<(ListSourceImagesResponse, Fixnum, Hash)>
Get all images of an organization, with paging.
-
#patch_source_image_meta_user(user_meta_data, organization, hash, opts = {}) ⇒ nil
Update the specified meta data fields for an image.
-
#patch_source_image_meta_user_with_http_info(user_meta_data, organization, hash, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update the specified meta data fields for an image.
-
#restore_source_image(organization, hash, opts = {}) ⇒ SourceImage
Restore source image including previously set metadata.
-
#restore_source_image_with_http_info(organization, hash, opts = {}) ⇒ Array<(SourceImage, Fixnum, Hash)>
Restore source image including previously set metadata.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SourceimagesApi
Returns a new instance of SourceimagesApi.
19 20 21 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#copy_source_image(destination, organization, hash, opts = {}) ⇒ nil
Copy a single source image to another org. The metadata is copied as well. After copying, changes to either image metadata are not reflected in the other image metadata. This is a proxy method for COPY on /sourceimages/organization/hash. It allows to copy images with a POST request, to work around restrictive firewalls and allows to produce a swagger specification for this operation.
31 32 33 34 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 31 def copy_source_image(destination, organization, hash, opts = {}) copy_source_image_with_http_info(destination, organization, hash, opts) return nil end |
#copy_source_image_with_http_info(destination, organization, hash, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Copy a single source image to another org. The metadata is copied as well. After copying, changes to either image metadata are not reflected in the other image metadata. This is a proxy method for COPY on /sourceimages/organization/hash. It allows to copy images with a POST request, to work around restrictive firewalls and allows to produce a swagger specification for this operation.
44 45 46 47 48 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 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 44 def copy_source_image_with_http_info(destination, organization, hash, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.copy_source_image ..." end # verify the required parameter 'destination' is set if @api_client.config.client_side_validation && destination.nil? fail ArgumentError, "Missing the required parameter 'destination' when calling SourceimagesApi.copy_source_image" end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.copy_source_image" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.copy_source_image, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'hash' is set if @api_client.config.client_side_validation && hash.nil? fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.copy_source_image" end if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/) fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.copy_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/." end if @api_client.config.client_side_validation && opts[:'overwrite'] && !['', ' F'].include?(opts[:'overwrite']) fail ArgumentError, 'invalid value for "overwrite", must be one of , F' end # resource path local_var_path = "/sourceimages/{organization}/{hash}/copy".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params[:'Destination'] = destination header_params[:'Overwrite'] = opts[:'overwrite'] if !opts[:'overwrite'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#copy_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_source_image(filedata, organization, opts = {}) ⇒ ListSourceImagesResponse
Upload new source images. The request is form data for the uploaded files and arrays of metadata. Files and metadata are matched based on their order in the request. Note that this call allows to upload multiple images, but the swagger UI does not support this.
108 109 110 111 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 108 def create_source_image(filedata, organization, opts = {}) data, _status_code, _headers = create_source_image_with_http_info(filedata, organization, opts) return data end |
#create_source_image_meta_dynamic_with_name(meta_dynamic_definition, organization, hash, meta_name, opts = {}) ⇒ SourceImage
Adds or updates a specific dynamic meta data for an image. This changes the hash of the image. The response provides the new location of the image in the Location header.
179 180 181 182 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 179 def (, organization, hash, , opts = {}) data, _status_code, _headers = (, organization, hash, , opts) return data end |
#create_source_image_meta_dynamic_with_name_with_http_info(meta_dynamic_definition, organization, hash, meta_name, opts = {}) ⇒ Array<(SourceImage, Fixnum, Hash)>
Adds or updates a specific dynamic meta data for an image. This changes the hash of the image. The response provides the new location of the image in the Location header.
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 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 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 193 def (, organization, hash, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.create_source_image_meta_dynamic_with_name ..." end # verify the required parameter 'meta_dynamic_definition' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'meta_dynamic_definition' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name" end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'hash' is set if @api_client.config.client_side_validation && hash.nil? fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name" end if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/) fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name, must conform to the pattern /[0-9a-fA-F]{6,40}/." end # verify the required parameter 'meta_name' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name" end if @api_client.config.client_side_validation && !~ Regexp.new(/[a-zA-Z_]+/) fail ArgumentError, "invalid value for 'meta_name' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name, must conform to the pattern /[a-zA-Z_]+/." end # resource path local_var_path = "/sourceimages/{organization}/{hash}/meta/dynamic/{metaName}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s).sub('{' + 'metaName' + '}', .to_s) # query parameters query_params = {} query_params[:'deletePrevious'] = opts[:'delete_previous'] if !opts[:'delete_previous'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body() auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SourceImage') if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#create_source_image_meta_dynamic_with_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_source_image_meta_user(user_meta_data, organization, hash, opts = {}) ⇒ nil
Replace the image meta data with new information. All existing meta data for the image is removed and then the new meta data is added. User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
261 262 263 264 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 261 def (, organization, hash, opts = {}) (, organization, hash, opts) return nil end |
#create_source_image_meta_user_with_http_info(user_meta_data, organization, hash, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Replace the image meta data with new information. All existing meta data for the image is removed and then the new meta data is added. User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
273 274 275 276 277 278 279 280 281 282 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 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 273 def (, organization, hash, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.create_source_image_meta_user ..." end # verify the required parameter 'user_meta_data' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'user_meta_data' when calling SourceimagesApi.create_source_image_meta_user" end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.create_source_image_meta_user" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.create_source_image_meta_user, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'hash' is set if @api_client.config.client_side_validation && hash.nil? fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.create_source_image_meta_user" end if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/) fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.create_source_image_meta_user, must conform to the pattern /[0-9a-fA-F]{6,40}/." end # resource path local_var_path = "/sourceimages/{organization}/{hash}/meta/user".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body() auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#create_source_image_meta_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_source_image_meta_user_wth_name(user_meta_data_single_field, organization, hash, meta_name, opts = {}) ⇒ nil
Adds or updates one user meta data field for an image. User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
332 333 334 335 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 332 def (, organization, hash, , opts = {}) (, organization, hash, , opts) return nil end |
#create_source_image_meta_user_wth_name_with_http_info(user_meta_data_single_field, organization, hash, meta_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Adds or updates one user meta data field for an image. User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
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 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 345 def (, organization, hash, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.create_source_image_meta_user_wth_name ..." end # verify the required parameter 'user_meta_data_single_field' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'user_meta_data_single_field' when calling SourceimagesApi.create_source_image_meta_user_wth_name" end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.create_source_image_meta_user_wth_name" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.create_source_image_meta_user_wth_name, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'hash' is set if @api_client.config.client_side_validation && hash.nil? fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.create_source_image_meta_user_wth_name" end if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/) fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.create_source_image_meta_user_wth_name, must conform to the pattern /[0-9a-fA-F]{6,40}/." end # verify the required parameter 'meta_name' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.create_source_image_meta_user_wth_name" end if @api_client.config.client_side_validation && !~ Regexp.new(/[a-zA-Z0-9_-]+/) fail ArgumentError, "invalid value for 'meta_name' when calling SourceimagesApi.create_source_image_meta_user_wth_name, must conform to the pattern /[a-zA-Z0-9_-]+/." end # resource path local_var_path = "/sourceimages/{organization}/{hash}/meta/user/{metaName}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s).sub('{' + 'metaName' + '}', .to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body() auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#create_source_image_meta_user_wth_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_source_image_with_http_info(filedata, organization, opts = {}) ⇒ Array<(ListSourceImagesResponse, Fixnum, Hash)>
Upload new source images. The request is form data for the uploaded files and arrays of metadata. Files and metadata are matched based on their order in the request. Note that this call allows to upload multiple images, but the swagger UI does not support this.
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 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 121 def create_source_image_with_http_info(filedata, organization, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.create_source_image ..." end # verify the required parameter 'filedata' is set if @api_client.config.client_side_validation && filedata.nil? fail ArgumentError, "Missing the required parameter 'filedata' when calling SourceimagesApi.create_source_image" end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.create_source_image" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.create_source_image, must conform to the pattern /[0-9a-z\\-]+/." end # resource path local_var_path = "/sourceimages/{organization}".sub('{' + 'organization' + '}', organization.to_s) # 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["filedata"] = filedata form_params["meta_dynamic[]"] = opts[:'meta_dynamic'] if !opts[:'meta_dynamic'].nil? form_params["meta_user[]"] = opts[:'meta_user'] if !opts[:'meta_user'].nil? # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'ListSourceImagesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#create_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_source_image(organization, hash, opts = {}) ⇒ nil
Delete a single source image.
410 411 412 413 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 410 def delete_source_image(organization, hash, opts = {}) delete_source_image_with_http_info(organization, hash, opts) return nil end |
#delete_source_image_meta_dynamic_with_name(organization, hash, meta_name, opts = {}) ⇒ SourceImage
Deletes a specific dynamic meta data. This changes the hash of the image. The response provides the new location of the image in the Location header.
476 477 478 479 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 476 def (organization, hash, , opts = {}) data, _status_code, _headers = (organization, hash, , opts) return data end |
#delete_source_image_meta_dynamic_with_name_with_http_info(organization, hash, meta_name, opts = {}) ⇒ Array<(SourceImage, Fixnum, Hash)>
Deletes a specific dynamic meta data. This changes the hash of the image. The response provides the new location of the image in the Location header.
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 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 489 def (organization, hash, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.delete_source_image_meta_dynamic_with_name ..." end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'hash' is set if @api_client.config.client_side_validation && hash.nil? fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name" end if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/) fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name, must conform to the pattern /[0-9a-fA-F]{6,40}/." end # verify the required parameter 'meta_name' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name" end if @api_client.config.client_side_validation && !~ Regexp.new(/[a-zA-Z_]+/) fail ArgumentError, "invalid value for 'meta_name' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name, must conform to the pattern /[a-zA-Z_]+/." end # resource path local_var_path = "/sourceimages/{organization}/{hash}/meta/dynamic/{metaName}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s).sub('{' + 'metaName' + '}', .to_s) # query parameters query_params = {} query_params[:'deletePrevious'] = opts[:'delete_previous'] if !opts[:'delete_previous'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SourceImage') if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#delete_source_image_meta_dynamic_with_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_source_image_meta_user(organization, hash, opts = {}) ⇒ nil
Deletes all user meta data. User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
552 553 554 555 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 552 def (organization, hash, opts = {}) (organization, hash, opts) return nil end |
#delete_source_image_meta_user_with_http_info(organization, hash, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Deletes all user meta data. User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 563 def (organization, hash, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.delete_source_image_meta_user ..." end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.delete_source_image_meta_user" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.delete_source_image_meta_user, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'hash' is set if @api_client.config.client_side_validation && hash.nil? fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.delete_source_image_meta_user" end if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/) fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.delete_source_image_meta_user, must conform to the pattern /[0-9a-fA-F]{6,40}/." end # resource path local_var_path = "/sourceimages/{organization}/{hash}/meta/user".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#delete_source_image_meta_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_source_image_meta_user_with_name(organization, hash, meta_name, opts = {}) ⇒ nil
Deletes user meta data for a specified field. User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
617 618 619 620 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 617 def (organization, hash, , opts = {}) (organization, hash, , opts) return nil end |
#delete_source_image_meta_user_with_name_with_http_info(organization, hash, meta_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Deletes user meta data for a specified field. User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 629 def (organization, hash, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.delete_source_image_meta_user_with_name ..." end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.delete_source_image_meta_user_with_name" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.delete_source_image_meta_user_with_name, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'hash' is set if @api_client.config.client_side_validation && hash.nil? fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.delete_source_image_meta_user_with_name" end if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/) fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.delete_source_image_meta_user_with_name, must conform to the pattern /[0-9a-fA-F]{6,40}/." end # verify the required parameter 'meta_name' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.delete_source_image_meta_user_with_name" end if @api_client.config.client_side_validation && !~ Regexp.new(/[a-zA-Z0-9_-]+/) fail ArgumentError, "invalid value for 'meta_name' when calling SourceimagesApi.delete_source_image_meta_user_with_name, must conform to the pattern /[a-zA-Z0-9_-]+/." end # resource path local_var_path = "/sourceimages/{organization}/{hash}/meta/user/{metaName}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s).sub('{' + 'metaName' + '}', .to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#delete_source_image_meta_user_with_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_source_image_with_http_info(organization, hash, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a single source image.
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 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 421 def delete_source_image_with_http_info(organization, hash, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.delete_source_image ..." end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.delete_source_image" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.delete_source_image, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'hash' is set if @api_client.config.client_side_validation && hash.nil? fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.delete_source_image" end if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/) fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.delete_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/." end # resource path local_var_path = "/sourceimages/{organization}/{hash}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#delete_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#download_source_image(organization, hash, opts = {}) ⇒ File
Download original source image binary.
690 691 692 693 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 690 def download_source_image(organization, hash, opts = {}) data, _status_code, _headers = download_source_image_with_http_info(organization, hash, opts) return data end |
#download_source_image_with_http_info(organization, hash, opts = {}) ⇒ Array<(File, Fixnum, Hash)>
Download original source image binary.
701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 701 def download_source_image_with_http_info(organization, hash, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.download_source_image ..." end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.download_source_image" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.download_source_image, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'hash' is set if @api_client.config.client_side_validation && hash.nil? fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.download_source_image" end if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/) fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.download_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/." end # resource path local_var_path = "/sourceimages/{organization}/{hash}/download".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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: SourceimagesApi#download_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_source_image(organization, hash, opts = {}) ⇒ SourceImage
Get information about a source image.
755 756 757 758 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 755 def get_source_image(organization, hash, opts = {}) data, _status_code, _headers = get_source_image_with_http_info(organization, hash, opts) return data end |
#get_source_image_meta_user(organization, hash, opts = {}) ⇒ Object
Get all user meta data.
820 821 822 823 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 820 def (organization, hash, opts = {}) data, _status_code, _headers = (organization, hash, opts) return data end |
#get_source_image_meta_user_with_http_info(organization, hash, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Get all user meta data.
831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 831 def (organization, hash, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.get_source_image_meta_user ..." end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.get_source_image_meta_user" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.get_source_image_meta_user, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'hash' is set if @api_client.config.client_side_validation && hash.nil? fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.get_source_image_meta_user" end if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/) fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.get_source_image_meta_user, must conform to the pattern /[0-9a-fA-F]{6,40}/." end # resource path local_var_path = "/sourceimages/{organization}/{hash}/meta/user".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#get_source_image_meta_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_source_image_meta_user_with_name(organization, hash, meta_name, opts = {}) ⇒ String
Get user meta for a specific field.
886 887 888 889 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 886 def (organization, hash, , opts = {}) data, _status_code, _headers = (organization, hash, , opts) return data end |
#get_source_image_meta_user_with_name_with_http_info(organization, hash, meta_name, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get user meta for a specific field.
898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 898 def (organization, hash, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.get_source_image_meta_user_with_name ..." end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.get_source_image_meta_user_with_name" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.get_source_image_meta_user_with_name, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'hash' is set if @api_client.config.client_side_validation && hash.nil? fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.get_source_image_meta_user_with_name" end if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/) fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.get_source_image_meta_user_with_name, must conform to the pattern /[0-9a-fA-F]{6,40}/." end # verify the required parameter 'meta_name' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.get_source_image_meta_user_with_name" end if @api_client.config.client_side_validation && !~ Regexp.new(/[a-zA-Z0-9_-]+/) fail ArgumentError, "invalid value for 'meta_name' when calling SourceimagesApi.get_source_image_meta_user_with_name, must conform to the pattern /[a-zA-Z0-9_-]+/." end # resource path local_var_path = "/sourceimages/{organization}/{hash}/meta/user/{metaName}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s).sub('{' + 'metaName' + '}', .to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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: SourceimagesApi#get_source_image_meta_user_with_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_source_image_with_http_info(organization, hash, opts = {}) ⇒ Array<(SourceImage, Fixnum, Hash)>
Get information about a source image.
766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 766 def get_source_image_with_http_info(organization, hash, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.get_source_image ..." end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.get_source_image" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.get_source_image, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'hash' is set if @api_client.config.client_side_validation && hash.nil? fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.get_source_image" end if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/) fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.get_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/." end # resource path local_var_path = "/sourceimages/{organization}/{hash}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'SourceImage') if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#get_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_source_images(organization, opts = {}) ⇒ ListSourceImagesResponse
Get all images of an organization, with paging. You can also filter and sort by their metadata. See the API reference for more in depth documentation about this.
963 964 965 966 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 963 def list_source_images(organization, opts = {}) data, _status_code, _headers = list_source_images_with_http_info(organization, opts) return data end |
#list_source_images_by_binary_hash(organization, binary_hash, opts = {}) ⇒ ListSourceImagesResponse
Get all images in this organization that match a binaryhash. The binary hash is the sha1 of the image binary. This may yield several results if the same image has been uploaded with varying dynamic metadata.
1035 1036 1037 1038 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 1035 def list_source_images_by_binary_hash(organization, binary_hash, opts = {}) data, _status_code, _headers = list_source_images_by_binary_hash_with_http_info(organization, binary_hash, opts) return data end |
#list_source_images_by_binary_hash_with_http_info(organization, binary_hash, opts = {}) ⇒ Array<(ListSourceImagesResponse, Fixnum, Hash)>
Get all images in this organization that match a binaryhash. The binary hash is the sha1 of the image binary. This may yield several results if the same image has been uploaded with varying dynamic metadata.
1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 1046 def list_source_images_by_binary_hash_with_http_info(organization, binary_hash, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.list_source_images_by_binary_hash ..." end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.list_source_images_by_binary_hash" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.list_source_images_by_binary_hash, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'binary_hash' is set if @api_client.config.client_side_validation && binary_hash.nil? fail ArgumentError, "Missing the required parameter 'binary_hash' when calling SourceimagesApi.list_source_images_by_binary_hash" end # resource path local_var_path = "/sourceimages/{organization}/binaryhash/{binaryHash}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'binaryHash' + '}', binary_hash.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'ListSourceImagesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#list_source_images_by_binary_hash\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_source_images_with_http_info(organization, opts = {}) ⇒ Array<(ListSourceImagesResponse, Fixnum, Hash)>
Get all images of an organization, with paging. You can also filter and sort by their metadata. See the API reference for more in depth documentation about this.
977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 977 def list_source_images_with_http_info(organization, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.list_source_images ..." end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.list_source_images" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.list_source_images, must conform to the pattern /[0-9a-z\\-]+/." end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 2000 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SourceimagesApi.list_source_images, must be smaller than or equal to 2000.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SourceimagesApi.list_source_images, must be greater than or equal to 0.' end # resource path local_var_path = "/sourceimages/{organization}".sub('{' + 'organization' + '}', organization.to_s) # query parameters query_params = {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'deleted'] = opts[:'deleted'] if !opts[:'deleted'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'ListSourceImagesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#list_source_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_source_image_meta_user(user_meta_data, organization, hash, opts = {}) ⇒ nil
Update the specified meta data fields for an image. This only overwrites the fields specified in the request, but leaves existing meta data with different names unchanged. User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
1097 1098 1099 1100 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 1097 def (, organization, hash, opts = {}) (, organization, hash, opts) return nil end |
#patch_source_image_meta_user_with_http_info(user_meta_data, organization, hash, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update the specified meta data fields for an image. This only overwrites the fields specified in the request, but leaves existing meta data with different names unchanged. User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 1109 def (, organization, hash, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.patch_source_image_meta_user ..." end # verify the required parameter 'user_meta_data' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'user_meta_data' when calling SourceimagesApi.patch_source_image_meta_user" end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.patch_source_image_meta_user" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.patch_source_image_meta_user, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'hash' is set if @api_client.config.client_side_validation && hash.nil? fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.patch_source_image_meta_user" end if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/) fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.patch_source_image_meta_user, must conform to the pattern /[0-9a-fA-F]{6,40}/." end # resource path local_var_path = "/sourceimages/{organization}/{hash}/meta/user".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body() auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#patch_source_image_meta_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#restore_source_image(organization, hash, opts = {}) ⇒ SourceImage
Restore source image including previously set metadata. If the image has been deleted but not yet purged from the system, it is restored. If an image with this hash already exists and is not deleted, information about that image is returned.
1166 1167 1168 1169 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 1166 def restore_source_image(organization, hash, opts = {}) data, _status_code, _headers = restore_source_image_with_http_info(organization, hash, opts) return data end |
#restore_source_image_with_http_info(organization, hash, opts = {}) ⇒ Array<(SourceImage, Fixnum, Hash)>
Restore source image including previously set metadata. If the image has been deleted but not yet purged from the system, it is restored. If an image with this hash already exists and is not deleted, information about that image is returned.
1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 |
# File 'lib/rokka_client_codegen/api/sourceimages_api.rb', line 1177 def restore_source_image_with_http_info(organization, hash, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SourceimagesApi.restore_source_image ..." end # verify the required parameter 'organization' is set if @api_client.config.client_side_validation && organization.nil? fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.restore_source_image" end if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/) fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.restore_source_image, must conform to the pattern /[0-9a-z\\-]+/." end # verify the required parameter 'hash' is set if @api_client.config.client_side_validation && hash.nil? fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.restore_source_image" end if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/) fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.restore_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/." end # resource path local_var_path = "/sourceimages/{organization}/{hash}/restore".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'SourceImage') if @api_client.config.debugging @api_client.config.logger.debug "API called: SourceimagesApi#restore_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |