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 FaceApi
@@ -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
  # Compare and match faces
24
23
  # Find the faces in an input image, and compare against a reference image to determine if there is a match against the face in the reference image. The reference image (second parameter) should contain exactly one face.
25
24
  # @param input_image Image file to perform the operation on; this image can contain one or more faces which will be matched against face provided in the second image. Common file formats such as PNG, JPEG are supported.
@@ -28,7 +27,7 @@ module CloudmersiveImageRecognitionApiClient
28
27
  # @return [FaceCompareResponse]
29
28
  def face_compare(input_image, match_face, opts = {})
30
29
  data, _status_code, _headers = face_compare_with_http_info(input_image, match_face, opts)
31
- return data
30
+ data
32
31
  end
33
32
 
34
33
  # Compare and match faces
@@ -39,7 +38,7 @@ module CloudmersiveImageRecognitionApiClient
39
38
  # @return [Array<(FaceCompareResponse, Fixnum, Hash)>] FaceCompareResponse data, response status code and response headers
40
39
  def face_compare_with_http_info(input_image, match_face, opts = {})
41
40
  if @api_client.config.debugging
42
- @api_client.config.logger.debug "Calling API: FaceApi.face_compare ..."
41
+ @api_client.config.logger.debug 'Calling API: FaceApi.face_compare ...'
43
42
  end
44
43
  # verify the required parameter 'input_image' is set
45
44
  if @api_client.config.client_side_validation && input_image.nil?
@@ -50,7 +49,7 @@ module CloudmersiveImageRecognitionApiClient
50
49
  fail ArgumentError, "Missing the required parameter 'match_face' when calling FaceApi.face_compare"
51
50
  end
52
51
  # resource path
53
- local_var_path = "/image/face/compare-and-match"
52
+ local_var_path = '/image/face/compare-and-match'
54
53
 
55
54
  # query parameters
56
55
  query_params = {}
@@ -64,8 +63,8 @@ module CloudmersiveImageRecognitionApiClient
64
63
 
65
64
  # form parameters
66
65
  form_params = {}
67
- form_params["inputImage"] = input_image
68
- form_params["matchFace"] = match_face
66
+ form_params['inputImage'] = input_image
67
+ form_params['matchFace'] = match_face
69
68
 
70
69
  # http body (model)
71
70
  post_body = nil
@@ -82,7 +81,6 @@ module CloudmersiveImageRecognitionApiClient
82
81
  end
83
82
  return data, status_code, headers
84
83
  end
85
-
86
84
  # Crop image to face with square crop
87
85
  # Crop an image to the face (rectangular crop). If there is more than one face present, choose the first one.
88
86
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
@@ -90,7 +88,7 @@ module CloudmersiveImageRecognitionApiClient
90
88
  # @return [String]
91
89
  def face_crop_first(image_file, opts = {})
92
90
  data, _status_code, _headers = face_crop_first_with_http_info(image_file, opts)
93
- return data
91
+ data
94
92
  end
95
93
 
96
94
  # Crop image to face with square crop
@@ -100,14 +98,14 @@ module CloudmersiveImageRecognitionApiClient
100
98
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
101
99
  def face_crop_first_with_http_info(image_file, opts = {})
102
100
  if @api_client.config.debugging
103
- @api_client.config.logger.debug "Calling API: FaceApi.face_crop_first ..."
101
+ @api_client.config.logger.debug 'Calling API: FaceApi.face_crop_first ...'
104
102
  end
105
103
  # verify the required parameter 'image_file' is set
106
104
  if @api_client.config.client_side_validation && image_file.nil?
107
105
  fail ArgumentError, "Missing the required parameter 'image_file' when calling FaceApi.face_crop_first"
108
106
  end
109
107
  # resource path
110
- local_var_path = "/image/face/crop/first"
108
+ local_var_path = '/image/face/crop/first'
111
109
 
112
110
  # query parameters
113
111
  query_params = {}
@@ -121,7 +119,7 @@ module CloudmersiveImageRecognitionApiClient
121
119
 
122
120
  # form parameters
123
121
  form_params = {}
124
- form_params["imageFile"] = image_file
122
+ form_params['imageFile'] = image_file
125
123
 
126
124
  # http body (model)
127
125
  post_body = nil
@@ -138,7 +136,6 @@ module CloudmersiveImageRecognitionApiClient
138
136
  end
139
137
  return data, status_code, headers
140
138
  end
