Class: Uploadcare::Client::AddonsClient
- Inherits:
-
RestClient
- Object
- ApiStruct::Client
- RestClient
- Uploadcare::Client::AddonsClient
- Defined in:
- lib/uploadcare/client/addons_client.rb
Overview
API client for handling uploaded files
Instance Method Summary collapse
-
#remove_bg(uuid, params = {}) ⇒ Object
Execute remove.bg background image removal Add-On for a given target.
-
#remove_bg_status(uuid) ⇒ Object
Check the status of an Add-On execution request that had been started using the Execute Add-On operation.
-
#uc_clamav_virus_scan(uuid, params = {}) ⇒ Object
Execute ClamAV virus checking Add-On for a given target.
-
#uc_clamav_virus_scan_status(uuid) ⇒ Object
Check the status of an Add-On execution request that had been started using the Execute Add-On operation.
-
#ws_rekognition_detect_labels(uuid) ⇒ Object
Execute AWS Rekognition Add-On for a given target to detect labels in an image.
-
#ws_rekognition_detect_labels_status(uuid) ⇒ Object
Check the status of an Add-On execution request that had been started using the Execute Add-On operation.
-
#ws_rekognition_detect_moderation_labels(uuid) ⇒ Object
Execute AWS Rekognition Moderation Add-On for a given target to detect labels in an image.
-
#ws_rekognition_detect_moderation_labels_status(uuid) ⇒ Object
Check the status of an Add-On execution request that had been started using the Execute Add-On operation.
Methods inherited from RestClient
#api_root, #api_struct_delete, #api_struct_get, #api_struct_post, #api_struct_put, #delete, #get, #headers, #post, #put, #request
Methods included from Uploadcare::Concerns::ThrottleHandler
Methods included from Uploadcare::Concerns::ErrorHandler
Instance Method Details
#remove_bg(uuid, params = {}) ⇒ Object
Execute remove.bg background image removal Add-On for a given target.
38 39 40 41 |
# File 'lib/uploadcare/client/addons_client.rb', line 38 def remove_bg(uuid, params = {}) content = { target: uuid, params: params }.to_json post(uri: '/addons/remove_bg/execute/', content: content) end |
#remove_bg_status(uuid) ⇒ Object
Check the status of an Add-On execution request that had been started using the Execute Add-On operation.
45 46 47 |
# File 'lib/uploadcare/client/addons_client.rb', line 45 def remove_bg_status(uuid) get(uri: "/addons/remove_bg/execute/status/#{query_params(uuid)}") end |
#uc_clamav_virus_scan(uuid, params = {}) ⇒ Object
Execute ClamAV virus checking Add-On for a given target.
12 13 14 15 |
# File 'lib/uploadcare/client/addons_client.rb', line 12 def uc_clamav_virus_scan(uuid, params = {}) content = { target: uuid, params: params }.to_json post(uri: '/addons/uc_clamav_virus_scan/execute/', content: content) end |
#uc_clamav_virus_scan_status(uuid) ⇒ Object
Check the status of an Add-On execution request that had been started using the Execute Add-On operation.
19 20 21 |
# File 'lib/uploadcare/client/addons_client.rb', line 19 def uc_clamav_virus_scan_status(uuid) get(uri: "/addons/uc_clamav_virus_scan/execute/status/#{query_params(uuid)}") end |
#ws_rekognition_detect_labels(uuid) ⇒ Object
Execute AWS Rekognition Add-On for a given target to detect labels in an image.
25 26 27 28 |
# File 'lib/uploadcare/client/addons_client.rb', line 25 def ws_rekognition_detect_labels(uuid) content = { target: uuid }.to_json post(uri: '/addons/aws_rekognition_detect_labels/execute/', content: content) end |
#ws_rekognition_detect_labels_status(uuid) ⇒ Object
Check the status of an Add-On execution request that had been started using the Execute Add-On operation.
32 33 34 |
# File 'lib/uploadcare/client/addons_client.rb', line 32 def ws_rekognition_detect_labels_status(uuid) get(uri: "/addons/aws_rekognition_detect_labels/execute/status/#{query_params(uuid)}") end |
#ws_rekognition_detect_moderation_labels(uuid) ⇒ Object
Execute AWS Rekognition Moderation Add-On for a given target to detect labels in an image.
51 52 53 54 |
# File 'lib/uploadcare/client/addons_client.rb', line 51 def ws_rekognition_detect_moderation_labels(uuid) content = { target: uuid }.to_json post(uri: '/addons/aws_rekognition_detect_moderation_labels/execute/', content: content) end |
#ws_rekognition_detect_moderation_labels_status(uuid) ⇒ Object
Check the status of an Add-On execution request that had been started using the Execute Add-On operation.
58 59 60 |
# File 'lib/uploadcare/client/addons_client.rb', line 58 def ws_rekognition_detect_moderation_labels_status(uuid) get(uri: "/addons/aws_rekognition_detect_moderation_labels/execute/status/#{query_params(uuid)}") end |