cloudmersive-image-recognition-api-client 1.4.5 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +12 -6
  4. data/cloudmersive-image-recognition-api-client.gemspec +3 -3
  5. data/docs/ArtisticApi.md +2 -2
  6. data/docs/ConvertApi.md +7 -7
  7. data/docs/CreateHandwritingRequest.md +11 -0
  8. data/docs/DrawTextInstance.md +1 -1
  9. data/docs/EditApi.md +255 -9
  10. data/docs/FaceApi.md +8 -8
  11. data/docs/FilterApi.md +8 -8
  12. data/docs/InfoApi.md +2 -2
  13. data/docs/NsfwApi.md +1 -1
  14. data/docs/RecognizeApi.md +11 -11
  15. data/docs/ResizeApi.md +4 -4
  16. data/docs/TextGenerationApi.md +63 -0
  17. data/lib/cloudmersive-image-recognition-api-client.rb +3 -1
  18. data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +6 -7
  19. data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +30 -37
  20. data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +300 -47
  21. data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +31 -38
  22. data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +34 -42
  23. data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +10 -12
  24. data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +6 -7
  25. data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +37 -45
  26. data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +14 -16
  27. data/lib/cloudmersive-image-recognition-api-client/api/text_generation_api.rb +77 -0
  28. data/lib/cloudmersive-image-recognition-api-client/api_client.rb +11 -9
  29. data/lib/cloudmersive-image-recognition-api-client/api_error.rb +1 -1
  30. data/lib/cloudmersive-image-recognition-api-client/configuration.rb +2 -2
  31. data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +7 -10
  32. data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +7 -10
  33. data/lib/cloudmersive-image-recognition-api-client/models/create_handwriting_request.rb +216 -0
  34. data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +7 -10
  35. data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +7 -10
  36. data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +7 -10
  37. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +7 -10
  38. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +9 -13
  39. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +7 -10
  40. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +9 -13
  41. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +8 -11
  42. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +9 -13
  43. data/lib/cloudmersive-image-recognition-api-client/models/face.rb +7 -10
  44. data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +7 -10
  45. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +7 -10
  46. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +7 -10
  47. data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +7 -10
  48. data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +7 -10
  49. data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +7 -10
  50. data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +7 -10
  51. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +7 -10
  52. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +7 -10
  53. data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +7 -10
  54. data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +7 -10
  55. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +7 -10
  56. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata_exif_value.rb +7 -10
  57. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +7 -10
  58. data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +7 -10
  59. data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +7 -10
  60. data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +7 -10
  61. data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +7 -10
  62. data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +7 -10
  63. data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +7 -10
  64. data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +7 -10
  65. data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +7 -10
  66. data/lib/cloudmersive-image-recognition-api-client/version.rb +2 -2
  67. data/spec/api/artistic_api_spec.rb +2 -2
  68. data/spec/api/convert_api_spec.rb +8 -8
  69. data/spec/api/edit_api_spec.rb +69 -11
  70. data/spec/api/face_api_spec.rb +8 -8
  71. data/spec/api/filter_api_spec.rb +9 -9
  72. data/spec/api/info_api_spec.rb +3 -3
  73. data/spec/api/nsfw_api_spec.rb +2 -2
  74. data/spec/api/recognize_api_spec.rb +10 -10
  75. data/spec/api/resize_api_spec.rb +5 -5
  76. data/spec/api/text_generation_api_spec.rb +47 -0
  77. data/spec/api_client_spec.rb +52 -35
  78. data/spec/configuration_spec.rb +9 -9
  79. data/spec/models/age_detection_result_spec.rb +4 -5
  80. data/spec/models/color_result_spec.rb +4 -5
  81. data/spec/models/create_handwriting_request_spec.rb +59 -0
  82. data/spec/models/detected_license_plate_spec.rb +8 -9
  83. data/spec/models/detected_object_spec.rb +7 -8
  84. data/spec/models/dominant_color_result_spec.rb +3 -4
  85. data/spec/models/draw_polygon_instance_spec.rb +5 -6
  86. data/spec/models/draw_polygon_request_spec.rb +4 -5
  87. data/spec/models/draw_rectangle_instance_spec.rb +8 -9
  88. data/spec/models/draw_rectangle_request_spec.rb +4 -5
  89. data/spec/models/draw_text_instance_spec.rb +9 -10
  90. data/spec/models/draw_text_request_spec.rb +4 -5
  91. data/spec/models/face_compare_response_spec.rb +5 -6
  92. data/spec/models/face_locate_response_spec.rb +5 -6
  93. data/spec/models/face_locate_with_landmarks_response_spec.rb +5 -6
  94. data/spec/models/face_match_spec.rb +7 -8
  95. data/spec/models/face_point_spec.rb +3 -4
  96. data/spec/models/face_spec.rb +5 -6
  97. data/spec/models/face_with_landmarks_spec.rb +14 -15
  98. data/spec/models/find_symbol_result_spec.rb +7 -8
  99. data/spec/models/fine_text_detection_result_spec.rb +4 -5
  100. data/spec/models/fine_text_item_spec.rb +12 -13
  101. data/spec/models/gender_detection_result_spec.rb +4 -5
  102. data/spec/models/image_description_response_spec.rb +5 -6
  103. data/spec/models/image_metadata_exif_value_spec.rb +4 -5
  104. data/spec/models/image_metadata_spec.rb +11 -12
  105. data/spec/models/nsfw_result_spec.rb +4 -5
  106. data/spec/models/object_detection_result_spec.rb +4 -5
  107. data/spec/models/person_with_age_spec.rb +5 -6
  108. data/spec/models/person_with_gender_spec.rb +4 -5
  109. data/spec/models/polygon_point_spec.rb +3 -4
  110. data/spec/models/recognition_outcome_spec.rb +3 -4
  111. data/spec/models/text_detection_result_spec.rb +4 -5
  112. data/spec/models/text_item_spec.rb +5 -6
  113. data/spec/models/vehicle_license_plate_detection_result_spec.rb +4 -5
  114. data/spec/spec_helper.rb +1 -1
  115. metadata +8 -2