141
-
142
139
  # Crop image to face with round crop
143
140
  # Crop an image to the face (circular/round crop). If there is more than one face present, choose the first one.
144
141
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
@@ -146,7 +143,7 @@ module CloudmersiveImageRecognitionApiClient
146
143
  # @return [String]
147
144
  def face_crop_first_round(image_file, opts = {})
148
145
  data, _status_code, _headers = face_crop_first_round_with_http_info(image_file, opts)
149
- return data
146
+ data
150
147
  end
151
148
 
152
149
  # Crop image to face with round crop
@@ -156,14 +153,14 @@ module CloudmersiveImageRecognitionApiClient
156
153
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
157
154
  def face_crop_first_round_with_http_info(image_file, opts = {})
158
155
  if @api_client.config.debugging
159
- @api_client.config.logger.debug "Calling API: FaceApi.face_crop_first_round ..."
156
+ @api_client.config.logger.debug 'Calling API: FaceApi.face_crop_first_round ...'
160
157
  end
161
158
  # verify the required parameter 'image_file' is set
162
159
  if @api_client.config.client_side_validation && image_file.nil?
163
160
  fail ArgumentError, "Missing the required parameter 'image_file' when calling FaceApi.face_crop_first_round"
164
161
  end
165
162
  # resource path
166
- local_var_path = "/image/face/crop/first/round"
163
+ local_var_path = '/image/face/crop/first/round'
167
164
 
168
165
  # query parameters
169
166
  query_params = {}
@@ -177,7 +174,7 @@ module CloudmersiveImageRecognitionApiClient
177
174
 
178
175
  # form parameters
179
176
  form_params = {}
180
- form_params["imageFile"] = image_file
177
+ form_params['imageFile'] = image_file
181
178
 
182
179
  # http body (model)
183
180
  post_body = nil
@@ -194,7 +191,6 @@ module CloudmersiveImageRecognitionApiClient
194
191
  end
195
192
  return data, status_code, headers
196
193
  end
197
-
198
194
  # Detect the age of people in an image
199
195
  # Identify the age, position, and size of human faces in an image, along with a recognition confidence level. People in the image do NOT need to be facing the camera; they can be facing away, edge-on, etc.
200
196
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
@@ -202,7 +198,7 @@ module CloudmersiveImageRecognitionApiClient
202
198
  # @return [AgeDetectionResult]
203
199
  def face_detect_age(image_file, opts = {})
204
200
  data, _status_code, _headers = face_detect_age_with_http_info(image_file, opts)
205
- return data
201
+ data
206
202
  end
207
203
 
208
204
  # Detect the age of people in an image
@@ -212,14 +208,14 @@ module CloudmersiveImageRecognitionApiClient
212
208
  # @return [Array<(AgeDetectionResult, Fixnum, Hash)>] AgeDetectionResult data, response status code and response headers
213
209
  def face_detect_age_with_http_info(image_file, opts = {})
214
210
  if @api_client.config.debugging
215
- @api_client.config.logger.debug "Calling API: FaceApi.face_detect_age ..."
211
+ @api_client.config.logger.debug 'Calling API: FaceApi.face_detect_age ...'
216
212
  end
217
213
  # verify the required parameter 'image_file' is set
218
214
  if @api_client.config.client_side_validation && image_file.nil?
219
215
  fail ArgumentError, "Missing the required parameter 'image_file' when calling FaceApi.face_detect_age"
220
216
  end
221
217
  # resource path
222
- local_var_path = "/image/face/detect-age"
218
+ local_var_path = '/image/face/detect-age'
223
219
 
224
220
  # query parameters
225
221
  query_params = {}
@@ -233,7 +229,7 @@ module CloudmersiveImageRecognitionApiClient
233
229
 
234
230
  # form parameters
235
231
  form_params = {}
236
- form_params["imageFile"] = image_file
232
+ form_params['imageFile'] = image_file
237
233
 
238
234
  # http body (model)
239
235
  post_body = nil
@@ -250,7 +246,6 @@ module CloudmersiveImageRecognitionApiClient
250
246
  end
251
247
  return data, status_code, headers
252
248
  end
253
-
254
249
  # Detect the gender of people in an image
255
250
  # Identify the gender, position, and size of human faces in an image, along with a recognition confidence level. People in the image should be facing the camera.
256
251
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
@@ -258,7 +253,7 @@ module CloudmersiveImageRecognitionApiClient
258
253
  # @return [GenderDetectionResult]
