cloudmersive-image-recognition-api-client 1.4.2 → 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 (138) hide show
  1. checksums.yaml +4 -4
  2. metadata +3 -139
  3. data/Gemfile +0 -7
  4. data/README.md +0 -174
  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 -176
  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 -539
  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/InfoApi.md +0 -63
  36. data/docs/NsfwApi.md +0 -63
  37. data/docs/NsfwResult.md +0 -10
  38. data/docs/ObjectDetectionResult.md +0 -10
  39. data/docs/PersonWithAge.md +0 -11
  40. data/docs/PersonWithGender.md +0 -10
  41. data/docs/PolygonPoint.md +0 -9
  42. data/docs/RecognitionOutcome.md +0 -9
  43. data/docs/RecognizeApi.md +0 -455
  44. data/docs/ResizeApi.md +0 -130
  45. data/docs/TextDetectionResult.md +0 -10
  46. data/docs/TextItem.md +0 -11
  47. data/docs/VehicleLicensePlateDetectionResult.md +0 -10
  48. data/git_push.sh +0 -55
  49. data/lib/cloudmersive-image-recognition-api-client.rb +0 -80
  50. data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +0 -85
  51. data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +0 -197
  52. data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +0 -597
  53. data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +0 -422
  54. data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +0 -533
  55. data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +0 -79
  56. data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +0 -79
  57. data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +0 -481
  58. data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +0 -159
  59. data/lib/cloudmersive-image-recognition-api-client/api_client.rb +0 -389
  60. data/lib/cloudmersive-image-recognition-api-client/api_error.rb +0 -38
  61. data/lib/cloudmersive-image-recognition-api-client/configuration.rb +0 -209
  62. data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +0 -211
  63. data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +0 -209
  64. data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +0 -249
  65. data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +0 -239
  66. data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +0 -201
  67. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +0 -221
  68. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +0 -227
  69. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +0 -249
  70. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +0 -227
  71. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +0 -259
  72. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +0 -227
  73. data/lib/cloudmersive-image-recognition-api-client/models/face.rb +0 -219
  74. data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +0 -221
  75. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +0 -220
  76. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +0 -221
  77. data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +0 -239
  78. data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +0 -199
  79. data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +0 -327
  80. data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +0 -239
  81. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +0 -211
  82. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +0 -289
  83. data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +0 -211
  84. data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +0 -219
  85. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +0 -209
  86. data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +0 -211
  87. data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +0 -218
  88. data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +0 -209
  89. data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +0 -199
  90. data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +0 -199
  91. data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +0 -211
  92. data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +0 -219
  93. data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +0 -211
  94. data/lib/cloudmersive-image-recognition-api-client/version.rb +0 -15
  95. data/spec/api/artistic_api_spec.rb +0 -48
  96. data/spec/api/convert_api_spec.rb +0 -72
  97. data/spec/api/edit_api_spec.rb +0 -155
  98. data/spec/api/face_api_spec.rb +0 -120
  99. data/spec/api/filter_api_spec.rb +0 -141
  100. data/spec/api/info_api_spec.rb +0 -47
  101. data/spec/api/nsfw_api_spec.rb +0 -47
  102. data/spec/api/recognize_api_spec.rb +0 -133
  103. data/spec/api/resize_api_spec.rb +0 -63
  104. data/spec/api_client_spec.rb +0 -226
  105. data/spec/configuration_spec.rb +0 -42
  106. data/spec/models/age_detection_result_spec.rb +0 -54
  107. data/spec/models/color_result_spec.rb +0 -54
  108. data/spec/models/detected_license_plate_spec.rb +0 -78
  109. data/spec/models/detected_object_spec.rb +0 -72
  110. data/spec/models/dominant_color_result_spec.rb +0 -48
  111. data/spec/models/draw_polygon_instance_spec.rb +0 -60
  112. data/spec/models/draw_polygon_request_spec.rb +0 -54
  113. data/spec/models/draw_rectangle_instance_spec.rb +0 -78
  114. data/spec/models/draw_rectangle_request_spec.rb +0 -54
  115. data/spec/models/draw_text_instance_spec.rb +0 -84
  116. data/spec/models/draw_text_request_spec.rb +0 -54
  117. data/spec/models/face_compare_response_spec.rb +0 -60
  118. data/spec/models/face_locate_response_spec.rb +0 -60
  119. data/spec/models/face_locate_with_landmarks_response_spec.rb +0 -60
  120. data/spec/models/face_match_spec.rb +0 -72
  121. data/spec/models/face_point_spec.rb +0 -48
  122. data/spec/models/face_spec.rb +0 -60
  123. data/spec/models/face_with_landmarks_spec.rb +0 -114
  124. data/spec/models/find_symbol_result_spec.rb +0 -72
  125. data/spec/models/fine_text_detection_result_spec.rb +0 -54
  126. data/spec/models/fine_text_item_spec.rb +0 -102
  127. data/spec/models/gender_detection_result_spec.rb +0 -54
  128. data/spec/models/image_description_response_spec.rb +0 -60
  129. data/spec/models/nsfw_result_spec.rb +0 -54
  130. data/spec/models/object_detection_result_spec.rb +0 -54
  131. data/spec/models/person_with_age_spec.rb +0 -60
  132. data/spec/models/person_with_gender_spec.rb +0 -54
  133. data/spec/models/polygon_point_spec.rb +0 -48
  134. data/spec/models/recognition_outcome_spec.rb +0 -48
  135. data/spec/models/text_detection_result_spec.rb +0 -54
  136. data/spec/models/text_item_spec.rb +0 -60
  137. data/spec/models/vehicle_license_plate_detection_result_spec.rb +0 -54
  138. data/spec/spec_helper.rb +0 -111