@@ -6,11 +6,11 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
13
- require "uri"
13
+ require 'uri'
14
14
 
15
15
  module CloudmersiveImageRecognitionApiClient
16
16
  class EditApi
@@ -19,7 +19,6 @@ module CloudmersiveImageRecognitionApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
-
23
22
  # Normalizes image rotation and removes EXIF rotation data
24
23
  # Automatically orients the input image based on EXIF information and then removes the EXIF information. EXIF is an additional set of information stored in some images taken with cell phone cameras based on the orientation of the camera. By normalizing rotation and removing EXIF data these images become much easier to process.
25
24
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
@@ -27,7 +26,7 @@ module CloudmersiveImageRecognitionApiClient
27
26
  # @return [String]
28
27
  def edit_auto_orient(image_file, opts = {})
29
28
  data, _status_code, _headers = edit_auto_orient_with_http_info(image_file, opts)
30
- return data
29
+ data
31
30
  end
32
31
 
33
32
  # Normalizes image rotation and removes EXIF rotation data
@@ -37,14 +36,14 @@ module CloudmersiveImageRecognitionApiClient
37
36
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
38
37
  def edit_auto_orient_with_http_info(image_file, opts = {})
39
38
  if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: EditApi.edit_auto_orient ..."
39
+ @api_client.config.logger.debug 'Calling API: EditApi.edit_auto_orient ...'
41
40
  end
42
41
  # verify the required parameter 'image_file' is set
43
42
  if @api_client.config.client_side_validation && image_file.nil?
44
43
  fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_auto_orient"
45
44
  end
46
45
  # resource path
47
- local_var_path = "/image/edit/auto-orient/remove-exif"
46
+ local_var_path = '/image/edit/auto-orient/remove-exif'
48
47
 
49
48
  # query parameters
50
49
  query_params = {}
@@ -58,7 +57,7 @@ module CloudmersiveImageRecognitionApiClient
58
57
 
59
58
  # form parameters
60
59
  form_params = {}
61
- form_params["imageFile"] = image_file
60
+ form_params['imageFile'] = image_file
62
61
 
63
62
  # http body (model)
64
63
  post_body = nil
@@ -75,7 +74,6 @@ module CloudmersiveImageRecognitionApiClient
75
74
  end
76
75
  return data, status_code, headers
77
76
  end
78
-
79
77
  # Composite two images together
80
78
  # Composites two input images together; a layered image onto a base image. The first image you input is the base image. The second image (the layered image) will be composited on top of this base image. Supports PNG transparency. To control padding you can include transparent pixels at the border(s) of your layered images as appropriate.
81
79
  # @param location Location to composite the layered images; possible values are: \&quot;center\&quot;, \&quot;top-left\&quot;, \&quot;top-center\&quot;, \&quot;top-right\&quot;, \&quot;center-left\&quot;, \&quot;center-right\&quot;, \&quot;bottom-left\&quot;, \&quot;bottom-center\&quot;, \&quot;bottom-right\&quot;
@@ -85,7 +83,7 @@ module CloudmersiveImageRecognitionApiClient
85
83
  # @return [String]
86
84
  def edit_composite_basic(location, base_image, layered_image, opts = {})
87
85
  data, _status_code, _headers = edit_composite_basic_with_http_info(location, base_image, layered_image, opts)
88
- return data
86
+ data
89
87
  end
90
88
 
91
89
  # Composite two images together
@@ -97,7 +95,7 @@ module CloudmersiveImageRecognitionApiClient
97
95
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
98
96
  def edit_composite_basic_with_http_info(location, base_image, layered_image, opts = {})
99
97
  if @api_client.config.debugging
100
- @api_client.config.logger.debug "Calling API: EditApi.edit_composite_basic ..."
98
+ @api_client.config.logger.debug 'Calling API: EditApi.edit_composite_basic ...'
101
99
  end
