Class: Asimov::ApiV1::Moderations
- Defined in:
- lib/asimov/api_v1/moderations.rb
Overview
Class interface for API methods in the “/moderations” URI subspace.
Instance Method Summary collapse
-
#create(input:, parameters: {}) ⇒ Object
Calls the /moderations POST endpoint with the specified parameters.
Methods inherited from Base
#http_delete, #http_get, #http_streamed_download, #initialize, #json_post, #multipart_post
Constructor Details
This class inherits a constructor from Asimov::ApiV1::Base
Instance Method Details
#create(input:, parameters: {}) ⇒ Object
Calls the /moderations POST endpoint with the specified parameters.
13 14 15 16 17 |
# File 'lib/asimov/api_v1/moderations.rb', line 13 def create(input:, parameters: {}) raise MissingRequiredParameterError.new(:input) unless input json_post(path: "/moderations", parameters: parameters.merge({ input: input })) end |