Class: Asimov::ApiV1::Edits
Overview
Class interface for API methods in the “/edits” URI subspace.
Instance Method Summary collapse
-
#create(model:, instruction:, parameters: {}) ⇒ Object
Calls the /edits 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(model:, instruction:, parameters: {}) ⇒ Object
Calls the /edits POST endpoint with the specified parameters.
12 13 14 15 16 17 18 19 |
# File 'lib/asimov/api_v1/edits.rb', line 12 def create(model:, instruction:, parameters: {}) raise MissingRequiredParameterError.new(:model) unless model raise MissingRequiredParameterError.new(:instruction) unless instruction json_post(path: "/edits", parameters: parameters.merge({ model: model, instruction: instruction })) end |