102
100
  # verify the required parameter 'location' is set
103
101
  if @api_client.config.client_side_validation && location.nil?
@@ -112,7 +110,7 @@ module CloudmersiveImageRecognitionApiClient
112
110
  fail ArgumentError, "Missing the required parameter 'layered_image' when calling EditApi.edit_composite_basic"
113
111
  end
114
112
  # resource path
115
- local_var_path = "/image/edit/composite/{location}".sub('{' + 'location' + '}', location.to_s)
113
+ local_var_path = '/image/edit/composite/{location}'.sub('{' + 'location' + '}', location.to_s)
116
114
 
117
115
  # query parameters
118
116
  query_params = {}
@@ -126,8 +124,8 @@ module CloudmersiveImageRecognitionApiClient
126
124
 
127
125
  # form parameters
128
126
  form_params = {}
129
- form_params["baseImage"] = base_image
130
- form_params["layeredImage"] = layered_image
127
+ form_params['baseImage'] = base_image
128
+ form_params['layeredImage'] = layered_image
131
129
 
132
130
  # http body (model)
133
131
  post_body = nil
@@ -144,7 +142,86 @@ module CloudmersiveImageRecognitionApiClient
144
142
  end
145
143
  return data, status_code, headers
146
144
  end
145
+ # Composite two images together precisely
146
+ # Composites two input images together; a layered image onto a base image. Position is based on distance in pixels from each side. The first image you input is the base image. The second image (the layered image) will be composited on top of this base image. Supports PNG transparency. To control padding you can include transparent pixels at the border(s) of your layered images as appropriate. Providing multiple parameters in a single axis (for example top and bottom) is not recommended, since only one of the parameters will be used per axis.
147
+ # @param base_image Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
148
+ # @param layered_image Image to layer on top of the base image.
149
+ # @param [Hash] opts the optional parameters
150
+ # @option opts [Integer] :top Optional; Desired distance in pixels from the top of the base image to the top of the layered image.
151
+ # @option opts [Integer] :bottom Optional; Desired distance in pixels from the bottom of the base image to the bottom of the layered image.
152
+ # @option opts [Integer] :left Optional; Desired distance in pixels from the left side of the base image to the left side of the layered image.
153
+ # @option opts [Integer] :right Optional; Desired distance in pixels from the right side of the base image to the right side of the layered image.
154
+ # @option opts [Integer] :width Optional; Desired width of the layered image in pixels. Leave height empty or 0 to automatically scale the image proportionally.
155
+ # @option opts [Integer] :height Optional; Desired height of the layered image in pixels. Leave width empty or 0 to automatically scale the image proportionally.
156
+ # @return [String]
157
+ def edit_composite_precise(base_image, layered_image, opts = {})
158
+ data, _status_code, _headers = edit_composite_precise_with_http_info(base_image, layered_image, opts)
159
+ data
160
+ end
161
+
162
+ # Composite two images together precisely
163
+ # Composites two input images together; a layered image onto a base image. Position is based on distance in pixels from each side. The first image you input is the base image. The second image (the layered image) will be composited on top of this base image. Supports PNG transparency. To control padding you can include transparent pixels at the border(s) of your layered images as appropriate. Providing multiple parameters in a single axis (for example top and bottom) is not recommended, since only one of the parameters will be used per axis.
164
+ # @param base_image Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
165
+ # @param layered_image Image to layer on top of the base image.
166
+ # @param [Hash] opts the optional parameters
167
+ # @option opts [Integer] :top Optional; Desired distance in pixels from the top of the base image to the top of the layered image.
168
+ # @option opts [Integer] :bottom Optional; Desired distance in pixels from the bottom of the base image to the bottom of the layered image.
169
+ # @option opts [Integer] :left Optional; Desired distance in pixels from the left side of the base image to the left side of the layered image.
170
+ # @option opts [Integer] :right Optional; Desired distance in pixels from the right side of the base image to the right side of the layered image.
171
+ # @option opts [Integer] :width Optional; Desired width of the layered image in pixels. Leave height empty or 0 to automatically scale the image proportionally.
172
+ # @option opts [Integer] :height Optional; Desired height of the layered image in pixels. Leave width empty or 0 to automatically scale the image proportionally.
173
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
174
+ def edit_composite_precise_with_http_info(base_image, layered_image, opts = {})
175
+ if @api_client.config.debugging
176
+ @api_client.config.logger.debug 'Calling API: EditApi.edit_composite_precise ...'
177
+ end
178
+ # verify the required parameter 'base_image' is set
179
+ if @api_client.config.client_side_validation && base_image.nil?
180
+ fail ArgumentError, "Missing the required parameter 'base_image' when calling EditApi.edit_composite_precise"
181
+ end
182
+ # verify the required parameter 'layered_image' is set
183
+ if @api_client.config.client_side_validation && layered_image.nil?
184
+ fail ArgumentError, "Missing the required parameter 'layered_image' when calling EditApi.edit_composite_precise"
185
+ end
186
+ # resource path
187
+ local_var_path = '/image/edit/composite/precise'
188
+
189
+ # query parameters
190
+ query_params = {}
191
+
192
+ # header parameters
193
+ header_params = {}
194
+ # HTTP header 'Accept' (if needed)
195
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
196
+ # HTTP header 'Content-Type'
197
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
198
+ header_params[:'top'] = opts[:'top'] if !opts[:'top'].nil?
199
+ header_params[:'bottom'] = opts[:'bottom'] if !opts[:'bottom'].nil?
200
+ header_params[:'left'] = opts[:'left'] if !opts[:'left'].nil?
201
+ header_params[:'right'] = opts[:'right'] if !opts[:'right'].nil?
202
+ header_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
203
+ header_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
204
+
205
+ # form parameters
206
+ form_params = {}
207
+ form_params['baseImage'] = base_image
208
+ form_params['layeredImage'] = layered_image
147
209
 
