cloudmersive-image-recognition-api-client 1.4.6 → 2.0.1

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.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. metadata +3 -145
  3. data/Gemfile +0 -7
  4. data/README.md +0 -184
  5. data/Rakefile +0 -8
  6. data/cloudmersive-image-recognition-api-client.gemspec +0 -45
  7. data/docs/AgeDetectionResult.md +0 -10
  8. data/docs/ArtisticApi.md +0 -66
  9. data/docs/ColorResult.md +0 -10
  10. data/docs/ConvertApi.md +0 -396
  11. data/docs/DetectedLicensePlate.md +0 -14
  12. data/docs/DetectedObject.md +0 -13
  13. data/docs/DominantColorResult.md +0 -9
  14. data/docs/DrawPolygonInstance.md +0 -11
  15. data/docs/DrawPolygonRequest.md +0 -10
  16. data/docs/DrawRectangleInstance.md +0 -14
  17. data/docs/DrawRectangleRequest.md +0 -10
  18. data/docs/DrawTextInstance.md +0 -15
  19. data/docs/DrawTextRequest.md +0 -10
  20. data/docs/EditApi.md +0 -704
  21. data/docs/Face.md +0 -11
  22. data/docs/FaceApi.md +0 -396
  23. data/docs/FaceCompareResponse.md +0 -11
  24. data/docs/FaceLocateResponse.md +0 -11
  25. data/docs/FaceLocateWithLandmarksResponse.md +0 -11
  26. data/docs/FaceMatch.md +0 -13
  27. data/docs/FacePoint.md +0 -9
  28. data/docs/FaceWithLandmarks.md +0 -20
  29. data/docs/FilterApi.md +0 -478
  30. data/docs/FindSymbolResult.md +0 -13
  31. data/docs/FineTextDetectionResult.md +0 -10
  32. data/docs/FineTextItem.md +0 -18
  33. data/docs/GenderDetectionResult.md +0 -10
  34. data/docs/ImageDescriptionResponse.md +0 -11
  35. data/docs/ImageMetadata.md +0 -17
  36. data/docs/ImageMetadataExifValue.md +0 -10
  37. data/docs/InfoApi.md +0 -118
  38. data/docs/NsfwApi.md +0 -63
  39. data/docs/NsfwResult.md +0 -10
  40. data/docs/ObjectDetectionResult.md +0 -10
  41. data/docs/PersonWithAge.md +0 -11
  42. data/docs/PersonWithGender.md +0 -10
  43. data/docs/PolygonPoint.md +0 -9
  44. data/docs/RecognitionOutcome.md +0 -9
  45. data/docs/RecognizeApi.md +0 -455
  46. data/docs/ResizeApi.md +0 -130
  47. data/docs/TextDetectionResult.md +0 -10
  48. data/docs/TextItem.md +0 -11
  49. data/docs/VehicleLicensePlateDetectionResult.md +0 -10
  50. data/git_push.sh +0 -55
  51. data/lib/cloudmersive-image-recognition-api-client.rb +0 -82
  52. data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +0 -85
  53. data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +0 -421
  54. data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +0 -765
  55. data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +0 -422
  56. data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +0 -533
  57. data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +0 -135
  58. data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +0 -79
  59. data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +0 -481
  60. data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +0 -159
  61. data/lib/cloudmersive-image-recognition-api-client/api_client.rb +0 -389
  62. data/lib/cloudmersive-image-recognition-api-client/api_error.rb +0 -38
  63. data/lib/cloudmersive-image-recognition-api-client/configuration.rb +0 -209
  64. data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +0 -211
  65. data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +0 -209
  66. data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +0 -249
  67. data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +0 -239
  68. data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +0 -201
  69. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +0 -221
  70. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +0 -227
  71. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +0 -249
  72. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +0 -227
  73. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +0 -259
  74. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +0 -227
  75. data/lib/cloudmersive-image-recognition-api-client/models/face.rb +0 -219
  76. data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +0 -221
  77. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +0 -221
  78. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +0 -221
  79. data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +0 -239
  80. data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +0 -199
  81. data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +0 -327
  82. data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +0 -239
  83. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +0 -211
  84. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +0 -289
  85. data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +0 -211
  86. data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +0 -219
  87. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +0 -281
  88. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata_exif_value.rb +0 -209
  89. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +0 -209
  90. data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +0 -211
  91. data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +0 -218
  92. data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +0 -209
  93. data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +0 -199
  94. data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +0 -199
  95. data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +0 -211
  96. data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +0 -219
  97. data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +0 -211
  98. data/lib/cloudmersive-image-recognition-api-client/version.rb +0 -15
  99. data/spec/api/artistic_api_spec.rb +0 -48
  100. data/spec/api/convert_api_spec.rb +0 -120
  101. data/spec/api/edit_api_spec.rb +0 -191
  102. data/spec/api/face_api_spec.rb +0 -120
  103. data/spec/api/filter_api_spec.rb +0 -141
  104. data/spec/api/info_api_spec.rb +0 -59
  105. data/spec/api/nsfw_api_spec.rb +0 -47
  106. data/spec/api/recognize_api_spec.rb +0 -133
  107. data/spec/api/resize_api_spec.rb +0 -63
  108. data/spec/api_client_spec.rb +0 -226
  109. data/spec/configuration_spec.rb +0 -42
  110. data/spec/models/age_detection_result_spec.rb +0 -54
  111. data/spec/models/color_result_spec.rb +0 -54
  112. data/spec/models/detected_license_plate_spec.rb +0 -78
  113. data/spec/models/detected_object_spec.rb +0 -72
  114. data/spec/models/dominant_color_result_spec.rb +0 -48
  115. data/spec/models/draw_polygon_instance_spec.rb +0 -60
  116. data/spec/models/draw_polygon_request_spec.rb +0 -54
  117. data/spec/models/draw_rectangle_instance_spec.rb +0 -78
  118. data/spec/models/draw_rectangle_request_spec.rb +0 -54
  119. data/spec/models/draw_text_instance_spec.rb +0 -84
  120. data/spec/models/draw_text_request_spec.rb +0 -54
  121. data/spec/models/face_compare_response_spec.rb +0 -60
  122. data/spec/models/face_locate_response_spec.rb +0 -60
  123. data/spec/models/face_locate_with_landmarks_response_spec.rb +0 -60
  124. data/spec/models/face_match_spec.rb +0 -72
  125. data/spec/models/face_point_spec.rb +0 -48
  126. data/spec/models/face_spec.rb +0 -60
  127. data/spec/models/face_with_landmarks_spec.rb +0 -114
  128. data/spec/models/find_symbol_result_spec.rb +0 -72
  129. data/spec/models/fine_text_detection_result_spec.rb +0 -54
  130. data/spec/models/fine_text_item_spec.rb +0 -102
  131. data/spec/models/gender_detection_result_spec.rb +0 -54
  132. data/spec/models/image_description_response_spec.rb +0 -60
  133. data/spec/models/image_metadata_exif_value_spec.rb +0 -54
  134. data/spec/models/image_metadata_spec.rb +0 -96
  135. data/spec/models/nsfw_result_spec.rb +0 -54
  136. data/spec/models/object_detection_result_spec.rb +0 -54
  137. data/spec/models/person_with_age_spec.rb +0 -60
  138. data/spec/models/person_with_gender_spec.rb +0 -54
  139. data/spec/models/polygon_point_spec.rb +0 -48
  140. data/spec/models/recognition_outcome_spec.rb +0 -48
  141. data/spec/models/text_detection_result_spec.rb +0 -54
  142. data/spec/models/text_item_spec.rb +0 -60
  143. data/spec/models/vehicle_license_plate_detection_result_spec.rb +0 -54
  144. data/spec/spec_helper.rb +0 -111
