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

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 (129) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -19
  3. data/cloudmersive-image-recognition-api-client.gemspec +1 -1
  4. data/docs/AgeDetectionResult.md +1 -1
  5. data/docs/AiImageDetectionApi.md +63 -0
  6. data/docs/ConvertApi.md +58 -3
  7. data/docs/FaceApi.md +4 -4
  8. data/docs/FineTextItem.md +1 -0
  9. data/docs/ImageAiDetectionResult.md +10 -0
  10. data/docs/ImageSimilarityComparisonResponse.md +10 -0
  11. data/docs/ImageSimilarityHashDistanceRequest.md +9 -0
  12. data/docs/ImageSimilarityHashDistanceResponse.md +9 -0
  13. data/docs/ImageSimilarityHashResponse.md +9 -0
  14. data/docs/NsfwAdvancedResult.md +19 -0
  15. data/docs/NsfwApi.md +169 -4
  16. data/docs/PersonWithAge.md +4 -1
  17. data/docs/RecognizeApi.md +124 -58
  18. data/docs/ResizeApi.md +55 -0
  19. data/docs/TextItem.md +1 -0
  20. data/lib/cloudmersive-image-recognition-api-client/api/ai_image_detection_api.rb +78 -0
  21. data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +1 -1
  22. data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +58 -3
  23. data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +1 -1
  24. data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +8 -8
  25. data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +1 -1
  26. data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +1 -1
  27. data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +170 -5
  28. data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +171 -104
  29. data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +56 -1
  30. data/lib/cloudmersive-image-recognition-api-client/api/text_generation_api.rb +1 -1
  31. data/lib/cloudmersive-image-recognition-api-client/api_client.rb +1 -1
  32. data/lib/cloudmersive-image-recognition-api-client/api_error.rb +1 -1
  33. data/lib/cloudmersive-image-recognition-api-client/configuration.rb +1 -1
  34. data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +3 -3
  35. data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +1 -1
  36. data/lib/cloudmersive-image-recognition-api-client/models/create_handwriting_request.rb +1 -1
  37. data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +1 -1
  38. data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +1 -1
  39. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +1 -1
  40. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +1 -1
  41. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +1 -1
  42. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +1 -1
  43. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +1 -1
  44. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +1 -1
  45. data/lib/cloudmersive-image-recognition-api-client/models/face.rb +1 -1
  46. data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +1 -1
  47. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +1 -1
  48. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +1 -1
  49. data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +1 -1
  50. data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +1 -1
  51. data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +1 -1
  52. data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +1 -1
  53. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +1 -1
  54. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +12 -2
  55. data/lib/cloudmersive-image-recognition-api-client/models/{person_with_gender.rb → image_ai_detection_result.rb} +25 -25
  56. data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +1 -1
  57. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +1 -1
  58. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata_exif_value.rb +1 -1
  59. data/lib/cloudmersive-image-recognition-api-client/models/{detected_object.rb → image_similarity_comparison_response.rb} +25 -55
  60. data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_distance_request.rb +196 -0
  61. data/lib/cloudmersive-image-recognition-api-client/models/{object_detection_result.rb → image_similarity_hash_distance_response.rb} +12 -24
  62. data/lib/cloudmersive-image-recognition-api-client/models/{gender_detection_result.rb → image_similarity_hash_response.rb} +12 -24
  63. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_advanced_result.rb +296 -0
  64. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +1 -1
  65. data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +36 -5
  66. data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +1 -1
  67. data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +1 -1
  68. data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +1 -1
  69. data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +12 -2
  70. data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +1 -1
  71. data/lib/cloudmersive-image-recognition-api-client/version.rb +2 -2
  72. data/lib/cloudmersive-image-recognition-api-client.rb +8 -5
  73. data/spec/api/ai_image_detection_api_spec.rb +47 -0
  74. data/spec/api/artistic_api_spec.rb +1 -1
  75. data/spec/api/convert_api_spec.rb +14 -2
  76. data/spec/api/edit_api_spec.rb +1 -1
  77. data/spec/api/face_api_spec.rb +4 -4
  78. data/spec/api/filter_api_spec.rb +1 -1
  79. data/spec/api/info_api_spec.rb +1 -1
  80. data/spec/api/nsfw_api_spec.rb +39 -3
  81. data/spec/api/recognize_api_spec.rb +40 -25
  82. data/spec/api/resize_api_spec.rb +13 -1
  83. data/spec/api/text_generation_api_spec.rb +1 -1
  84. data/spec/api_client_spec.rb +1 -1
  85. data/spec/configuration_spec.rb +1 -1
  86. data/spec/models/age_detection_result_spec.rb +1 -1
  87. data/spec/models/color_result_spec.rb +1 -1
  88. data/spec/models/create_handwriting_request_spec.rb +1 -1
  89. data/spec/models/detected_license_plate_spec.rb +1 -1
  90. data/spec/models/dominant_color_result_spec.rb +1 -1
  91. data/spec/models/draw_polygon_instance_spec.rb +1 -1
  92. data/spec/models/draw_polygon_request_spec.rb +1 -1
  93. data/spec/models/draw_rectangle_instance_spec.rb +1 -1
  94. data/spec/models/draw_rectangle_request_spec.rb +1 -1
  95. data/spec/models/draw_text_instance_spec.rb +1 -1
  96. data/spec/models/draw_text_request_spec.rb +1 -1
  97. data/spec/models/face_compare_response_spec.rb +1 -1
  98. data/spec/models/face_locate_response_spec.rb +1 -1
  99. data/spec/models/face_locate_with_landmarks_response_spec.rb +1 -1
  100. data/spec/models/face_match_spec.rb +1 -1
  101. data/spec/models/face_point_spec.rb +1 -1
  102. data/spec/models/face_spec.rb +1 -1
  103. data/spec/models/face_with_landmarks_spec.rb +1 -1
  104. data/spec/models/find_symbol_result_spec.rb +1 -1
  105. data/spec/models/fine_text_detection_result_spec.rb +1 -1
  106. data/spec/models/fine_text_item_spec.rb +7 -1
  107. data/spec/models/{person_with_gender_spec.rb → image_ai_detection_result_spec.rb} +10 -10
  108. data/spec/models/image_description_response_spec.rb +1 -1
  109. data/spec/models/image_metadata_exif_value_spec.rb +1 -1
  110. data/spec/models/image_metadata_spec.rb +1 -1
  111. data/spec/models/{gender_detection_result_spec.rb → image_similarity_comparison_response_spec.rb} +9 -9
  112. data/spec/models/image_similarity_hash_distance_request_spec.rb +47 -0
  113. data/spec/models/{object_detection_result_spec.rb → image_similarity_hash_distance_response_spec.rb} +8 -14
  114. data/spec/models/image_similarity_hash_response_spec.rb +47 -0
  115. data/spec/models/nsfw_advanced_result_spec.rb +107 -0
  116. data/spec/models/nsfw_result_spec.rb +1 -1
  117. data/spec/models/person_with_age_spec.rb +19 -1
  118. data/spec/models/polygon_point_spec.rb +1 -1
  119. data/spec/models/recognition_outcome_spec.rb +1 -1
  120. data/spec/models/text_detection_result_spec.rb +1 -1
  121. data/spec/models/text_item_spec.rb +7 -1
  122. data/spec/models/vehicle_license_plate_detection_result_spec.rb +1 -1
  123. data/spec/spec_helper.rb +1 -1
  124. metadata +39 -30
  125. data/docs/DetectedObject.md +0 -13
  126. data/docs/GenderDetectionResult.md +0 -10
  127. data/docs/ObjectDetectionResult.md +0 -10
  128. data/docs/PersonWithGender.md +0 -10
  129. data/spec/models/detected_object_spec.rb +0 -71
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #imageapi
3
3
 