259
254
  def face_detect_gender(image_file, opts = {})
260
255
  data, _status_code, _headers = face_detect_gender_with_http_info(image_file, opts)
261
- return data
256
+ data
262
257
  end
263
258
 
264
259
  # Detect the gender of people in an image
@@ -268,14 +263,14 @@ module CloudmersiveImageRecognitionApiClient
268
263
  # @return [Array<(GenderDetectionResult, Fixnum, Hash)>] GenderDetectionResult data, response status code and response headers
269
264
  def face_detect_gender_with_http_info(image_file, opts = {})
270
265
  if @api_client.config.debugging
271
- @api_client.config.logger.debug "Calling API: FaceApi.face_detect_gender ..."
266
+ @api_client.config.logger.debug 'Calling API: FaceApi.face_detect_gender ...'
272
267
  end
273
268
  # verify the required parameter 'image_file' is set
274
269
  if @api_client.config.client_side_validation && image_file.nil?
275
270
  fail ArgumentError, "Missing the required parameter 'image_file' when calling FaceApi.face_detect_gender"
276
271
  end
277
272
  # resource path
278
- local_var_path = "/image/face/detect-gender"
273
+ local_var_path = '/image/face/detect-gender'
279
274
 
280
275
  # query parameters
281
276
  query_params = {}
@@ -289,7 +284,7 @@ module CloudmersiveImageRecognitionApiClient
289
284
 
290
285
  # form parameters
291
286
  form_params = {}
292
- form_params["imageFile"] = image_file
287
+ form_params['imageFile'] = image_file
293
288
 
294
289
  # http body (model)
295
290
  post_body = nil
@@ -306,7 +301,6 @@ module CloudmersiveImageRecognitionApiClient
306
301
  end
307
302
  return data, status_code, headers
308
303
  end
309
-
310
304
  # Detect and find faces in an image
311
305
  # Locate the positions of all faces in an image
312
306
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
@@ -314,7 +308,7 @@ module CloudmersiveImageRecognitionApiClient
314
308
  # @return [FaceLocateResponse]
315
309
  def face_locate(image_file, opts = {})
316
310
  data, _status_code, _headers = face_locate_with_http_info(image_file, opts)
317
- return data
311
+ data
318
312
  end
319
313
 
320
314
  # Detect and find faces in an image
@@ -324,14 +318,14 @@ module CloudmersiveImageRecognitionApiClient
324
318
  # @return [Array<(FaceLocateResponse, Fixnum, Hash)>] FaceLocateResponse data, response status code and response headers
325
319
  def face_locate_with_http_info(image_file, opts = {})
326
320
  if @api_client.config.debugging
327
- @api_client.config.logger.debug "Calling API: FaceApi.face_locate ..."
321
+ @api_client.config.logger.debug 'Calling API: FaceApi.face_locate ...'
328
322
  end
329
323
  # verify the required parameter 'image_file' is set
330
324
  if @api_client.config.client_side_validation && image_file.nil?
331
325
  fail ArgumentError, "Missing the required parameter 'image_file' when calling FaceApi.face_locate"
332
326
  end
333
327
  # resource path
334
- local_var_path = "/image/face/locate"
328
+ local_var_path = '/image/face/locate'
335
329
 
336
330
  # query parameters
337
331
  query_params = {}
@@ -345,7 +339,7 @@ module CloudmersiveImageRecognitionApiClient
345
339
 
346
340
  # form parameters
347
341
  form_params = {}
348
- form_params["imageFile"] = image_file
342
+ form_params['imageFile'] = image_file
349
343
 
350
344
  # http body (model)
351
345
  post_body = nil
@@ -362,7 +356,6 @@ module CloudmersiveImageRecognitionApiClient
362
356
  end
363
357
  return data, status_code, headers
364
358
  end
365
-
366
359
  # Detect and find faces and landmarks eyes and nose and mouth in image
367
360
  # Locate the positions of all faces in an image, along with the eyes, eye brows, nose and mouth components of each
368
361
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
@@ -370,7 +363,7 @@ module CloudmersiveImageRecognitionApiClient
370
363
  # @return [FaceLocateWithLandmarksResponse]
371
364
  def face_locate_with_landmarks(image_file, opts = {})
372
365
  data, _status_code, _headers = face_locate_with_landmarks_with_http_info(image_file, opts)
373
- return data
366
+ data
374
367
  end