210
+ # http body (model)
211
+ post_body = nil
212
+ auth_names = ['Apikey']
213
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
214
+ :header_params => header_params,
215
+ :query_params => query_params,
216
+ :form_params => form_params,
217
+ :body => post_body,
218
+ :auth_names => auth_names,
219
+ :return_type => 'String')
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug "API called: EditApi#edit_composite_precise\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
222
+ end
223
+ return data, status_code, headers
224
+ end
148
225
  # Adaptively adjust the contrast of the image to be more appealing and easy to see
149
226
  # Uses Gamma to adjust the contrast adaptively the way the human eye sees the world. Results significantly improve the viewability and visual appeal of the image.
150
227
  # @param gamma Gamma value to adjust the contrast in the image. Recommended value is 2.0. Values between 0.0 and 1.0 will reduce contrast, while values above 1.0 will increase contrast.
@@ -153,7 +230,7 @@ module CloudmersiveImageRecognitionApiClient
153
230
  # @return [String]
154
231
  def edit_contrast_adaptive(gamma, image_file, opts = {})
155
232
  data, _status_code, _headers = edit_contrast_adaptive_with_http_info(gamma, image_file, opts)
156
- return data
233
+ data
157
234
  end
158
235
 
159
236
  # Adaptively adjust the contrast of the image to be more appealing and easy to see
@@ -164,7 +241,7 @@ module CloudmersiveImageRecognitionApiClient
164
241
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
165
242
  def edit_contrast_adaptive_with_http_info(gamma, image_file, opts = {})
166
243
  if @api_client.config.debugging
167
- @api_client.config.logger.debug "Calling API: EditApi.edit_contrast_adaptive ..."
244
+ @api_client.config.logger.debug 'Calling API: EditApi.edit_contrast_adaptive ...'
168
245
  end
169
246
  # verify the required parameter 'gamma' is set
170
247
  if @api_client.config.client_side_validation && gamma.nil?
@@ -175,7 +252,7 @@ module CloudmersiveImageRecognitionApiClient
175
252
  fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_contrast_adaptive"
176
253
  end
177
254
  # resource path
178
- local_var_path = "/image/edit/contrast/{gamma}/adaptive".sub('{' + 'gamma' + '}', gamma.to_s)
255
+ local_var_path = '/image/edit/contrast/{gamma}/adaptive'.sub('{' + 'gamma' + '}', gamma.to_s)
179
256
 
180
257
  # query parameters
181
258
  query_params = {}
@@ -189,7 +266,7 @@ module CloudmersiveImageRecognitionApiClient
189
266
 
190
267
  # form parameters
191
268
  form_params = {}
192
- form_params["imageFile"] = image_file
269
+ form_params['imageFile'] = image_file
193
270
 
194
271
  # http body (model)
195
272
  post_body = nil
@@ -206,7 +283,79 @@ module CloudmersiveImageRecognitionApiClient
206
283
  end
207
284
  return data, status_code, headers
208
285
  end