4
- #Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
4
+ #Image Recognition and Processing APIs let you use Artificial Intelligence and Machine Learning to recognize and process images, and also perform useful image modification operations.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -192,7 +192,7 @@ module CloudmersiveImageRecognitionApiClient
192
192
  return data, status_code, headers
193
193
  end
194
194
  # Detect the age of people in an image
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.
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. Input image should be a PNG or JPG. Consumes 20 API calls.
196
196
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
197
197
  # @param [Hash] opts the optional parameters
198
198
  # @return [AgeDetectionResult]
@@ -202,7 +202,7 @@ module CloudmersiveImageRecognitionApiClient
202
202
  end
203
203
 
204
204
  # Detect the age of people in an image
205
- # 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.
205
+ # 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. Input image should be a PNG or JPG. Consumes 20 API calls.
206
206
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
207
207
  # @param [Hash] opts the optional parameters
208
208
  # @return [Array<(AgeDetectionResult, Fixnum, Hash)>] AgeDetectionResult data, response status code and response headers
@@ -247,20 +247,20 @@ module CloudmersiveImageRecognitionApiClient
247
247
  return data, status_code, headers
248
248
  end
249
249
  # Detect the gender of people in an image
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.
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. Input image should be a PNG or JPG. Consumes 20 API calls.
251
251
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
252
252
  # @param [Hash] opts the optional parameters