375
368
 
376
369
  # Detect and find faces and landmarks eyes and nose and mouth in image
@@ -380,14 +373,14 @@ module CloudmersiveImageRecognitionApiClient
380
373
  # @return [Array<(FaceLocateWithLandmarksResponse, Fixnum, Hash)>] FaceLocateWithLandmarksResponse data, response status code and response headers
381
374
  def face_locate_with_landmarks_with_http_info(image_file, opts = {})
382
375
  if @api_client.config.debugging
383
- @api_client.config.logger.debug "Calling API: FaceApi.face_locate_with_landmarks ..."
376
+ @api_client.config.logger.debug 'Calling API: FaceApi.face_locate_with_landmarks ...'
384
377
  end
385
378
  # verify the required parameter 'image_file' is set
386
379
  if @api_client.config.client_side_validation && image_file.nil?
387
380
  fail ArgumentError, "Missing the required parameter 'image_file' when calling FaceApi.face_locate_with_landmarks"
388
381
  end
389
382
  # resource path
390
- local_var_path = "/image/face/locate-with-landmarks"
383
+ local_var_path = '/image/face/locate-with-landmarks'
391
384
 
392
385
  # query parameters
393
386
  query_params = {}
@@ -401,7 +394,7 @@ module CloudmersiveImageRecognitionApiClient
401
394
 
402
395
  # form parameters
403
396
  form_params = {}
404
- form_params["imageFile"] = image_file
397
+ form_params['imageFile'] = image_file
405
398
 
406
399
  # http body (model)
407
400
  post_body = nil
@@ -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 FilterApi
@@ -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
  # Convert image to black-and-white grayscale
24
23
  # Remove color from the image by converting to a grayscale, black-and-white image
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 filter_black_and_white(image_file, opts = {})
29
28
  data, _status_code, _headers = filter_black_and_white_with_http_info(image_file, opts)
30
- return data
29
+ data
31
30
  end
32
31
 
33
32
  # Convert image to black-and-white grayscale
@@ -37,14 +36,14 @@ module CloudmersiveImageRecognitionApiClient
37
36
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
38
37
  def filter_black_and_white_with_http_info(image_file, opts = {})
39
38
  if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: FilterApi.filter_black_and_white ..."
39
+ @api_client.config.logger.debug 'Calling API: FilterApi.filter_black_and_white ...'
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 FilterApi.filter_black_and_white"
45
44
  end
46
45
  # resource path
47
- local_var_path = "/image/filter/black-and-white"
46
+ local_var_path = '/image/filter/black-and-white'
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
  # Despeckle to remove point noise from the image
80
78
  # Remove point noise / despeckle the input image
81
79
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
@@ -83,7 +81,7 @@ module CloudmersiveImageRecognitionApiClient
83
81
  # @return [String]
84
82
  def filter_despeckle(image_file, opts = {})
85
83
  data, _status_code, _headers = filter_despeckle_with_http_info(image_file, opts)
86
- return data
84
+ data
87
85
  end
88
86
 
89
87
  # Despeckle to remove point noise from the image
@@ -93,14 +91,14 @@ module CloudmersiveImageRecognitionApiClient
93
91
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
94
92
  def filter_despeckle_with_http_info(image_file, opts = {})
95
93
  if @api_client.config.debugging
96
- @api_client.config.logger.debug "Calling API: FilterApi.filter_despeckle ..."
94
+ @api_client.config.logger.debug 'Calling API: FilterApi.filter_despeckle ...'
97
95
  end
98
96
  # verify the required parameter 'image_file' is set
99
97
  if @api_client.config.client_side_validation && image_file.nil?
100
98
  fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_despeckle"
101
99
  end
102
100
  # resource path
103
- local_var_path = "/image/filter/despeckle"
101
+ local_var_path = '/image/filter/despeckle'
104
102
 
105
103
  # query parameters
106
104
  query_params = {}
@@ -114,7 +112,7 @@ module CloudmersiveImageRecognitionApiClient
114
112
 
115
113
  # form parameters
116
114
  form_params = {}
117
- form_params["imageFile"] = image_file
115
+ form_params['imageFile'] = image_file
118
116
 
119
117
  # http body (model)
120
118
  post_body = nil
@@ -131,7 +129,6 @@ module CloudmersiveImageRecognitionApiClient
131
129
  end
132
130
  return data, status_code, headers
133
131
  end