286
+ # Crop an image to an circular area
287
+ # Crop an image to a target circular area
288
+ # @param left The left edge of the circular crop area in pixels (X).
289
+ # @param top The top edge of the circular crop area in pixels (Y).
290
+ # @param radius The radius of the circular crop area in pixels.
291
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
292
+ # @param [Hash] opts the optional parameters
293
+ # @return [String]
294
+ def edit_crop_circle(left, top, radius, image_file, opts = {})
295
+ data, _status_code, _headers = edit_crop_circle_with_http_info(left, top, radius, image_file, opts)
296
+ data
297
+ end
298
+
299
+ # Crop an image to an circular area
300
+ # Crop an image to a target circular area
301
+ # @param left The left edge of the circular crop area in pixels (X).
302
+ # @param top The top edge of the circular crop area in pixels (Y).
303
+ # @param radius The radius of the circular crop area in pixels.
304
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
305
+ # @param [Hash] opts the optional parameters
306
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
307
+ def edit_crop_circle_with_http_info(left, top, radius, image_file, opts = {})
308
+ if @api_client.config.debugging
309
+ @api_client.config.logger.debug 'Calling API: EditApi.edit_crop_circle ...'
310
+ end
311
+ # verify the required parameter 'left' is set
312
+ if @api_client.config.client_side_validation && left.nil?
313
+ fail ArgumentError, "Missing the required parameter 'left' when calling EditApi.edit_crop_circle"
314
+ end
315
+ # verify the required parameter 'top' is set
316
+ if @api_client.config.client_side_validation && top.nil?
317
+ fail ArgumentError, "Missing the required parameter 'top' when calling EditApi.edit_crop_circle"
318
+ end
319
+ # verify the required parameter 'radius' is set
320
+ if @api_client.config.client_side_validation && radius.nil?
321
+ fail ArgumentError, "Missing the required parameter 'radius' when calling EditApi.edit_crop_circle"
322
+ end
323
+ # verify the required parameter 'image_file' is set
324
+ if @api_client.config.client_side_validation && image_file.nil?
325
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_crop_circle"
326
+ end
327
+ # resource path
328
+ local_var_path = '/image/edit/crop/circle/{left}/{top}/{radius}'.sub('{' + 'left' + '}', left.to_s).sub('{' + 'top' + '}', top.to_s).sub('{' + 'radius' + '}', radius.to_s)
209
329
 
330
+ # query parameters
331
+ query_params = {}
332
+
333
+ # header parameters
334
+ header_params = {}
335
+ # HTTP header 'Accept' (if needed)
336
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
337
+ # HTTP header 'Content-Type'
338
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
339
+
340
+ # form parameters
341
+ form_params = {}
342
+ form_params['imageFile'] = image_file
343
+
344
+ # http body (model)
345
+ post_body = nil
346
+ auth_names = ['Apikey']
347
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
348
+ :header_params => header_params,
349
+ :query_params => query_params,
350
+ :form_params => form_params,
351
+ :body => post_body,
352
+ :auth_names => auth_names,
353
+ :return_type => 'String')
354
+ if @api_client.config.debugging
355
+ @api_client.config.logger.debug "API called: EditApi#edit_crop_circle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
356
+ end
357
+ return data, status_code, headers
358
+ end
210
359
  # Crop an image to a rectangular area
211
360
  # Crop an image to a target rectangular area
212
361
  # @param left The left edge of the rectangular crop area in pixels (X).
@@ -218,7 +367,7 @@ module CloudmersiveImageRecognitionApiClient
218
367
  # @return [String]
219
368
  def edit_crop_rectangle(left, top, width, height, image_file, opts = {})
220
369
  data, _status_code, _headers = edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts)
221
- return data
370
+ data
222
371
  end
223
372
 
224
373
  # Crop an image to a rectangular area
@@ -232,7 +381,7 @@ module CloudmersiveImageRecognitionApiClient
232
381
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
233
382
  def edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts = {})
234
383
  if @api_client.config.debugging
235
- @api_client.config.logger.debug "Calling API: EditApi.edit_crop_rectangle ..."
384
+ @api_client.config.logger.debug 'Calling API: EditApi.edit_crop_rectangle ...'
236
385
  end
237
386
  # verify the required parameter 'left' is set
238
387
  if @api_client.config.client_side_validation && left.nil?
@@ -255,7 +404,7 @@ module CloudmersiveImageRecognitionApiClient
255
404
  fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_crop_rectangle"
256
405
  end
257
406
  # resource path
258
- local_var_path = "/image/edit/crop/rectangle/{left}/{top}/{width}/{height}".sub('{' + 'left' + '}', left.to_s).sub('{' + 'top' + '}', top.to_s).sub('{' + 'width' + '}', width.to_s).sub('{' + 'height' + '}', height.to_s)
407
+ local_var_path = '/image/edit/crop/rectangle/{left}/{top}/{width}/{height}'.sub('{' + 'left' + '}', left.to_s).sub('{' + 'top' + '}', top.to_s).sub('{' + 'width' + '}', width.to_s).sub('{' + 'height' + '}', height.to_s)
259
408
 
260
409
  # query parameters
261
410
  query_params = {}
@@ -269,7 +418,7 @@ module CloudmersiveImageRecognitionApiClient
269
418
 
270
419
  # form parameters
271
420
  form_params = {}
272
- form_params["imageFile"] = image_file
421
+ form_params['imageFile'] = image_file
273
422
 
274
423
  # http body (model)
275
424
  post_body = nil
@@ -286,7 +435,6 @@ module CloudmersiveImageRecognitionApiClient
286
435
  end
287
436
  return data, status_code, headers
288
437
  end
289
-
290
438
  # Draw a polygon onto an image
291
439
  # Draw one or more polygons, with customized visuals, onto an image
292
440
  # @param request Polygon drawing request parameters
