Class: ModerationAPI::Resources::Actions::Execute
- Inherits:
-
Object
- Object
- ModerationAPI::Resources::Actions::Execute
- Defined in:
- lib/moderation_api/resources/actions/execute.rb
Instance Method Summary collapse
-
#execute(action_key:, author_ids: nil, content_ids: nil, duration: nil, queue_id: nil, value: nil, request_options: {}) ⇒ ModerationAPI::Models::Actions::ExecuteExecuteResponse
Execute a moderation action on one or more content items.
- #execute_by_id(action_id, author_ids: nil, content_ids: nil, queue_id: nil, value: nil, request_options: {}) ⇒ ModerationAPI::Models::Actions::ExecuteExecuteByIDResponse deprecated Deprecated.
-
#initialize(client:) ⇒ Execute
constructor
private
A new instance of Execute.
Constructor Details
#initialize(client:) ⇒ Execute
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Execute.
74 75 76 |
# File 'lib/moderation_api/resources/actions/execute.rb', line 74 def initialize(client:) @client = client end |
Instance Method Details
#execute(action_key:, author_ids: nil, content_ids: nil, duration: nil, queue_id: nil, value: nil, request_options: {}) ⇒ ModerationAPI::Models::Actions::ExecuteExecuteResponse
Execute a moderation action on one or more content items.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/moderation_api/resources/actions/execute.rb', line 28 def execute(params) parsed, = ModerationAPI::Actions::ExecuteExecuteParams.dump_request(params) @client.request( method: :post, path: "actions/execute", body: parsed, model: ModerationAPI::Models::Actions::ExecuteExecuteResponse, options: ) end |
#execute_by_id(action_id, author_ids: nil, content_ids: nil, queue_id: nil, value: nil, request_options: {}) ⇒ ModerationAPI::Models::Actions::ExecuteExecuteByIDResponse
Deprecated.
Execute an action on a set of content items in a queue.
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/moderation_api/resources/actions/execute.rb', line 60 def execute_by_id(action_id, params = {}) parsed, = ModerationAPI::Actions::ExecuteExecuteByIDParams.dump_request(params) @client.request( method: :post, path: ["actions/%1$s/execute", action_id], body: parsed, model: ModerationAPI::Models::Actions::ExecuteExecuteByIDResponse, options: ) end |