134
-
135
132
  # Detect and highlight edges in an image
136
133
  # Perform an edge detection operation on the input image
137
134
  # @param radius Radius in pixels of the edge detection operation; a larger radius will produce a greater effect
@@ -140,7 +137,7 @@ module CloudmersiveImageRecognitionApiClient
140
137
  # @return [String]
141
138
  def filter_edge_detect(radius, image_file, opts = {})
142
139
  data, _status_code, _headers = filter_edge_detect_with_http_info(radius, image_file, opts)
143
- return data
140
+ data
144
141
  end
145
142
 
146
143
  # Detect and highlight edges in an image
@@ -151,7 +148,7 @@ module CloudmersiveImageRecognitionApiClient
151
148
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
152
149
  def filter_edge_detect_with_http_info(radius, image_file, opts = {})
153
150
  if @api_client.config.debugging
154
- @api_client.config.logger.debug "Calling API: FilterApi.filter_edge_detect ..."
151
+ @api_client.config.logger.debug 'Calling API: FilterApi.filter_edge_detect ...'
155
152
  end
156
153
  # verify the required parameter 'radius' is set
157
154
  if @api_client.config.client_side_validation && radius.nil?
@@ -162,7 +159,7 @@ module CloudmersiveImageRecognitionApiClient
162
159
  fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_edge_detect"
163
160
  end
164
161
  # resource path
165
- local_var_path = "/image/filter/edge-detect/{radius}".sub('{' + 'radius' + '}', radius.to_s)
162
+ local_var_path = '/image/filter/edge-detect/{radius}'.sub('{' + 'radius' + '}', radius.to_s)
166
163
 
167
164
  # query parameters
168
165
  query_params = {}
@@ -176,7 +173,7 @@ module CloudmersiveImageRecognitionApiClient
176
173
 
177
174
  # form parameters
178
175
  form_params = {}
179
- form_params["imageFile"] = image_file
176
+ form_params['imageFile'] = image_file
180
177
 
181
178
  # http body (model)
182
179
  post_body = nil
@@ -193,7 +190,6 @@ module CloudmersiveImageRecognitionApiClient
193
190
  end
194
191
  return data, status_code, headers
195
192
  end
196
-
197
193
  # Emboss an image
198
194
  # Perform an emboss operation on the input image
199
195
  # @param radius Radius in pixels of the emboss operation; a larger radius will produce a greater effect
@@ -203,7 +199,7 @@ module CloudmersiveImageRecognitionApiClient
203
199
  # @return [String]
204
200
  def filter_emboss(radius, sigma, image_file, opts = {})
205
201
  data, _status_code, _headers = filter_emboss_with_http_info(radius, sigma, image_file, opts)
206
- return data
202
+ data
207
203
  end
208
204
 
209
205
  # Emboss an image
@@ -215,7 +211,7 @@ module CloudmersiveImageRecognitionApiClient
215
211
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
216
212
  def filter_emboss_with_http_info(radius, sigma, image_file, opts = {})
217
213
  if @api_client.config.debugging
218
- @api_client.config.logger.debug "Calling API: FilterApi.filter_emboss ..."
214
+ @api_client.config.logger.debug 'Calling API: FilterApi.filter_emboss ...'
219
215
  end
220
216
  # verify the required parameter 'radius' is set
221
217
  if @api_client.config.client_side_validation && radius.nil?
@@ -230,7 +226,7 @@ module CloudmersiveImageRecognitionApiClient
230
226
  fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_emboss"
231
227
  end
232
228
  # resource path
233
- local_var_path = "/image/filter/emboss/{radius}/{sigma}".sub('{' + 'radius' + '}', radius.to_s).sub('{' + 'sigma' + '}', sigma.to_s)
229
+ local_var_path = '/image/filter/emboss/{radius}/{sigma}'.sub('{' + 'radius' + '}', radius.to_s).sub('{' + 'sigma' + '}', sigma.to_s)
234
230
 
235
231
  # query parameters
236
232
  query_params = {}
@@ -244,7 +240,7 @@ module CloudmersiveImageRecognitionApiClient
244
240
 
245
241
  # form parameters
246
242
  form_params = {}
247
- form_params["imageFile"] = image_file
243
+ form_params['imageFile'] = image_file
248
244
 
249
245
  # http body (model)
250
246
  post_body = nil
@@ -261,7 +257,6 @@ module CloudmersiveImageRecognitionApiClient
261
257
  end