@@ -294,7 +442,7 @@ module CloudmersiveImageRecognitionApiClient
294
442
  # @return [String]
295
443
  def edit_draw_polygon(request, opts = {})
296
444
  data, _status_code, _headers = edit_draw_polygon_with_http_info(request, opts)
297
- return data
445
+ data
298
446
  end
299
447
 
300
448
  # Draw a polygon onto an image
@@ -304,14 +452,14 @@ module CloudmersiveImageRecognitionApiClient
304
452
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
305
453
  def edit_draw_polygon_with_http_info(request, opts = {})
306
454
  if @api_client.config.debugging
307
- @api_client.config.logger.debug "Calling API: EditApi.edit_draw_polygon ..."
455
+ @api_client.config.logger.debug 'Calling API: EditApi.edit_draw_polygon ...'
308
456
  end
309
457
  # verify the required parameter 'request' is set
310
458
  if @api_client.config.client_side_validation && request.nil?
311
459
  fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_polygon"
312
460
  end
313
461
  # resource path
314
- local_var_path = "/image/edit/draw/polygon"
462
+ local_var_path = '/image/edit/draw/polygon'
315
463
 
316
464
  # query parameters
317
465
  query_params = {}
@@ -341,7 +489,6 @@ module CloudmersiveImageRecognitionApiClient
341
489
  end
342
490
  return data, status_code, headers
343
491
  end
344
-
345
492
  # Draw a rectangle onto an image
346
493
  # Draw one or more rectangles, with customized visuals, onto an image
347
494
  # @param request Draw rectangle parameters
@@ -349,7 +496,7 @@ module CloudmersiveImageRecognitionApiClient
349
496
  # @return [String]
350
497
  def edit_draw_rectangle(request, opts = {})
351
498
  data, _status_code, _headers = edit_draw_rectangle_with_http_info(request, opts)
352
- return data
499
+ data
353
500
  end
354
501
 
355
502
  # Draw a rectangle onto an image
@@ -359,14 +506,14 @@ module CloudmersiveImageRecognitionApiClient
359
506
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
360
507
  def edit_draw_rectangle_with_http_info(request, opts = {})
361
508
  if @api_client.config.debugging
362
- @api_client.config.logger.debug "Calling API: EditApi.edit_draw_rectangle ..."
509
+ @api_client.config.logger.debug 'Calling API: EditApi.edit_draw_rectangle ...'
363
510
  end
364
511
  # verify the required parameter 'request' is set
365
512
  if @api_client.config.client_side_validation && request.nil?
366
513
  fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_rectangle"
367
514
  end
368
515
  # resource path
369
- local_var_path = "/image/edit/draw/rectangle"
516
+ local_var_path = '/image/edit/draw/rectangle'
370
517
 
371
518
  # query parameters
372
519
  query_params = {}
@@ -396,7 +543,6 @@ module CloudmersiveImageRecognitionApiClient
396
543
  end
397
544
  return data, status_code, headers
398
545
  end
399
-
400
546
  # Draw text onto an image
401
547
  # Draw one or more pieces of text, with customized visuals, onto an image
402
548
  # @param request Draw text parameters
@@ -404,7 +550,7 @@ module CloudmersiveImageRecognitionApiClient
404
550
  # @return [String]
405
551
  def edit_draw_text(request, opts = {})
406
552
  data, _status_code, _headers = edit_draw_text_with_http_info(request, opts)
407
- return data
553
+ data
408
554
  end
409
555
 
410
556
  # Draw text onto an image
@@ -414,14 +560,14 @@ module CloudmersiveImageRecognitionApiClient
414
560
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
415
561
  def edit_draw_text_with_http_info(request, opts = {})
416
562
  if @api_client.config.debugging
417
- @api_client.config.logger.debug "Calling API: EditApi.edit_draw_text ..."
563
+ @api_client.config.logger.debug 'Calling API: EditApi.edit_draw_text ...'
418
564
  end
419
565
  # verify the required parameter 'request' is set
420
566
  if @api_client.config.client_side_validation && request.nil?
421
567
  fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_text"
422
568
  end
423
569
  # resource path
424
- local_var_path = "/image/edit/draw/text"
570
+ local_var_path = '/image/edit/draw/text'
425
571
 
426
572
  # query parameters
427
573
  query_params = {}
@@ -451,7 +597,6 @@ module CloudmersiveImageRecognitionApiClient
451
597
  end
452
598
  return data, status_code, headers
453
599
  end
454
-
455
600
  # Add a customizeable drop shadow to an image
456
601
  # Add a customizeable drop shadow to the image
457
602
  # @param x Horizontal (X) offset of the drop shadow
@@ -463,7 +608,7 @@ module CloudmersiveImageRecognitionApiClient
463
608
  # @return [String]
464
609
  def edit_drop_shadow(x, y, sigma, opacity, image_file, opts = {})
465
610
  data, _status_code, _headers = edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts)
466
- return data
611
+ data
467
612
  end
468
613
 