@@ -1,597 +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(['image/png'])
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(['image/png'])
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
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
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(['image/png'])
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
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
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(['image/png'])
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
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
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(['image/png'])
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
458
- # @param y
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
472
- # @param y
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
- # Rotate an image any number of degrees
536
- # Rotates an image by an arbitrary number of degrees
537
- # @param degrees Degrees to rotate the image; values range from 0.0 to 360.0.
538
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
539
- # @param [Hash] opts the optional parameters
540
- # @return [String]
541
- def edit_rotate(degrees, image_file, opts = {})
542
- data, _status_code, _headers = edit_rotate_with_http_info(degrees, image_file, opts)
543
- return data
544
- end
545
-
546
- # Rotate an image any number of degrees
547
- # Rotates an image by an arbitrary number of degrees
548
- # @param degrees Degrees to rotate the image; values range from 0.0 to 360.0.
549
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
550
- # @param [Hash] opts the optional parameters
551
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
552
- def edit_rotate_with_http_info(degrees, image_file, opts = {})
553
- if @api_client.config.debugging
554
- @api_client.config.logger.debug "Calling API: EditApi.edit_rotate ..."
555
- end
556
- # verify the required parameter 'degrees' is set
557
- if @api_client.config.client_side_validation && degrees.nil?
558
- fail ArgumentError, "Missing the required parameter 'degrees' when calling EditApi.edit_rotate"
559
- end
560
- # verify the required parameter 'image_file' is set
561
- if @api_client.config.client_side_validation && image_file.nil?
562
- fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_rotate"
563
- end
564
- # resource path
565
- local_var_path = "/image/edit/rotate/{degrees}/angle".sub('{' + 'degrees' + '}', degrees.to_s)
566
-
567
- # query parameters
568
- query_params = {}
569
-
570
- # header parameters
571
- header_params = {}
572
- # HTTP header 'Accept' (if needed)
573
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
574
- # HTTP header 'Content-Type'
575
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
576
-
577
- # form parameters
578
- form_params = {}
579
- form_params["imageFile"] = image_file
580
-
581
- # http body (model)
582
- post_body = nil
583
- auth_names = ['Apikey']
584
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
585
- :header_params => header_params,
586
- :query_params => query_params,
587
- :form_params => form_params,
588
- :body => post_body,
589
- :auth_names => auth_names,
590
- :return_type => 'String')
591
- if @api_client.config.debugging
592
- @api_client.config.logger.debug "API called: EditApi#edit_rotate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
593
- end
594
- return data, status_code, headers
595
- end
596
- end
597
- end