262
258
  return data, status_code, headers
263
259
  end
264
-
265
260
  # Perform a guassian blur on the input image
266
261
  # Perform a gaussian blur on the input image
267
262
  # @param radius Radius in pixels of the blur operation; a larger radius will produce a greater blur effect
@@ -271,7 +266,7 @@ module CloudmersiveImageRecognitionApiClient
271
266
  # @return [String]
272
267
  def filter_gaussian_blur(radius, sigma, image_file, opts = {})
273
268
  data, _status_code, _headers = filter_gaussian_blur_with_http_info(radius, sigma, image_file, opts)
274
- return data
269
+ data
275
270
  end
276
271
 
277
272
  # Perform a guassian blur on the input image
@@ -283,7 +278,7 @@ module CloudmersiveImageRecognitionApiClient
283
278
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
284
279
  def filter_gaussian_blur_with_http_info(radius, sigma, image_file, opts = {})
285
280
  if @api_client.config.debugging
286
- @api_client.config.logger.debug "Calling API: FilterApi.filter_gaussian_blur ..."
281
+ @api_client.config.logger.debug 'Calling API: FilterApi.filter_gaussian_blur ...'
287
282
  end
288
283
  # verify the required parameter 'radius' is set
289
284
  if @api_client.config.client_side_validation && radius.nil?
@@ -298,7 +293,7 @@ module CloudmersiveImageRecognitionApiClient
298
293
  fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_gaussian_blur"
299
294
  end
300
295
  # resource path
301
- local_var_path = "/image/filter/blur/guassian/{radius}/{sigma}".sub('{' + 'radius' + '}', radius.to_s).sub('{' + 'sigma' + '}', sigma.to_s)
296
+ local_var_path = '/image/filter/blur/guassian/{radius}/{sigma}'.sub('{' + 'radius' + '}', radius.to_s).sub('{' + 'sigma' + '}', sigma.to_s)
302
297
 
303
298
  # query parameters
304
299
  query_params = {}
@@ -312,7 +307,7 @@ module CloudmersiveImageRecognitionApiClient
312
307
 
313
308
  # form parameters
314
309
  form_params = {}
315
- form_params["imageFile"] = image_file
310
+ form_params['imageFile'] = image_file
316
311
 
317
312
  # http body (model)
318
313
  post_body = nil
@@ -329,7 +324,6 @@ module CloudmersiveImageRecognitionApiClient
329
324
  end
330
325
  return data, status_code, headers
331
326
  end
332
-
333
327
  # Perform a motion blur on the input image
334
328
  # Perform a motion blur on the input image at a specific angle
335
329
  # @param radius Radius in pixels of the blur operation; a larger radius will produce a greater blur effect
@@ -340,7 +334,7 @@ module CloudmersiveImageRecognitionApiClient
340
334
  # @return [String]
341
335
  def filter_motion_blur(radius, sigma, angle, image_file, opts = {})
342
336
  data, _status_code, _headers = filter_motion_blur_with_http_info(radius, sigma, angle, image_file, opts)
343
- return data
337
+ data
344
338
  end
345
339
 
346
340
  # Perform a motion blur on the input image
@@ -353,7 +347,7 @@ module CloudmersiveImageRecognitionApiClient
353
347
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
354
348
  def filter_motion_blur_with_http_info(radius, sigma, angle, image_file, opts = {})
355
349
  if @api_client.config.debugging
356
- @api_client.config.logger.debug "Calling API: FilterApi.filter_motion_blur ..."
350
+ @api_client.config.logger.debug 'Calling API: FilterApi.filter_motion_blur ...'
357
351
  end
358
352
  # verify the required parameter 'radius' is set
359
353
  if @api_client.config.client_side_validation && radius.nil?
@@ -372,7 +366,7 @@ module CloudmersiveImageRecognitionApiClient
372
366
  fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_motion_blur"
373
367
  end
374
368
  # resource path
375
- local_var_path = "/image/filter/blur/motion/{radius}/{sigma}/{angle}".sub('{' + 'radius' + '}', radius.to_s).sub('{' + 'sigma' + '}', sigma.to_s).sub('{' + 'angle' + '}', angle.to_s)
369
+ local_var_path = '/image/filter/blur/motion/{radius}/{sigma}/{angle}'.sub('{' + 'radius' + '}', radius.to_s).sub('{' + 'sigma' + '}', sigma.to_s).sub('{' + 'angle' + '}', angle.to_s)
376
370
 
