aspose_imaging_cloud 1.0.0 → 19.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +224 -61
- data/lib/aspose-imaging-cloud.rb +161 -0
- data/lib/aspose-imaging-cloud/api/imaging_api.rb +684 -0
- data/lib/aspose-imaging-cloud/api_client.rb +357 -0
- data/lib/aspose-imaging-cloud/api_error.rb +42 -0
- data/lib/{aspose_imaging_cloud → aspose-imaging-cloud}/configuration.rb +236 -166
- data/lib/aspose-imaging-cloud/models/big_rectangular_filter_properties.rb +206 -0
- data/lib/aspose-imaging-cloud/models/bilateral_smoothing_filter_properties.rb +281 -0
- data/lib/aspose-imaging-cloud/models/bmp_properties.rb +202 -0
- data/lib/aspose-imaging-cloud/models/convolution_filter_properties.rb +236 -0
- data/lib/aspose-imaging-cloud/models/deconvolution_filter_properties.rb +266 -0
- data/lib/aspose-imaging-cloud/models/dicom_properties.rb +584 -0
- data/lib/aspose-imaging-cloud/models/disc_usage.rb +222 -0
- data/lib/aspose-imaging-cloud/models/djvu_properties.rb +232 -0
- data/lib/aspose-imaging-cloud/models/dng_properties.rb +329 -0
- data/lib/aspose-imaging-cloud/models/error.rb +232 -0
- data/lib/aspose-imaging-cloud/models/error_details.rb +217 -0
- data/lib/aspose-imaging-cloud/models/exif_data.rb +1560 -0
- data/lib/aspose-imaging-cloud/models/file_version.rb +277 -0
- data/lib/aspose-imaging-cloud/models/file_versions.rb +204 -0
- data/lib/aspose-imaging-cloud/models/files_list.rb +204 -0
- data/lib/aspose-imaging-cloud/models/files_upload_result.rb +216 -0
- data/lib/aspose-imaging-cloud/models/filter_properties_base.rb +206 -0
- data/lib/aspose-imaging-cloud/models/gauss_wiener_filter_properties.rb +296 -0
- data/lib/aspose-imaging-cloud/models/gaussian_blur_filter_properties.rb +266 -0
- data/lib/aspose-imaging-cloud/models/gif_properties.rb +247 -0
- data/lib/aspose-imaging-cloud/models/image_duplicates.rb +204 -0
- data/lib/aspose-imaging-cloud/models/image_duplicates_set.rb +204 -0
- data/lib/aspose-imaging-cloud/models/image_features.rb +257 -0
- data/lib/aspose-imaging-cloud/models/imaging_response.rb +412 -0
- data/lib/aspose-imaging-cloud/models/jfif_data.rb +247 -0
- data/lib/aspose-imaging-cloud/models/jpeg2000_properties.rb +214 -0
- data/lib/aspose-imaging-cloud/models/jpeg_exif_data.rb +1738 -0
- data/lib/aspose-imaging-cloud/models/jpeg_properties.rb +222 -0
- data/lib/aspose-imaging-cloud/models/median_filter_properties.rb +221 -0
- data/lib/aspose-imaging-cloud/models/motion_wiener_filter_properties.rb +311 -0
- data/lib/aspose-imaging-cloud/models/object_exist.rb +222 -0
- data/lib/aspose-imaging-cloud/models/odg_metadata.rb +372 -0
- data/lib/aspose-imaging-cloud/models/odg_page.rb +222 -0
- data/lib/aspose-imaging-cloud/models/odg_properties.rb +229 -0
- data/lib/aspose-imaging-cloud/models/png_properties.rb +192 -0
- data/lib/aspose-imaging-cloud/models/psd_properties.rb +242 -0
- data/lib/aspose-imaging-cloud/models/requests/add_search_image_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/append_tiff_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/compare_images_request.rb +94 -0
- data/lib/aspose-imaging-cloud/models/requests/convert_tiff_to_fax_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/copy_file_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/copy_folder_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/create_cropped_image_request.rb +121 -0
- data/lib/aspose-imaging-cloud/models/requests/create_folder_request.rb +77 -0
- data/lib/aspose-imaging-cloud/models/requests/create_image_features_request.rb +89 -0
- data/lib/aspose-imaging-cloud/models/requests/create_image_frame_request.rb +112 -0
- data/lib/aspose-imaging-cloud/models/requests/create_image_search_request.rb +79 -0
- data/lib/aspose-imaging-cloud/models/requests/create_image_tag_request.rb +96 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_bmp_request.rb +108 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_emf_request.rb +127 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_gif_request.rb +102 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_jpeg2000_request.rb +95 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_jpeg_request.rb +90 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_psd_request.rb +90 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_svg_request.rb +114 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_tiff_request.rb +104 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_web_p_request.rb +116 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_wmf_request.rb +127 -0
- data/lib/aspose-imaging-cloud/models/requests/create_resized_image_request.rb +105 -0
- data/lib/aspose-imaging-cloud/models/requests/create_rotate_flipped_image_request.rb +97 -0
- data/lib/aspose-imaging-cloud/models/requests/create_saved_image_as_request.rb +89 -0
- data/lib/aspose-imaging-cloud/models/requests/create_updated_image_request.rb +145 -0
- data/lib/aspose-imaging-cloud/models/requests/create_web_site_image_features_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/crop_image_request.rb +120 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_file_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_folder_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_image_features_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_image_search_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_search_image_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/download_file_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/extract_image_features_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/extract_image_frame_properties_request.rb +82 -0
- data/lib/aspose-imaging-cloud/models/requests/extract_image_properties_request.rb +75 -0
- data/lib/aspose-imaging-cloud/models/requests/filter_effect_image_request.rb +103 -0
- data/lib/aspose-imaging-cloud/models/requests/find_image_duplicates_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/find_images_by_tags_request.rb +104 -0
- data/lib/aspose-imaging-cloud/models/requests/find_similar_images_request.rb +102 -0
- data/lib/aspose-imaging-cloud/models/requests/get_disc_usage_request.rb +70 -0
- data/lib/aspose-imaging-cloud/models/requests/get_file_versions_request.rb +77 -0
- data/lib/aspose-imaging-cloud/models/requests/get_files_list_request.rb +77 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_features_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_frame_properties_request.rb +87 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_frame_request.rb +111 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_properties_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_search_status_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/get_search_image_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/http_request.rb +50 -0
- data/lib/aspose-imaging-cloud/models/requests/imaging_request.rb +101 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_bmp_request.rb +107 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_emf_request.rb +126 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_gif_request.rb +101 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_jpeg2000_request.rb +94 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_jpeg_request.rb +89 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_psd_request.rb +89 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_svg_request.rb +113 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_tiff_request.rb +103 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_web_p_request.rb +115 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_wmf_request.rb +126 -0
- data/lib/aspose-imaging-cloud/models/requests/move_file_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/move_folder_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/object_exists_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/resize_image_request.rb +104 -0
- data/lib/aspose-imaging-cloud/models/requests/rotate_flip_image_request.rb +96 -0
- data/lib/aspose-imaging-cloud/models/requests/save_image_as_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/storage_exists_request.rb +74 -0
- data/lib/aspose-imaging-cloud/models/requests/update_image_features_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/update_image_request.rb +144 -0
- data/lib/aspose-imaging-cloud/models/requests/update_search_image_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/upload_file_request.rb +86 -0
- data/lib/aspose-imaging-cloud/models/search_context_status.rb +212 -0
- data/lib/aspose-imaging-cloud/models/search_result.rb +217 -0
- data/lib/aspose-imaging-cloud/models/search_results_set.rb +204 -0
- data/lib/aspose-imaging-cloud/models/sharpen_filter_properties.rb +266 -0
- data/lib/aspose-imaging-cloud/models/small_rectangular_filter_properties.rb +206 -0
- data/lib/aspose-imaging-cloud/models/storage_exist.rb +207 -0
- data/lib/aspose-imaging-cloud/models/storage_file.rb +252 -0
- data/lib/aspose-imaging-cloud/models/svg_properties.rb +202 -0
- data/lib/aspose-imaging-cloud/models/tiff_frame.rb +242 -0
- data/lib/aspose-imaging-cloud/models/tiff_options.rb +734 -0
- data/lib/aspose-imaging-cloud/models/tiff_properties.rb +224 -0
- data/lib/aspose-imaging-cloud/models/web_p_properties.rb +252 -0
- data/lib/aspose-imaging-cloud/version.rb +15 -0
- metadata +149 -129
- data/LICENSE +0 -22
- data/aspose_imaging_cloud.gemspec +0 -26
- data/lib/aspose_imaging_cloud.rb +0 -43
- data/lib/aspose_imaging_cloud/api/imaging_api.rb +0 -1776
- data/lib/aspose_imaging_cloud/api_client.rb +0 -335
- data/lib/aspose_imaging_cloud/api_error.rb +0 -24
- data/lib/aspose_imaging_cloud/models/base_object.rb +0 -86
- data/lib/aspose_imaging_cloud/models/base_response.rb +0 -53
- data/lib/aspose_imaging_cloud/models/bmp_properties.rb +0 -37
- data/lib/aspose_imaging_cloud/models/exif_data.rb +0 -855
- data/lib/aspose_imaging_cloud/models/gif_properties.rb +0 -53
- data/lib/aspose_imaging_cloud/models/imaging_response.rb +0 -149
- data/lib/aspose_imaging_cloud/models/jfif_data.rb +0 -61
- data/lib/aspose_imaging_cloud/models/jpeg_exif_data.rb +0 -991
- data/lib/aspose_imaging_cloud/models/jpeg_properties.rb +0 -53
- data/lib/aspose_imaging_cloud/models/psd_properties.rb +0 -61
- data/lib/aspose_imaging_cloud/models/tiff_frame.rb +0 -61
- data/lib/aspose_imaging_cloud/models/tiff_options.rb +0 -419
- data/lib/aspose_imaging_cloud/models/tiff_properties.rb +0 -55
- data/lib/aspose_imaging_cloud/version.rb +0 -3
- data/test/data/TestDemo.tif +0 -0
- data/test/data/aspose.jpg +0 -0
- data/test/data/aspose_imaging_for_cloud.png +0 -0
- data/test/data/demo.tif +0 -0
- data/test/data/sample-multi.tif +0 -0
- data/test/data/sample.bmp +0 -0
- data/test/data/sample.gif +0 -0
- data/test/data/sample.psd +0 -0
- data/test/data/sample.tif +0 -0
- data/test/data/test.bmp +0 -0
- data/test/imaging_tests.rb +0 -291
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# ----------------------------------------------------------------------------
|
|
2
|
+
# <copyright company="Aspose" file="modify_tiff_request.rb">
|
|
3
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
|
4
|
+
# </copyright>
|
|
5
|
+
# <summary>
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
|
14
|
+
# all copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
|
23
|
+
# </summary>
|
|
24
|
+
# ----------------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
require_relative './imaging_request'
|
|
28
|
+
require_relative './http_request'
|
|
29
|
+
|
|
30
|
+
module AsposeImagingCloud
|
|
31
|
+
# Request model for modify_tiff operation.
|
|
32
|
+
class ModifyTiffRequest < ImagingRequest
|
|
33
|
+
|
|
34
|
+
# Update parameters of existing TIFF image.
|
|
35
|
+
# @param [String] name Filename of image.
|
|
36
|
+
# @param [Integer] bit_depth Bit depth.
|
|
37
|
+
# @param [String] compression Compression (none is default). Please, refer to https://apireference.aspose.com/net/imaging/aspose.imaging.fileformats.tiff.enums/tiffcompressions for all possible values.
|
|
38
|
+
# @param [String] resolution_unit New resolution unit (none - the default one, inch or centimeter).
|
|
39
|
+
# @param [Float] horizontal_resolution New horizontal resolution.
|
|
40
|
+
# @param [Float] vertical_resolution New vertical resolution.
|
|
41
|
+
# @param [BOOLEAN] from_scratch Specifies where additional parameters we do not support should be taken from. If this is true – they will be taken from default values for standard image, if it is false – they will be saved from current image. Default is false.
|
|
42
|
+
# @param [String] folder Folder with image to process.
|
|
43
|
+
# @param [String] storage Your Aspose Cloud Storage name.
|
|
44
|
+
def initialize(name, bit_depth, compression = nil, resolution_unit = nil, horizontal_resolution = nil, vertical_resolution = nil, from_scratch = nil, folder = nil, storage = nil)
|
|
45
|
+
@name = name
|
|
46
|
+
@bit_depth = bit_depth
|
|
47
|
+
@compression = compression
|
|
48
|
+
@resolution_unit = resolution_unit
|
|
49
|
+
@horizontal_resolution = horizontal_resolution
|
|
50
|
+
@vertical_resolution = vertical_resolution
|
|
51
|
+
@from_scratch = from_scratch
|
|
52
|
+
@folder = folder
|
|
53
|
+
@storage = storage
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def to_http_info(config)
|
|
57
|
+
# verify the required parameter 'name' is set
|
|
58
|
+
if config.client_side_validation && @name.nil?
|
|
59
|
+
raise ArgumentError, "Missing the required parameter 'name' when calling ImagingApi.modify_tiff"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# verify the required parameter 'bit_depth' is set
|
|
63
|
+
if config.client_side_validation && @bit_depth.nil?
|
|
64
|
+
raise ArgumentError, "Missing the required parameter 'bit_depth' when calling ImagingApi.modify_tiff"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# resource path
|
|
68
|
+
local_var_path = '/imaging/{name}/tiff'.sub('{' + 'name' + '}', @name.to_s)
|
|
69
|
+
|
|
70
|
+
# query parameters
|
|
71
|
+
query_params = {}
|
|
72
|
+
query_params[:bitDepth] = @bit_depth
|
|
73
|
+
query_params[:compression] = @compression unless @compression.nil?
|
|
74
|
+
query_params[:resolutionUnit] = @resolution_unit unless @resolution_unit.nil?
|
|
75
|
+
query_params[:horizontalResolution] = @horizontal_resolution unless @horizontal_resolution.nil?
|
|
76
|
+
query_params[:verticalResolution] = @vertical_resolution unless @vertical_resolution.nil?
|
|
77
|
+
query_params[:fromScratch] = @from_scratch unless @from_scratch.nil?
|
|
78
|
+
query_params[:folder] = @folder unless @folder.nil?
|
|
79
|
+
query_params[:storage] = @storage unless @storage.nil?
|
|
80
|
+
|
|
81
|
+
# form parameters
|
|
82
|
+
form_params = {}
|
|
83
|
+
|
|
84
|
+
# http body (model)
|
|
85
|
+
post_body = nil
|
|
86
|
+
auth_names = ['JWT']
|
|
87
|
+
|
|
88
|
+
# header parameters
|
|
89
|
+
header_params = {}
|
|
90
|
+
# HTTP header 'Accept' (if needed)
|
|
91
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
|
92
|
+
# HTTP header 'Content-Type'
|
|
93
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
|
|
94
|
+
|
|
95
|
+
AsposeImagingCloud::HttpRequest.new(local_var_path,
|
|
96
|
+
header_params,
|
|
97
|
+
query_params,
|
|
98
|
+
form_params,
|
|
99
|
+
post_body,
|
|
100
|
+
auth_names)
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# ----------------------------------------------------------------------------
|
|
2
|
+
# <copyright company="Aspose" file="modify_web_p_request.rb">
|
|
3
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
|
4
|
+
# </copyright>
|
|
5
|
+
# <summary>
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
|
14
|
+
# all copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
|
23
|
+
# </summary>
|
|
24
|
+
# ----------------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
require_relative './imaging_request'
|
|
28
|
+
require_relative './http_request'
|
|
29
|
+
|
|
30
|
+
module AsposeImagingCloud
|
|
31
|
+
# Request model for modify_web_p operation.
|
|
32
|
+
class ModifyWebPRequest < ImagingRequest
|
|
33
|
+
|
|
34
|
+
# Update parameters of existing WEBP image.
|
|
35
|
+
# @param [String] name Filename of image.
|
|
36
|
+
# @param [BOOLEAN] loss_less If WEBP should be in lossless format.
|
|
37
|
+
# @param [Integer] quality Quality (0-100).
|
|
38
|
+
# @param [Integer] anim_loop_count The animation loop count.
|
|
39
|
+
# @param [String] anim_background_color Color of the animation background.
|
|
40
|
+
# @param [BOOLEAN] from_scratch Specifies where additional parameters we do not support should be taken from. If this is true – they will be taken from default values for standard image, if it is false – they will be saved from current image. Default is false.
|
|
41
|
+
# @param [String] folder Folder with image to process.
|
|
42
|
+
# @param [String] storage Your Aspose Cloud Storage name.
|
|
43
|
+
def initialize(name, loss_less, quality, anim_loop_count, anim_background_color, from_scratch = nil, folder = nil, storage = nil)
|
|
44
|
+
@name = name
|
|
45
|
+
@loss_less = loss_less
|
|
46
|
+
@quality = quality
|
|
47
|
+
@anim_loop_count = anim_loop_count
|
|
48
|
+
@anim_background_color = anim_background_color
|
|
49
|
+
@from_scratch = from_scratch
|
|
50
|
+
@folder = folder
|
|
51
|
+
@storage = storage
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def to_http_info(config)
|
|
55
|
+
# verify the required parameter 'name' is set
|
|
56
|
+
if config.client_side_validation && @name.nil?
|
|
57
|
+
raise ArgumentError, "Missing the required parameter 'name' when calling ImagingApi.modify_web_p"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# verify the required parameter 'loss_less' is set
|
|
61
|
+
if config.client_side_validation && @loss_less.nil?
|
|
62
|
+
raise ArgumentError, "Missing the required parameter 'loss_less' when calling ImagingApi.modify_web_p"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# verify the required parameter 'quality' is set
|
|
66
|
+
if config.client_side_validation && @quality.nil?
|
|
67
|
+
raise ArgumentError, "Missing the required parameter 'quality' when calling ImagingApi.modify_web_p"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# verify the required parameter 'anim_loop_count' is set
|
|
71
|
+
if config.client_side_validation && @anim_loop_count.nil?
|
|
72
|
+
raise ArgumentError, "Missing the required parameter 'anim_loop_count' when calling ImagingApi.modify_web_p"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# verify the required parameter 'anim_background_color' is set
|
|
76
|
+
if config.client_side_validation && @anim_background_color.nil?
|
|
77
|
+
raise ArgumentError, "Missing the required parameter 'anim_background_color' when calling ImagingApi.modify_web_p"
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# resource path
|
|
81
|
+
local_var_path = '/imaging/{name}/webp'.sub('{' + 'name' + '}', @name.to_s)
|
|
82
|
+
|
|
83
|
+
# query parameters
|
|
84
|
+
query_params = {}
|
|
85
|
+
query_params[:lossLess] = @loss_less
|
|
86
|
+
query_params[:quality] = @quality
|
|
87
|
+
query_params[:animLoopCount] = @anim_loop_count
|
|
88
|
+
query_params[:animBackgroundColor] = @anim_background_color
|
|
89
|
+
query_params[:fromScratch] = @from_scratch unless @from_scratch.nil?
|
|
90
|
+
query_params[:folder] = @folder unless @folder.nil?
|
|
91
|
+
query_params[:storage] = @storage unless @storage.nil?
|
|
92
|
+
|
|
93
|
+
# form parameters
|
|
94
|
+
form_params = {}
|
|
95
|
+
|
|
96
|
+
# http body (model)
|
|
97
|
+
post_body = nil
|
|
98
|
+
auth_names = ['JWT']
|
|
99
|
+
|
|
100
|
+
# header parameters
|
|
101
|
+
header_params = {}
|
|
102
|
+
# HTTP header 'Accept' (if needed)
|
|
103
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
|
104
|
+
# HTTP header 'Content-Type'
|
|
105
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
|
|
106
|
+
|
|
107
|
+
AsposeImagingCloud::HttpRequest.new(local_var_path,
|
|
108
|
+
header_params,
|
|
109
|
+
query_params,
|
|
110
|
+
form_params,
|
|
111
|
+
post_body,
|
|
112
|
+
auth_names)
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# ----------------------------------------------------------------------------
|
|
2
|
+
# <copyright company="Aspose" file="modify_wmf_request.rb">
|
|
3
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
|
4
|
+
# </copyright>
|
|
5
|
+
# <summary>
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
|
14
|
+
# all copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
|
23
|
+
# </summary>
|
|
24
|
+
# ----------------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
require_relative './imaging_request'
|
|
28
|
+
require_relative './http_request'
|
|
29
|
+
|
|
30
|
+
module AsposeImagingCloud
|
|
31
|
+
# Request model for modify_wmf operation.
|
|
32
|
+
class ModifyWmfRequest < ImagingRequest
|
|
33
|
+
|
|
34
|
+
# Process existing WMF image using given parameters.
|
|
35
|
+
# @param [String] name Filename of image.
|
|
36
|
+
# @param [String] bk_color Color of the background.
|
|
37
|
+
# @param [Integer] page_width Width of the page.
|
|
38
|
+
# @param [Integer] page_height Height of the page.
|
|
39
|
+
# @param [Integer] border_x Border width.
|
|
40
|
+
# @param [Integer] border_y Border height.
|
|
41
|
+
# @param [BOOLEAN] from_scratch Specifies where additional parameters we do not support should be taken from. If this is true – they will be taken from default values for standard image, if it is false – they will be saved from current image. Default is false.
|
|
42
|
+
# @param [String] folder Folder with image to process.
|
|
43
|
+
# @param [String] storage Your Aspose Cloud Storage name.
|
|
44
|
+
# @param [String] format Export format (PNG is the default one). Please, refer to the export table from https://docs.aspose.cloud/display/imagingcloud/Supported+File+Formats#SupportedFileFormats-CommonOperationsFormatSupportMap for possible use-cases.
|
|
45
|
+
def initialize(name, bk_color, page_width, page_height, border_x, border_y, from_scratch = nil, folder = nil, storage = nil, format = nil)
|
|
46
|
+
@name = name
|
|
47
|
+
@bk_color = bk_color
|
|
48
|
+
@page_width = page_width
|
|
49
|
+
@page_height = page_height
|
|
50
|
+
@border_x = border_x
|
|
51
|
+
@border_y = border_y
|
|
52
|
+
@from_scratch = from_scratch
|
|
53
|
+
@folder = folder
|
|
54
|
+
@storage = storage
|
|
55
|
+
@format = format
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def to_http_info(config)
|
|
59
|
+
# verify the required parameter 'name' is set
|
|
60
|
+
if config.client_side_validation && @name.nil?
|
|
61
|
+
raise ArgumentError, "Missing the required parameter 'name' when calling ImagingApi.modify_wmf"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# verify the required parameter 'bk_color' is set
|
|
65
|
+
if config.client_side_validation && @bk_color.nil?
|
|
66
|
+
raise ArgumentError, "Missing the required parameter 'bk_color' when calling ImagingApi.modify_wmf"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# verify the required parameter 'page_width' is set
|
|
70
|
+
if config.client_side_validation && @page_width.nil?
|
|
71
|
+
raise ArgumentError, "Missing the required parameter 'page_width' when calling ImagingApi.modify_wmf"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# verify the required parameter 'page_height' is set
|
|
75
|
+
if config.client_side_validation && @page_height.nil?
|
|
76
|
+
raise ArgumentError, "Missing the required parameter 'page_height' when calling ImagingApi.modify_wmf"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# verify the required parameter 'border_x' is set
|
|
80
|
+
if config.client_side_validation && @border_x.nil?
|
|
81
|
+
raise ArgumentError, "Missing the required parameter 'border_x' when calling ImagingApi.modify_wmf"
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# verify the required parameter 'border_y' is set
|
|
85
|
+
if config.client_side_validation && @border_y.nil?
|
|
86
|
+
raise ArgumentError, "Missing the required parameter 'border_y' when calling ImagingApi.modify_wmf"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# resource path
|
|
90
|
+
local_var_path = '/imaging/{name}/wmf'.sub('{' + 'name' + '}', @name.to_s)
|
|
91
|
+
|
|
92
|
+
# query parameters
|
|
93
|
+
query_params = {}
|
|
94
|
+
query_params[:bkColor] = @bk_color
|
|
95
|
+
query_params[:pageWidth] = @page_width
|
|
96
|
+
query_params[:pageHeight] = @page_height
|
|
97
|
+
query_params[:borderX] = @border_x
|
|
98
|
+
query_params[:borderY] = @border_y
|
|
99
|
+
query_params[:fromScratch] = @from_scratch unless @from_scratch.nil?
|
|
100
|
+
query_params[:folder] = @folder unless @folder.nil?
|
|
101
|
+
query_params[:storage] = @storage unless @storage.nil?
|
|
102
|
+
query_params[:format] = @format unless @format.nil?
|
|
103
|
+
|
|
104
|
+
# form parameters
|
|
105
|
+
form_params = {}
|
|
106
|
+
|
|
107
|
+
# http body (model)
|
|
108
|
+
post_body = nil
|
|
109
|
+
auth_names = ['JWT']
|
|
110
|
+
|
|
111
|
+
# header parameters
|
|
112
|
+
header_params = {}
|
|
113
|
+
# HTTP header 'Accept' (if needed)
|
|
114
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
|
115
|
+
# HTTP header 'Content-Type'
|
|
116
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
|
|
117
|
+
|
|
118
|
+
AsposeImagingCloud::HttpRequest.new(local_var_path,
|
|
119
|
+
header_params,
|
|
120
|
+
query_params,
|
|
121
|
+
form_params,
|
|
122
|
+
post_body,
|
|
123
|
+
auth_names)
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# ----------------------------------------------------------------------------
|
|
2
|
+
# <copyright company="Aspose" file="move_file_request.rb">
|
|
3
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
|
4
|
+
# </copyright>
|
|
5
|
+
# <summary>
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
|
14
|
+
# all copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
|
23
|
+
# </summary>
|
|
24
|
+
# ----------------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
require_relative './imaging_request'
|
|
28
|
+
require_relative './http_request'
|
|
29
|
+
|
|
30
|
+
module AsposeImagingCloud
|
|
31
|
+
# Request model for move_file operation.
|
|
32
|
+
class MoveFileRequest < ImagingRequest
|
|
33
|
+
|
|
34
|
+
# Move file
|
|
35
|
+
# @param [String] src_path Source file path e.g. '/src.ext'
|
|
36
|
+
# @param [String] dest_path Destination file path e.g. '/dest.ext'
|
|
37
|
+
# @param [String] src_storage_name Source storage name
|
|
38
|
+
# @param [String] dest_storage_name Destination storage name
|
|
39
|
+
# @param [String] version_id File version ID to move
|
|
40
|
+
def initialize(src_path, dest_path, src_storage_name = nil, dest_storage_name = nil, version_id = nil)
|
|
41
|
+
@src_path = src_path
|
|
42
|
+
@dest_path = dest_path
|
|
43
|
+
@src_storage_name = src_storage_name
|
|
44
|
+
@dest_storage_name = dest_storage_name
|
|
45
|
+
@version_id = version_id
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def to_http_info(config)
|
|
49
|
+
# verify the required parameter 'src_path' is set
|
|
50
|
+
if config.client_side_validation && @src_path.nil?
|
|
51
|
+
raise ArgumentError, "Missing the required parameter 'src_path' when calling ImagingApi.move_file"
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# verify the required parameter 'dest_path' is set
|
|
55
|
+
if config.client_side_validation && @dest_path.nil?
|
|
56
|
+
raise ArgumentError, "Missing the required parameter 'dest_path' when calling ImagingApi.move_file"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# resource path
|
|
60
|
+
local_var_path = '/imaging/storage/file/move/{srcPath}'.sub('{' + 'srcPath' + '}', @src_path.to_s)
|
|
61
|
+
|
|
62
|
+
# query parameters
|
|
63
|
+
query_params = {}
|
|
64
|
+
query_params[:destPath] = @dest_path
|
|
65
|
+
query_params[:srcStorageName] = @src_storage_name unless @src_storage_name.nil?
|
|
66
|
+
query_params[:destStorageName] = @dest_storage_name unless @dest_storage_name.nil?
|
|
67
|
+
query_params[:versionId] = @version_id unless @version_id.nil?
|
|
68
|
+
|
|
69
|
+
# form parameters
|
|
70
|
+
form_params = {}
|
|
71
|
+
|
|
72
|
+
# http body (model)
|
|
73
|
+
post_body = nil
|
|
74
|
+
auth_names = ['JWT']
|
|
75
|
+
|
|
76
|
+
# header parameters
|
|
77
|
+
header_params = {}
|
|
78
|
+
# HTTP header 'Accept' (if needed)
|
|
79
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
|
80
|
+
# HTTP header 'Content-Type'
|
|
81
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
|
|
82
|
+
|
|
83
|
+
AsposeImagingCloud::HttpRequest.new(local_var_path,
|
|
84
|
+
header_params,
|
|
85
|
+
query_params,
|
|
86
|
+
form_params,
|
|
87
|
+
post_body,
|
|
88
|
+
auth_names)
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# ----------------------------------------------------------------------------
|
|
2
|
+
# <copyright company="Aspose" file="move_folder_request.rb">
|
|
3
|
+
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
|
|
4
|
+
# </copyright>
|
|
5
|
+
# <summary>
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
|
14
|
+
# all copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
|
23
|
+
# </summary>
|
|
24
|
+
# ----------------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
require_relative './imaging_request'
|
|
28
|
+
require_relative './http_request'
|
|
29
|
+
|
|
30
|
+
module AsposeImagingCloud
|
|
31
|
+
# Request model for move_folder operation.
|
|
32
|
+
class MoveFolderRequest < ImagingRequest
|
|
33
|
+
|
|
34
|
+
# Move folder
|
|
35
|
+
# @param [String] src_path Folder path to move e.g. '/folder'
|
|
36
|
+
# @param [String] dest_path Destination folder path to move to e.g '/dst'
|
|
37
|
+
# @param [String] src_storage_name Source storage name
|
|
38
|
+
# @param [String] dest_storage_name Destination storage name
|
|
39
|
+
def initialize(src_path, dest_path, src_storage_name = nil, dest_storage_name = nil)
|
|
40
|
+
@src_path = src_path
|
|
41
|
+
@dest_path = dest_path
|
|
42
|
+
@src_storage_name = src_storage_name
|
|
43
|
+
@dest_storage_name = dest_storage_name
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def to_http_info(config)
|
|
47
|
+
# verify the required parameter 'src_path' is set
|
|
48
|
+
if config.client_side_validation && @src_path.nil?
|
|
49
|
+
raise ArgumentError, "Missing the required parameter 'src_path' when calling ImagingApi.move_folder"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# verify the required parameter 'dest_path' is set
|
|
53
|
+
if config.client_side_validation && @dest_path.nil?
|
|
54
|
+
raise ArgumentError, "Missing the required parameter 'dest_path' when calling ImagingApi.move_folder"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# resource path
|
|
58
|
+
local_var_path = '/imaging/storage/folder/move/{srcPath}'.sub('{' + 'srcPath' + '}', @src_path.to_s)
|
|
59
|
+
|
|
60
|
+
# query parameters
|
|
61
|
+
query_params = {}
|
|
62
|
+
query_params[:destPath] = @dest_path
|
|
63
|
+
query_params[:srcStorageName] = @src_storage_name unless @src_storage_name.nil?
|
|
64
|
+
query_params[:destStorageName] = @dest_storage_name unless @dest_storage_name.nil?
|
|
65
|
+
|
|
66
|
+
# form parameters
|
|
67
|
+
form_params = {}
|
|
68
|
+
|
|
69
|
+
# http body (model)
|
|
70
|
+
post_body = nil
|
|
71
|
+
auth_names = ['JWT']
|
|
72
|
+
|
|
73
|
+
# header parameters
|
|
74
|
+
header_params = {}
|
|
75
|
+
# HTTP header 'Accept' (if needed)
|
|
76
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
|
77
|
+
# HTTP header 'Content-Type'
|
|
78
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
|
|
79
|
+
|
|
80
|
+
AsposeImagingCloud::HttpRequest.new(local_var_path,
|
|
81
|
+
header_params,
|
|
82
|
+
query_params,
|
|
83
|
+
form_params,
|
|
84
|
+
post_body,
|
|
85
|
+
auth_names)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|