469
614
  # Add a customizeable drop shadow to an image
@@ -477,7 +622,7 @@ module CloudmersiveImageRecognitionApiClient
477
622
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
478
623
  def edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts = {})
479
624
  if @api_client.config.debugging
480
- @api_client.config.logger.debug "Calling API: EditApi.edit_drop_shadow ..."
625
+ @api_client.config.logger.debug 'Calling API: EditApi.edit_drop_shadow ...'
481
626
  end
482
627
  # verify the required parameter 'x' is set
483
628
  if @api_client.config.client_side_validation && x.nil?
@@ -500,7 +645,7 @@ module CloudmersiveImageRecognitionApiClient
500
645
  fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_drop_shadow"
501
646
  end
502
647
  # resource path
503
- local_var_path = "/image/edit/drop-shadow/{X}/{Y}/{sigma}/{opacity}".sub('{' + 'X' + '}', x.to_s).sub('{' + 'Y' + '}', y.to_s).sub('{' + 'sigma' + '}', sigma.to_s).sub('{' + 'opacity' + '}', opacity.to_s)
648
+ local_var_path = '/image/edit/drop-shadow/{X}/{Y}/{sigma}/{opacity}'.sub('{' + 'X' + '}', x.to_s).sub('{' + 'Y' + '}', y.to_s).sub('{' + 'sigma' + '}', sigma.to_s).sub('{' + 'opacity' + '}', opacity.to_s)
504
649
 
505
650
  # query parameters
506
651
  query_params = {}
@@ -514,7 +659,7 @@ module CloudmersiveImageRecognitionApiClient
514
659
 
515
660
  # form parameters
516
661
  form_params = {}
517
- form_params["imageFile"] = image_file
662
+ form_params['imageFile'] = image_file
518
663
 
519
664
  # http body (model)
520
665
  post_body = nil
@@ -531,7 +676,116 @@ module CloudmersiveImageRecognitionApiClient
531
676
  end
532
677
  return data, status_code, headers
533
678
  end
679
+ # Invert, negate the colors in the image
680
+ # Inverts (negates) all of the colors in the image. If the image contains transparency, the transparency will first be removed prior to inverting the image.
681
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
682
+ # @param [Hash] opts the optional parameters
683
+ # @return [String]
684
+ def edit_invert(image_file, opts = {})
685
+ data, _status_code, _headers = edit_invert_with_http_info(image_file, opts)
686
+ data
687
+ end
688
+
689
+ # Invert, negate the colors in the image
690
+ # Inverts (negates) all of the colors in the image. If the image contains transparency, the transparency will first be removed prior to inverting the image.
691
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
692
+ # @param [Hash] opts the optional parameters
693
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
694
+ def edit_invert_with_http_info(image_file, opts = {})
695
+ if @api_client.config.debugging
696
+ @api_client.config.logger.debug 'Calling API: EditApi.edit_invert ...'
697
+ end
698
+ # verify the required parameter 'image_file' is set
699
+ if @api_client.config.client_side_validation && image_file.nil?
700
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_invert"
701
+ end
702
+ # resource path
703
+ local_var_path = '/image/edit/invert'
704
+
705
+ # query parameters
706
+ query_params = {}
707
+
708
+ # header parameters
709
+ header_params = {}
710
+ # HTTP header 'Accept' (if needed)
711
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
712
+ # HTTP header 'Content-Type'
713
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
714
+
715
+ # form parameters
716
+ form_params = {}
717
+ form_params['imageFile'] = image_file
718
+
719
+ # http body (model)
720
+ post_body = nil
721
+ auth_names = ['Apikey']
722
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
723
+ :header_params => header_params,
724
+ :query_params => query_params,
725
+ :form_params => form_params,
726
+ :body => post_body,
727
+ :auth_names => auth_names,
728
+ :return_type => 'String')
729
+ if @api_client.config.debugging
730
+ @api_client.config.logger.debug "API called: EditApi#edit_invert\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
731
+ end
732
+ return data, status_code, headers
733
+ end
734
+ # Remove EXIF data from the image
735
+ # Removes any EXIF data and profiles .
736
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
737
+ # @param [Hash] opts the optional parameters
738
+ # @return [String]
739
+ def edit_remove_exif_data(image_file, opts = {})
740
+ data, _status_code, _headers = edit_remove_exif_data_with_http_info(image_file, opts)
741
+ data
742
+ end
743
+
744
+ # Remove EXIF data from the image
745
+ # Removes any EXIF data and profiles .
746
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
747
+ # @param [Hash] opts the optional parameters
748
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
749
+ def edit_remove_exif_data_with_http_info(image_file, opts = {})
750
+ if @api_client.config.debugging
751
+ @api_client.config.logger.debug 'Calling API: EditApi.edit_remove_exif_data ...'
752
+ end
753
+ # verify the required parameter 'image_file' is set
754
+ if @api_client.config.client_side_validation && image_file.nil?
755
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_remove_exif_data"
756
+ end
757
+ # resource path
758
+ local_var_path = '/image/edit/remove-exif'
759
+
760
+ # query parameters
761
+ query_params = {}
762
+
763
+ # header parameters
764
+ header_params = {}
765
+ # HTTP header 'Accept' (if needed)
766
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
767
+ # HTTP header 'Content-Type'
768
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
769
+
770
+ # form parameters
771
+ form_params = {}
772
+ form_params['imageFile'] = image_file
534
773
 