377
371
  # query parameters
378
372
  query_params = {}
@@ -386,7 +380,7 @@ module CloudmersiveImageRecognitionApiClient
386
380
 
387
381
  # form parameters
388
382
  form_params = {}
389
- form_params["imageFile"] = image_file
383
+ form_params['imageFile'] = image_file
390
384
 
391
385
  # http body (model)
392
386
  post_body = nil
@@ -403,7 +397,6 @@ module CloudmersiveImageRecognitionApiClient
403
397
  end
404
398
  return data, status_code, headers
405
399
  end
406
-
407
400
  # Posterize the image by reducing distinct colors
408
401
  # Reduce the unique number of colors in the image to the specified level
409
402
  # @param levels Number of unique colors to retain in the output image
@@ -412,7 +405,7 @@ module CloudmersiveImageRecognitionApiClient
412
405
  # @return [String]
413
406
  def filter_posterize(levels, image_file, opts = {})
414
407
  data, _status_code, _headers = filter_posterize_with_http_info(levels, image_file, opts)
415
- return data
408
+ data
416
409
  end
417
410
 
418
411
  # Posterize the image by reducing distinct colors
@@ -423,7 +416,7 @@ module CloudmersiveImageRecognitionApiClient
423
416
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
424
417
  def filter_posterize_with_http_info(levels, image_file, opts = {})
425
418
  if @api_client.config.debugging
426
- @api_client.config.logger.debug "Calling API: FilterApi.filter_posterize ..."
419
+ @api_client.config.logger.debug 'Calling API: FilterApi.filter_posterize ...'
427
420
  end
428
421
  # verify the required parameter 'levels' is set
429
422
  if @api_client.config.client_side_validation && levels.nil?
@@ -434,7 +427,7 @@ module CloudmersiveImageRecognitionApiClient
434
427
  fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_posterize"
435
428
  end
436
429
  # resource path
437
- local_var_path = "/image/filter/posterize"
430
+ local_var_path = '/image/filter/posterize'
438
431
 
439
432
  # query parameters
440
433
  query_params = {}
@@ -449,7 +442,7 @@ module CloudmersiveImageRecognitionApiClient
449
442
 
450
443
  # form parameters
451
444
  form_params = {}
452
- form_params["imageFile"] = image_file
445
+ form_params['imageFile'] = image_file
453
446
 
454
447
  # http body (model)
455
448
  post_body = nil
@@ -466,7 +459,6 @@ module CloudmersiveImageRecognitionApiClient
466
459
  end
467
460
  return data, status_code, headers
468
461
  end
469
-
470
462
  # Swirl distort the image
471
463
  # Swirl distort the image by the specified number of degrees
472
464
  # @param degrees Degrees of swirl
@@ -475,7 +467,7 @@ module CloudmersiveImageRecognitionApiClient
475
467
  # @return [String]
476
468
  def filter_swirl(degrees, image_file, opts = {})
477
469
  data, _status_code, _headers = filter_swirl_with_http_info(degrees, image_file, opts)
478
- return data
470
+ data
479
471
  end
480
472
 
481
473
  # Swirl distort the image
@@ -486,7 +478,7 @@ module CloudmersiveImageRecognitionApiClient
486
478
  # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
487
479
  def filter_swirl_with_http_info(degrees, image_file, opts = {})
488
480
  if @api_client.config.debugging
489
- @api_client.config.logger.debug "Calling API: FilterApi.filter_swirl ..."
481
+ @api_client.config.logger.debug 'Calling API: FilterApi.filter_swirl ...'
490
482
  end
491
483
  # verify the required parameter 'degrees' is set
492
484
  if @api_client.config.client_side_validation && degrees.nil?
@@ -497,7 +489,7 @@ module CloudmersiveImageRecognitionApiClient
497
489
  fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_swirl"
498
490
  end
499
491
  # resource path
500
- local_var_path = "/image/filter/swirl"
492
+ local_var_path = '/image/filter/swirl'
501
493
 
502
494
  # query parameters
503
495
  query_params = {}
@@ -512,7 +504,7 @@ module CloudmersiveImageRecognitionApiClient
512
504
 
513
505
  # form parameters
514
506
  form_params = {}
515
- form_params["imageFile"] = image_file
507
+ form_params['imageFile'] = image_file
516
508
 
517
509
  # http body (model)
518
510
  post_body = nil