253
- # @return [GenderDetectionResult]
253
+ # @return [AgeDetectionResult]
254
254
  def face_detect_gender(image_file, opts = {})
255
255
  data, _status_code, _headers = face_detect_gender_with_http_info(image_file, opts)
256
256
  data
257
257
  end
258
258
 
259
259
  # Detect the gender of people in an image
260
- # 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.
260
+ # 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. Input image should be a PNG or JPG. Consumes 20 API calls.
261
261
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
262
262
  # @param [Hash] opts the optional parameters
263
- # @return [Array<(GenderDetectionResult, Fixnum, Hash)>] GenderDetectionResult data, response status code and response headers
263
+ # @return [Array<(AgeDetectionResult, Fixnum, Hash)>] AgeDetectionResult data, response status code and response headers
264
264
  def face_detect_gender_with_http_info(image_file, opts = {})
265
265
  if @api_client.config.debugging
266
266
  @api_client.config.logger.debug 'Calling API: FaceApi.face_detect_gender ...'
@@ -295,7 +295,7 @@ module CloudmersiveImageRecognitionApiClient
295
295
  :form_params => form_params,
296
296
  :body => post_body,
297
297
  :auth_names => auth_names,
298
- :return_type => 'GenderDetectionResult')
298
+ :return_type => 'AgeDetectionResult')
299
299
  if @api_client.config.debugging
300
300
  @api_client.config.logger.debug "API called: FaceApi#face_detect_gender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
301
301
  end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #imageapi
3
3
 
4
- #Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
4
+ #Image Recognition and Processing APIs let you use Artificial Intelligence and Machine Learning to recognize and process images, and also perform useful image modification operations.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #imageapi
3
3
 
4
- #Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
4
+ #Image Recognition and Processing APIs let you use Artificial Intelligence and Machine Learning to recognize and process images, and also perform useful image modification operations.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #imageapi
3
3
 
4
- #Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
4
+ #Image Recognition and Processing APIs let you use Artificial Intelligence and Machine Learning to recognize and process images, and also perform useful image modification operations.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -19,8 +19,8 @@ module CloudmersiveImageRecognitionApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Not safe for work NSFW racy content classification
23
- # Classify an image into Not Safe For Work (NSFW)/Porn/Racy content and Safe Content.
22
+ # Not safe for work (NSFW) content classification for Images
23
+ # Classify an image into Not Safe For Work (NSFW)/Pornographic/Nudity/Racy content and Safe Content. Helpful for filtering out unsafe content when processing user images. Input image should be JPG, PNG or GIF. Consumes 20 API calls.
24
24
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [NsfwResult]
@@ -29,8 +29,8 @@ module CloudmersiveImageRecognitionApiClient
29
29
  data
30
30
  end
31
31
 
32
- # Not safe for work NSFW racy content classification
33
- # Classify an image into Not Safe For Work (NSFW)/Porn/Racy content and Safe Content.
32
+ # Not safe for work (NSFW) content classification for Images
33
+ # Classify an image into Not Safe For Work (NSFW)/Pornographic/Nudity/Racy content and Safe Content. Helpful for filtering out unsafe content when processing user images. Input image should be JPG, PNG or GIF. Consumes 20 API calls.
34
34
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(NsfwResult, Fixnum, Hash)>] NsfwResult data, response status code and response headers
@@ -74,5 +74,170 @@ module CloudmersiveImageRecognitionApiClient
74
74
  end