774
+ # http body (model)
775
+ post_body = nil
776
+ auth_names = ['Apikey']
777
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
778
+ :header_params => header_params,
779
+ :query_params => query_params,
780
+ :form_params => form_params,
781
+ :body => post_body,
782
+ :auth_names => auth_names,
783
+ :return_type => 'String')
784
+ if @api_client.config.debugging
785
+ @api_client.config.logger.debug "API called: EditApi#edit_remove_exif_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
786
+ end
787
+ return data, status_code, headers
788
+ end
535
789
  # Remove transparency from the image
536
790
  # Removes any active transparency in the image. Effectively renders the image at the same resolution, in the same file format, over a white background, thus removing transparency.
537
791
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
@@ -539,7 +793,7 @@ module CloudmersiveImageRecognitionApiClient
539
793
  # @return [String]
540
794
  def edit_remove_transparency(image_file, opts = {})
541
795
  data, _status_code, _headers = edit_remove_transparency_with_http_info(image_file, opts)
542
- return data
796
+ data
543
797
  end
544
798
 
545
799
  # Remove transparency from the image
@@ -549,14 +803,14 @@ module CloudmersiveImageRecognitionApiClient
549
803
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
550
804
  def edit_remove_transparency_with_http_info(image_file, opts = {})
551
805
  if @api_client.config.debugging
552
- @api_client.config.logger.debug "Calling API: EditApi.edit_remove_transparency ..."
806
+ @api_client.config.logger.debug 'Calling API: EditApi.edit_remove_transparency ...'
553
807
  end
554
808
  # verify the required parameter 'image_file' is set
555
809
  if @api_client.config.client_side_validation && image_file.nil?
556
810
  fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_remove_transparency"
557
811
  end
558
812
  # resource path
559
- local_var_path = "/image/edit/remove-transparency"
813
+ local_var_path = '/image/edit/remove-transparency'
560
814
 
561
815
  # query parameters
562
816
  query_params = {}
@@ -570,7 +824,7 @@ module CloudmersiveImageRecognitionApiClient
570
824
 
571
825
  # form parameters
572
826
  form_params = {}
573
- form_params["imageFile"] = image_file
827
+ form_params['imageFile'] = image_file
574
828
 
575
829
  # http body (model)
576
830
  post_body = nil
@@ -587,7 +841,6 @@ module CloudmersiveImageRecognitionApiClient
587
841
  end
588
842
  return data, status_code, headers
589
843
  end
590
-
591
844
  # Rotate an image any number of degrees
592
845
  # Rotates an image by an arbitrary number of degrees
593
846
  # @param degrees Degrees to rotate the image; values range from 0.0 to 360.0.
@@ -596,7 +849,7 @@ module CloudmersiveImageRecognitionApiClient
596
849
  # @return [String]
597
850
  def edit_rotate(degrees, image_file, opts = {})
598
851
  data, _status_code, _headers = edit_rotate_with_http_info(degrees, image_file, opts)
599
- return data
852
+ data
600
853
  end
601
854
 
602
855
  # Rotate an image any number of degrees
@@ -607,7 +860,7 @@ module CloudmersiveImageRecognitionApiClient
607
860
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
608
861
  def edit_rotate_with_http_info(degrees, image_file, opts = {})
609
862
  if @api_client.config.debugging
610
- @api_client.config.logger.debug "Calling API: EditApi.edit_rotate ..."
863
+ @api_client.config.logger.debug 'Calling API: EditApi.edit_rotate ...'
611
864
  end
612
865
  # verify the required parameter 'degrees' is set
613
866
  if @api_client.config.client_side_validation && degrees.nil?
@@ -618,7 +871,7 @@ module CloudmersiveImageRecognitionApiClient
618
871
  fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_rotate"
619
872
  end
620
873
  # resource path
621
- local_var_path = "/image/edit/rotate/{degrees}/angle".sub('{' + 'degrees' + '}', degrees.to_s)
874
+ local_var_path = '/image/edit/rotate/{degrees}/angle'.sub('{' + 'degrees' + '}', degrees.to_s)
622
875
 
623
876
  # query parameters
624
877
  query_params = {}
@@ -632,7 +885,7 @@ module CloudmersiveImageRecognitionApiClient
632
885
 
633
886
  # form parameters
634
887
  form_params = {}
635
- form_params["imageFile"] = image_file
888
+ form_params['imageFile'] = image_file
636
889
 
637
890
  # http body (model)
638
891
  post_body = nil