@@ -1,765 +0,0 @@
1
- =begin
2
- #imageapi
3
-
4
- #Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
5
-
6
- OpenAPI spec version: v1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
10
-
11
- =end
12
-
13
- require "uri"
14
-
15
- module CloudmersiveImageRecognitionApiClient
16
- class EditApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
-
23
- # Normalizes image rotation and removes EXIF rotation data
24
- # 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
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
26
- # @param [Hash] opts the optional parameters
27
- # @return [String]
28
- def edit_auto_orient(image_file, opts = {})
29
- data, _status_code, _headers = edit_auto_orient_with_http_info(image_file, opts)
30
- return data
31
- end
32
-
33
- # Normalizes image rotation and removes EXIF rotation data
34
- # 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.
35
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
36
- # @param [Hash] opts the optional parameters
37
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
38
- def edit_auto_orient_with_http_info(image_file, opts = {})
39
- if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: EditApi.edit_auto_orient ..."
41
- end
42
- # verify the required parameter 'image_file' is set
43
- if @api_client.config.client_side_validation && image_file.nil?
44
- fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_auto_orient"
45
- end
46
- # resource path
47
- local_var_path = "/image/edit/auto-orient/remove-exif"
48
-
49
- # query parameters
50
- query_params = {}
51
-
52
- # header parameters
53
- header_params = {}
54
- # HTTP header 'Accept' (if needed)
55
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
56
- # HTTP header 'Content-Type'
57
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
58
-
59
- # form parameters
60
- form_params = {}
61
- form_params["imageFile"] = image_file
62
-
63
- # http body (model)
64
- post_body = nil
65
- auth_names = ['Apikey']
66
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
67
- :header_params => header_params,
68
- :query_params => query_params,
69
- :form_params => form_params,
70
- :body => post_body,
71
- :auth_names => auth_names,
72
- :return_type => 'String')
73
- if @api_client.config.debugging
74
- @api_client.config.logger.debug "API called: EditApi#edit_auto_orient\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
- end
76
- return data, status_code, headers
77
- end
78
-
79
- # Composite two images together
80
- # 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
- # @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;
82
- # @param base_image Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
83
- # @param layered_image Image to layer on top of the base image.
84
- # @param [Hash] opts the optional parameters
85
- # @return [String]
86
- def edit_composite_basic(location, base_image, layered_image, opts = {})
87
- data, _status_code, _headers = edit_composite_basic_with_http_info(location, base_image, layered_image, opts)
88
- return data
89
- end
90
-
91
- # Composite two images together
92
- # 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.
93
- # @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;
94
- # @param base_image Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
95
- # @param layered_image Image to layer on top of the base image.
96
- # @param [Hash] opts the optional parameters
97
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
98
- def edit_composite_basic_with_http_info(location, base_image, layered_image, opts = {})
99
- if @api_client.config.debugging
100
- @api_client.config.logger.debug "Calling API: EditApi.edit_composite_basic ..."
101
- end
102
- # verify the required parameter 'location' is set
103
- if @api_client.config.client_side_validation && location.nil?
104
- fail ArgumentError, "Missing the required parameter 'location' when calling EditApi.edit_composite_basic"
105
- end
106
- # verify the required parameter 'base_image' is set
107
- if @api_client.config.client_side_validation && base_image.nil?
108
- fail ArgumentError, "Missing the required parameter 'base_image' when calling EditApi.edit_composite_basic"
109
- end
110
- # verify the required parameter 'layered_image' is set
111
- if @api_client.config.client_side_validation && layered_image.nil?
112
- fail ArgumentError, "Missing the required parameter 'layered_image' when calling EditApi.edit_composite_basic"
113
- end
114
- # resource path
115
- local_var_path = "/image/edit/composite/{location}".sub('{' + 'location' + '}', location.to_s)
116
-
117
- # query parameters
118
- query_params = {}
119
-
120
- # header parameters
121
- header_params = {}
122
- # HTTP header 'Accept' (if needed)
123
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
124
- # HTTP header 'Content-Type'
125
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
126
-
127
- # form parameters
128
- form_params = {}
129
- form_params["baseImage"] = base_image
130
- form_params["layeredImage"] = layered_image
131
-
132
- # http body (model)
133
- post_body = nil
134
- auth_names = ['Apikey']
135
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
136
- :header_params => header_params,
137
- :query_params => query_params,
138
- :form_params => form_params,
139
- :body => post_body,
140
- :auth_names => auth_names,
141
- :return_type => 'String')
142
- if @api_client.config.debugging
143
- @api_client.config.logger.debug "API called: EditApi#edit_composite_basic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
- end
145
- return data, status_code, headers
146
- end
147
-
148
- # Adaptively adjust the contrast of the image to be more appealing and easy to see
149
- # 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
- # @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.
151
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
152
- # @param [Hash] opts the optional parameters
153
- # @return [String]
154
- def edit_contrast_adaptive(gamma, image_file, opts = {})
155
- data, _status_code, _headers = edit_contrast_adaptive_with_http_info(gamma, image_file, opts)
156
- return data
157
- end
158
-
159
- # Adaptively adjust the contrast of the image to be more appealing and easy to see
160
- # 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.
161
- # @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.
162
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
163
- # @param [Hash] opts the optional parameters
164
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
165
- def edit_contrast_adaptive_with_http_info(gamma, image_file, opts = {})
166
- if @api_client.config.debugging
167
- @api_client.config.logger.debug "Calling API: EditApi.edit_contrast_adaptive ..."
168
- end
169
- # verify the required parameter 'gamma' is set
170
- if @api_client.config.client_side_validation && gamma.nil?
171
- fail ArgumentError, "Missing the required parameter 'gamma' when calling EditApi.edit_contrast_adaptive"
172
- end
173
- # verify the required parameter 'image_file' is set
174
- if @api_client.config.client_side_validation && image_file.nil?
175
- fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_contrast_adaptive"
176
- end
177
- # resource path
178
- local_var_path = "/image/edit/contrast/{gamma}/adaptive".sub('{' + 'gamma' + '}', gamma.to_s)
179
-
180
- # query parameters
181
- query_params = {}
182
-
183
- # header parameters
184
- header_params = {}
185
- # HTTP header 'Accept' (if needed)
186
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
187
- # HTTP header 'Content-Type'
188
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
189
-
190
- # form parameters
191
- form_params = {}
192
- form_params["imageFile"] = image_file
193
-
194
- # http body (model)
195
- post_body = nil
196
- auth_names = ['Apikey']
197
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
198
- :header_params => header_params,
199
- :query_params => query_params,
200
- :form_params => form_params,
201
- :body => post_body,
202
- :auth_names => auth_names,
203
- :return_type => 'String')
204
- if @api_client.config.debugging
205
- @api_client.config.logger.debug "API called: EditApi#edit_contrast_adaptive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
- end
207
- return data, status_code, headers
208
- end
209
-
210
- # Crop an image to a rectangular area
211
- # Crop an image to a target rectangular area
212
- # @param left The left edge of the rectangular crop area in pixels (X).
213
- # @param top The top edge of the rectangular crop area in pixels (Y).
214
- # @param width The width of the rectangular crop area in pixels.
215
- # @param height The height of the rectangular crop area in pixels.
216
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
217
- # @param [Hash] opts the optional parameters
218
- # @return [String]
219
- def edit_crop_rectangle(left, top, width, height, image_file, opts = {})
220
- data, _status_code, _headers = edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts)
221
- return data
222
- end
223
-
224
- # Crop an image to a rectangular area
225
- # Crop an image to a target rectangular area
226
- # @param left The left edge of the rectangular crop area in pixels (X).
227
- # @param top The top edge of the rectangular crop area in pixels (Y).
228
- # @param width The width of the rectangular crop area in pixels.
229
- # @param height The height of the rectangular crop area in pixels.
230
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
231
- # @param [Hash] opts the optional parameters
232
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
233
- def edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts = {})
234
- if @api_client.config.debugging
235
- @api_client.config.logger.debug "Calling API: EditApi.edit_crop_rectangle ..."
236
- end
237
- # verify the required parameter 'left' is set
238
- if @api_client.config.client_side_validation && left.nil?
239
- fail ArgumentError, "Missing the required parameter 'left' when calling EditApi.edit_crop_rectangle"
240
- end
241
- # verify the required parameter 'top' is set
242
- if @api_client.config.client_side_validation && top.nil?
243
- fail ArgumentError, "Missing the required parameter 'top' when calling EditApi.edit_crop_rectangle"
244
- end
245
- # verify the required parameter 'width' is set
246
- if @api_client.config.client_side_validation && width.nil?
247
- fail ArgumentError, "Missing the required parameter 'width' when calling EditApi.edit_crop_rectangle"
248
- end
249
- # verify the required parameter 'height' is set
250
- if @api_client.config.client_side_validation && height.nil?
251
- fail ArgumentError, "Missing the required parameter 'height' when calling EditApi.edit_crop_rectangle"
252
- end
253
- # verify the required parameter 'image_file' is set
254
- if @api_client.config.client_side_validation && image_file.nil?
255
- fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_crop_rectangle"
256
- end
257
- # 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)
259
-
260
- # query parameters
261
- query_params = {}
262
-
263
- # header parameters
264
- header_params = {}
265
- # HTTP header 'Accept' (if needed)
266
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
267
- # HTTP header 'Content-Type'
268
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
269
-
270
- # form parameters
271
- form_params = {}
272
- form_params["imageFile"] = image_file
273
-
274
- # http body (model)
275
- post_body = nil
276
- auth_names = ['Apikey']
277
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
278
- :header_params => header_params,
279
- :query_params => query_params,
280
- :form_params => form_params,
281
- :body => post_body,
282
- :auth_names => auth_names,
283
- :return_type => 'String')
284
- if @api_client.config.debugging
285
- @api_client.config.logger.debug "API called: EditApi#edit_crop_rectangle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
286
- end
287
- return data, status_code, headers
288
- end
289
-
290
- # Draw a polygon onto an image
291
- # Draw one or more polygons, with customized visuals, onto an image
292
- # @param request Polygon drawing request parameters
293
- # @param [Hash] opts the optional parameters
294
- # @return [String]
295
- def edit_draw_polygon(request, opts = {})
296
- data, _status_code, _headers = edit_draw_polygon_with_http_info(request, opts)
297
- return data
298
- end
299
-
300
- # Draw a polygon onto an image
301
- # Draw one or more polygons, with customized visuals, onto an image
302
- # @param request Polygon drawing request parameters
303
- # @param [Hash] opts the optional parameters
304
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
305
- def edit_draw_polygon_with_http_info(request, opts = {})
306
- if @api_client.config.debugging
307
- @api_client.config.logger.debug "Calling API: EditApi.edit_draw_polygon ..."
308
- end
309
- # verify the required parameter 'request' is set
310
- if @api_client.config.client_side_validation && request.nil?
311
- fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_polygon"
312
- end
313
- # resource path
314
- local_var_path = "/image/edit/draw/polygon"
315
-
316
- # query parameters
317
- query_params = {}
318
-
319
- # header parameters
320
- header_params = {}
321
- # HTTP header 'Accept' (if needed)
322
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
323
- # HTTP header 'Content-Type'
324
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
325
-
326
- # form parameters
327
- form_params = {}
328
-
329
- # http body (model)
330
- post_body = @api_client.object_to_http_body(request)
331
- auth_names = ['Apikey']
332
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
333
- :header_params => header_params,
334
- :query_params => query_params,
335
- :form_params => form_params,
336
- :body => post_body,
337
- :auth_names => auth_names,
338
- :return_type => 'String')
339
- if @api_client.config.debugging
340
- @api_client.config.logger.debug "API called: EditApi#edit_draw_polygon\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
341
- end
342
- return data, status_code, headers
343
- end
344
-
345
- # Draw a rectangle onto an image
346
- # Draw one or more rectangles, with customized visuals, onto an image
347
- # @param request Draw rectangle parameters
348
- # @param [Hash] opts the optional parameters
349
- # @return [String]
350
- def edit_draw_rectangle(request, opts = {})
351
- data, _status_code, _headers = edit_draw_rectangle_with_http_info(request, opts)
352
- return data
353
- end
354
-
355
- # Draw a rectangle onto an image
356
- # Draw one or more rectangles, with customized visuals, onto an image
357
- # @param request Draw rectangle parameters
358
- # @param [Hash] opts the optional parameters
359
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
360
- def edit_draw_rectangle_with_http_info(request, opts = {})
361
- if @api_client.config.debugging
362
- @api_client.config.logger.debug "Calling API: EditApi.edit_draw_rectangle ..."
363
- end
364
- # verify the required parameter 'request' is set
365
- if @api_client.config.client_side_validation && request.nil?
366
- fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_rectangle"
367
- end
368
- # resource path
369
- local_var_path = "/image/edit/draw/rectangle"
370
-
371
- # query parameters
372
- query_params = {}
373
-
374
- # header parameters
375
- header_params = {}
376
- # HTTP header 'Accept' (if needed)
377
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
378
- # HTTP header 'Content-Type'
379
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
380
-
381
- # form parameters
382
- form_params = {}
383
-
384
- # http body (model)
385
- post_body = @api_client.object_to_http_body(request)
386
- auth_names = ['Apikey']
387
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
388
- :header_params => header_params,
389
- :query_params => query_params,
390
- :form_params => form_params,
391
- :body => post_body,
392
- :auth_names => auth_names,
393
- :return_type => 'String')
394
- if @api_client.config.debugging
395
- @api_client.config.logger.debug "API called: EditApi#edit_draw_rectangle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
396
- end
397
- return data, status_code, headers
398
- end
399
-
400
- # Draw text onto an image
401
- # Draw one or more pieces of text, with customized visuals, onto an image
402
- # @param request Draw text parameters
403
- # @param [Hash] opts the optional parameters
404
- # @return [String]
405
- def edit_draw_text(request, opts = {})
406
- data, _status_code, _headers = edit_draw_text_with_http_info(request, opts)
407
- return data
408
- end
409
-
410
- # Draw text onto an image
411
- # Draw one or more pieces of text, with customized visuals, onto an image
412
- # @param request Draw text parameters
413
- # @param [Hash] opts the optional parameters
414
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
415
- def edit_draw_text_with_http_info(request, opts = {})
416
- if @api_client.config.debugging
417
- @api_client.config.logger.debug "Calling API: EditApi.edit_draw_text ..."
418
- end
419
- # verify the required parameter 'request' is set
420
- if @api_client.config.client_side_validation && request.nil?
421
- fail ArgumentError, "Missing the required parameter 'request' when calling EditApi.edit_draw_text"
422
- end
423
- # resource path
424
- local_var_path = "/image/edit/draw/text"
425
-
426
- # query parameters
427
- query_params = {}
428
-
429
- # header parameters
430
- header_params = {}
431
- # HTTP header 'Accept' (if needed)
432
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
433
- # HTTP header 'Content-Type'
434
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
435
-
436
- # form parameters
437
- form_params = {}
438
-
439
- # http body (model)
440
- post_body = @api_client.object_to_http_body(request)
441
- auth_names = ['Apikey']
442
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
443
- :header_params => header_params,
444
- :query_params => query_params,
445
- :form_params => form_params,
446
- :body => post_body,
447
- :auth_names => auth_names,
448
- :return_type => 'String')
449
- if @api_client.config.debugging
450
- @api_client.config.logger.debug "API called: EditApi#edit_draw_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
451
- end
452
- return data, status_code, headers
453
- end
454
-
455
- # Add a customizeable drop shadow to an image
456
- # Add a customizeable drop shadow to the image
457
- # @param x Horizontal (X) offset of the drop shadow
458
- # @param y Vertical (Y) offset of the drop shadow
459
- # @param sigma Sigma (blur distance) of the drop shadow
460
- # @param opacity Opacity of the drop shadow; 0 is 0% and 100 is 100%
461
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
462
- # @param [Hash] opts the optional parameters
463
- # @return [String]
464
- def edit_drop_shadow(x, y, sigma, opacity, image_file, opts = {})
465
- data, _status_code, _headers = edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts)
466
- return data
467
- end
468
-
469
- # Add a customizeable drop shadow to an image
470
- # Add a customizeable drop shadow to the image
471
- # @param x Horizontal (X) offset of the drop shadow
472
- # @param y Vertical (Y) offset of the drop shadow
473
- # @param sigma Sigma (blur distance) of the drop shadow
474
- # @param opacity Opacity of the drop shadow; 0 is 0% and 100 is 100%
475
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
476
- # @param [Hash] opts the optional parameters
477
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
478
- def edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts = {})
479
- if @api_client.config.debugging
480
- @api_client.config.logger.debug "Calling API: EditApi.edit_drop_shadow ..."
481
- end
482
- # verify the required parameter 'x' is set
483
- if @api_client.config.client_side_validation && x.nil?
484
- fail ArgumentError, "Missing the required parameter 'x' when calling EditApi.edit_drop_shadow"
485
- end
486
- # verify the required parameter 'y' is set
487
- if @api_client.config.client_side_validation && y.nil?
488
- fail ArgumentError, "Missing the required parameter 'y' when calling EditApi.edit_drop_shadow"
489
- end
490
- # verify the required parameter 'sigma' is set
491
- if @api_client.config.client_side_validation && sigma.nil?
492
- fail ArgumentError, "Missing the required parameter 'sigma' when calling EditApi.edit_drop_shadow"
493
- end
494
- # verify the required parameter 'opacity' is set
495
- if @api_client.config.client_side_validation && opacity.nil?
496
- fail ArgumentError, "Missing the required parameter 'opacity' when calling EditApi.edit_drop_shadow"
497
- end
498
- # verify the required parameter 'image_file' is set
499
- if @api_client.config.client_side_validation && image_file.nil?
500
- fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_drop_shadow"
501
- end
502
- # 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)
504
-
505
- # query parameters
506
- query_params = {}
507
-
508
- # header parameters
509
- header_params = {}
510
- # HTTP header 'Accept' (if needed)
511
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
512
- # HTTP header 'Content-Type'
513
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
514
-
515
- # form parameters
516
- form_params = {}
517
- form_params["imageFile"] = image_file
518
-
519
- # http body (model)
520
- post_body = nil
521
- auth_names = ['Apikey']
522
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
523
- :header_params => header_params,
524
- :query_params => query_params,
525
- :form_params => form_params,
526
- :body => post_body,
527
- :auth_names => auth_names,
528
- :return_type => 'String')
529
- if @api_client.config.debugging
530
- @api_client.config.logger.debug "API called: EditApi#edit_drop_shadow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
531
- end
532
- return data, status_code, headers
533
- end
534
-
535
- # Invert, negate the colors in the image
536
- # 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.
537
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
538
- # @param [Hash] opts the optional parameters
539
- # @return [String]
540
- def edit_invert(image_file, opts = {})
541
- data, _status_code, _headers = edit_invert_with_http_info(image_file, opts)
542
- return data
543
- end
544
-
545
- # Invert, negate the colors in the image
546
- # 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.
547
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
548
- # @param [Hash] opts the optional parameters
549
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
550
- def edit_invert_with_http_info(image_file, opts = {})
551
- if @api_client.config.debugging
552
- @api_client.config.logger.debug "Calling API: EditApi.edit_invert ..."
553
- end
554
- # verify the required parameter 'image_file' is set
555
- if @api_client.config.client_side_validation && image_file.nil?
556
- fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_invert"
557
- end
558
- # resource path
559
- local_var_path = "/image/edit/invert"
560
-
561
- # query parameters
562
- query_params = {}
563
-
564
- # header parameters
565
- header_params = {}
566
- # HTTP header 'Accept' (if needed)
567
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
568
- # HTTP header 'Content-Type'
569
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
570
-
571
- # form parameters
572
- form_params = {}
573
- form_params["imageFile"] = image_file
574
-
575
- # http body (model)
576
- post_body = nil
577
- auth_names = ['Apikey']
578
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
579
- :header_params => header_params,
580
- :query_params => query_params,
581
- :form_params => form_params,
582
- :body => post_body,
583
- :auth_names => auth_names,
584
- :return_type => 'String')
585
- if @api_client.config.debugging
586
- @api_client.config.logger.debug "API called: EditApi#edit_invert\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
587
- end
588
- return data, status_code, headers
589
- end
590
-
591
- # Remove EXIF data from the image
592
- # Removes any EXIF data and profiles .
593
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
594
- # @param [Hash] opts the optional parameters
595
- # @return [String]
596
- def edit_remove_exif_data(image_file, opts = {})
597
- data, _status_code, _headers = edit_remove_exif_data_with_http_info(image_file, opts)
598
- return data
599
- end
600
-
601
- # Remove EXIF data from the image
602
- # Removes any EXIF data and profiles .
603
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
604
- # @param [Hash] opts the optional parameters
605
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
606
- def edit_remove_exif_data_with_http_info(image_file, opts = {})
607
- if @api_client.config.debugging
608
- @api_client.config.logger.debug "Calling API: EditApi.edit_remove_exif_data ..."
609
- end
610
- # verify the required parameter 'image_file' is set
611
- if @api_client.config.client_side_validation && image_file.nil?
612
- fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_remove_exif_data"
613
- end
614
- # resource path
615
- local_var_path = "/image/edit/remove-exif"
616
-
617
- # query parameters
618
- query_params = {}
619
-
620
- # header parameters
621
- header_params = {}
622
- # HTTP header 'Accept' (if needed)
623
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
624
- # HTTP header 'Content-Type'
625
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
626
-
627
- # form parameters
628
- form_params = {}
629
- form_params["imageFile"] = image_file
630
-
631
- # http body (model)
632
- post_body = nil
633
- auth_names = ['Apikey']
634
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
635
- :header_params => header_params,
636
- :query_params => query_params,
637
- :form_params => form_params,
638
- :body => post_body,
639
- :auth_names => auth_names,
640
- :return_type => 'String')
641
- if @api_client.config.debugging
642
- @api_client.config.logger.debug "API called: EditApi#edit_remove_exif_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
643
- end
644
- return data, status_code, headers
645
- end
646
-
647
- # Remove transparency from the image
648
- # 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.
649
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
650
- # @param [Hash] opts the optional parameters
651
- # @return [String]
652
- def edit_remove_transparency(image_file, opts = {})
653
- data, _status_code, _headers = edit_remove_transparency_with_http_info(image_file, opts)
654
- return data
655
- end
656
-
657
- # Remove transparency from the image
658
- # 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.
659
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
660
- # @param [Hash] opts the optional parameters
661
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
662
- def edit_remove_transparency_with_http_info(image_file, opts = {})
663
- if @api_client.config.debugging
664
- @api_client.config.logger.debug "Calling API: EditApi.edit_remove_transparency ..."
665
- end
666
- # verify the required parameter 'image_file' is set
667
- if @api_client.config.client_side_validation && image_file.nil?
668
- fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_remove_transparency"
669
- end
670
- # resource path
671
- local_var_path = "/image/edit/remove-transparency"
672
-
673
- # query parameters
674
- query_params = {}
675
-
676
- # header parameters
677
- header_params = {}
678
- # HTTP header 'Accept' (if needed)
679
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
680
- # HTTP header 'Content-Type'
681
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
682
-
683
- # form parameters
684
- form_params = {}
685
- form_params["imageFile"] = image_file
686
-
687
- # http body (model)
688
- post_body = nil
689
- auth_names = ['Apikey']
690
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
691
- :header_params => header_params,
692
- :query_params => query_params,
693
- :form_params => form_params,
694
- :body => post_body,
695
- :auth_names => auth_names,
696
- :return_type => 'String')
697
- if @api_client.config.debugging
698
- @api_client.config.logger.debug "API called: EditApi#edit_remove_transparency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
699
- end
700
- return data, status_code, headers
701
- end
702
-
703
- # Rotate an image any number of degrees
704
- # Rotates an image by an arbitrary number of degrees
705
- # @param degrees Degrees to rotate the image; values range from 0.0 to 360.0.
706
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
707
- # @param [Hash] opts the optional parameters
708
- # @return [String]
709
- def edit_rotate(degrees, image_file, opts = {})
710
- data, _status_code, _headers = edit_rotate_with_http_info(degrees, image_file, opts)
711
- return data
712
- end
713
-
714
- # Rotate an image any number of degrees
715
- # Rotates an image by an arbitrary number of degrees
716
- # @param degrees Degrees to rotate the image; values range from 0.0 to 360.0.
717
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
718
- # @param [Hash] opts the optional parameters
719
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
720
- def edit_rotate_with_http_info(degrees, image_file, opts = {})
721
- if @api_client.config.debugging
722
- @api_client.config.logger.debug "Calling API: EditApi.edit_rotate ..."
723
- end
724
- # verify the required parameter 'degrees' is set
725
- if @api_client.config.client_side_validation && degrees.nil?
726
- fail ArgumentError, "Missing the required parameter 'degrees' when calling EditApi.edit_rotate"
727
- end
728
- # verify the required parameter 'image_file' is set
729
- if @api_client.config.client_side_validation && image_file.nil?
730
- fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_rotate"
731
- end
732
- # resource path
733
- local_var_path = "/image/edit/rotate/{degrees}/angle".sub('{' + 'degrees' + '}', degrees.to_s)
734
-
735
- # query parameters
736
- query_params = {}
737
-
738
- # header parameters
739
- header_params = {}
740
- # HTTP header 'Accept' (if needed)
741
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
742
- # HTTP header 'Content-Type'
743
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
744
-
745
- # form parameters
746
- form_params = {}
747
- form_params["imageFile"] = image_file
748
-
749
- # http body (model)
750
- post_body = nil
751
- auth_names = ['Apikey']
752
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
753
- :header_params => header_params,
754
- :query_params => query_params,
755
- :form_params => form_params,
756
- :body => post_body,
757
- :auth_names => auth_names,
758
- :return_type => 'String')
759
- if @api_client.config.debugging
760
- @api_client.config.logger.debug "API called: EditApi#edit_rotate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
761
- end
762
- return data, status_code, headers
763
- end
764
- end
765
- end