75
75
  return data, status_code, headers
76
76
  end
77
+ # Advanced content moderation and not safe for work (NSFW) content classification for Images
78
+ # Uses advanced AI to classify an image into Not Safe For Work (NSFW) or not and determine if it contains nudity, graphic violence, non-graphic violence, self-harm, hate, potential illegal activity, medical imagery, or profanity. Helpful for filtering out unsafe content when processing user images. Input image should be JPG, PNG. Consumes 100 API calls. Requires Managed Instance or Private Cloud deployment, and a GPU.
79
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
80
+ # @param [Hash] opts the optional parameters
81
+ # @return [NsfwAdvancedResult]
82
+ def nsfw_classify_advanced(image_file, opts = {})
83
+ data, _status_code, _headers = nsfw_classify_advanced_with_http_info(image_file, opts)
84
+ data
85
+ end
86
+
87
+ # Advanced content moderation and not safe for work (NSFW) content classification for Images
88
+ # Uses advanced AI to classify an image into Not Safe For Work (NSFW) or not and determine if it contains nudity, graphic violence, non-graphic violence, self-harm, hate, potential illegal activity, medical imagery, or profanity. Helpful for filtering out unsafe content when processing user images. Input image should be JPG, PNG. Consumes 100 API calls. Requires Managed Instance or Private Cloud deployment, and a GPU.
89
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [Array<(NsfwAdvancedResult, Fixnum, Hash)>] NsfwAdvancedResult data, response status code and response headers
92
+ def nsfw_classify_advanced_with_http_info(image_file, opts = {})
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug 'Calling API: NsfwApi.nsfw_classify_advanced ...'
95
+ end
96
+ # verify the required parameter 'image_file' is set
97
+ if @api_client.config.client_side_validation && image_file.nil?
98
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling NsfwApi.nsfw_classify_advanced"
99
+ end
100
+ # resource path
101
+ local_var_path = '/image/nsfw/classify/advanced'
102
+
103
+ # query parameters
104
+ query_params = {}
105
+
106
+ # header parameters
107
+ header_params = {}
108
+ # HTTP header 'Accept' (if needed)
109
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
110
+ # HTTP header 'Content-Type'
111
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
112
+
113
+ # form parameters
114
+ form_params = {}
115
+ form_params['imageFile'] = image_file
116
+
117
+ # http body (model)
118
+ post_body = nil
119
+ auth_names = ['Apikey']
120
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
121
+ :header_params => header_params,
122
+ :query_params => query_params,
123
+ :form_params => form_params,
124
+ :body => post_body,
125
+ :auth_names => auth_names,
126
+ :return_type => 'NsfwAdvancedResult')
127
+ if @api_client.config.debugging
128
+ @api_client.config.logger.debug "API called: NsfwApi#nsfw_classify_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
129
+ end
130
+ return data, status_code, headers
131
+ end
132
+ # Not safe for work (NSFW) content classification for Documents
133
+ # Classify a document (PDF, DOCX, DOC, XLSX, XLS, PPTX, PPT) into Not Safe For Work (NSFW)/Pornographic/Nudity/Racy content and Safe Content. Helpful for filtering out unsafe content when processing user images. Consumes 20 API calls per image.
134
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
135
+ # @param [Hash] opts the optional parameters
136
+ # @return [NsfwResult]
137
+ def nsfw_classify_document(image_file, opts = {})
138
+ data, _status_code, _headers = nsfw_classify_document_with_http_info(image_file, opts)
139
+ data
140
+ end
141
+
142
+ # Not safe for work (NSFW) content classification for Documents
143
+ # Classify a document (PDF, DOCX, DOC, XLSX, XLS, PPTX, PPT) into Not Safe For Work (NSFW)/Pornographic/Nudity/Racy content and Safe Content. Helpful for filtering out unsafe content when processing user images. Consumes 20 API calls per image.
144
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
145
+ # @param [Hash] opts the optional parameters
146
+ # @return [Array<(NsfwResult, Fixnum, Hash)>] NsfwResult data, response status code and response headers
147
+ def nsfw_classify_document_with_http_info(image_file, opts = {})
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug 'Calling API: NsfwApi.nsfw_classify_document ...'
150
+ end
151
+ # verify the required parameter 'image_file' is set
152
+ if @api_client.config.client_side_validation && image_file.nil?
153
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling NsfwApi.nsfw_classify_document"
154
+ end
155
+ # resource path
156
+ local_var_path = '/image/nsfw/classify/document'
157
+
158
+ # query parameters
159
+ query_params = {}
160
+
161
+ # header parameters
162
+ header_params = {}
163
+ # HTTP header 'Accept' (if needed)
164
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
165
+ # HTTP header 'Content-Type'
166
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
167
+
168
+ # form parameters
169
+ form_params = {}
170
+ form_params['imageFile'] = image_file
171
+
172
+ # http body (model)
173
+ post_body = nil
174
+ auth_names = ['Apikey']
175
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
176
+ :header_params => header_params,
177
+ :query_params => query_params,
178
+ :form_params => form_params,
179
+ :body => post_body,
180
+ :auth_names => auth_names,
181
+ :return_type => 'NsfwResult')
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug "API called: NsfwApi#nsfw_classify_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
184
+ end
185
+ return data, status_code, headers
186
+ end
187
+ # Not safe for work (NSFW) content classification for Video
188
+ # Classify a video into Not Safe For Work (NSFW)/Pornographic/Nudity/Racy content and Safe Content. Helpful for filtering out unsafe content when processing user images. Input image should be MP4, MOV, WEBM, MKV, AVI, FLV, MPG, GIF. Consumes 20 API calls per frame analyzed. Requires Cloudmersive Managed Instance or Private Cloud deployment.
189
+ # @param video_file Video file to perform the operation on. Common file formats such as MP4, MPG are supported.
190
+ # @param [Hash] opts the optional parameters
191
+ # @return [NsfwResult]
192
+ def nsfw_classify_video(video_file, opts = {})
193
+ data, _status_code, _headers = nsfw_classify_video_with_http_info(video_file, opts)
194
+ data
195
+ end
196
+
197
+ # Not safe for work (NSFW) content classification for Video
198
+ # Classify a video into Not Safe For Work (NSFW)/Pornographic/Nudity/Racy content and Safe Content. Helpful for filtering out unsafe content when processing user images. Input image should be MP4, MOV, WEBM, MKV, AVI, FLV, MPG, GIF. Consumes 20 API calls per frame analyzed. Requires Cloudmersive Managed Instance or Private Cloud deployment.
199
+ # @param video_file Video file to perform the operation on. Common file formats such as MP4, MPG are supported.
200
+ # @param [Hash] opts the optional parameters
201
+ # @return [Array<(NsfwResult, Fixnum, Hash)>] NsfwResult data, response status code and response headers
202
+ def nsfw_classify_video_with_http_info(video_file, opts = {})
203
+ if @api_client.config.debugging
204
+ @api_client.config.logger.debug 'Calling API: NsfwApi.nsfw_classify_video ...'
205
+ end
206
+ # verify the required parameter 'video_file' is set
207
+ if @api_client.config.client_side_validation && video_file.nil?
208
+ fail ArgumentError, "Missing the required parameter 'video_file' when calling NsfwApi.nsfw_classify_video"
209
+ end
210
+ # resource path
211
+ local_var_path = '/image/nsfw/classify/video'
212
+
213
+ # query parameters
214
+ query_params = {}
215
+
216
+ # header parameters
217
+ header_params = {}
218
+ # HTTP header 'Accept' (if needed)
219
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
220
+ # HTTP header 'Content-Type'
221
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
222
+
223
+ # form parameters
224
+ form_params = {}
225
+ form_params['videoFile'] = video_file
226
+
227
+ # http body (model)
228
+ post_body = nil
229
+ auth_names = ['Apikey']
230
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
231
+ :header_params => header_params,
232
+ :query_params => query_params,
233
+ :form_params => form_params,
234
+ :body => post_body,
235
+ :auth_names => auth_names,
236
+ :return_type => 'NsfwResult')
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug "API called: NsfwApi#nsfw_classify_video\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
239
+ end
240
+ return data, status_code, headers
241
+ end
77
242
  end
78
243
  end