Class: ModerationAPI::Resources::Content
- Inherits:
-
Object
- Object
- ModerationAPI::Resources::Content
- Defined in:
- lib/moderation_api/resources/content.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Content
constructor
private
A new instance of Content.
-
#submit(content:, author_id: nil, channel: nil, content_id: nil, conversation_id: nil, do_not_store: nil, metadata: nil, meta_type: nil, policies: nil, timestamp: nil, request_options: {}) ⇒ ModerationAPI::Models::ContentSubmitResponse
Some parameter documentations has been truncated, see Models::ContentSubmitParams for more details.
Constructor Details
#initialize(client:) ⇒ Content
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 Content.
50 51 52 |
# File 'lib/moderation_api/resources/content.rb', line 50 def initialize(client:) @client = client end |
Instance Method Details
#submit(content:, author_id: nil, channel: nil, content_id: nil, conversation_id: nil, do_not_store: nil, metadata: nil, meta_type: nil, policies: nil, timestamp: nil, request_options: {}) ⇒ ModerationAPI::Models::ContentSubmitResponse
Some parameter documentations has been truncated, see Models::ContentSubmitParams for more details.
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/moderation_api/resources/content.rb', line 36 def submit(params) parsed, = ModerationAPI::ContentSubmitParams.dump_request(params) @client.request( method: :post, path: "moderate", body: parsed, model: ModerationAPI::Models::ContentSubmitResponse, options: ) end |