Module: DevinApi::Endpoints::Attachment
- Defined in:
- lib/devin_api/endpoints/attachment.rb
Overview
Attachment endpoints for the Devin API
Instance Method Summary collapse
-
#upload_file(file) ⇒ String
Upload a file for Devin to work with during sessions.
Instance Method Details
#upload_file(file) ⇒ String
Upload a file for Devin to work with during sessions
12 13 14 15 16 |
# File 'lib/devin_api/endpoints/attachment.rb', line 12 def upload_file(file) payload = { file: Faraday::UploadIO.new(file.path, 'application/octet-stream', File.basename(file.path)) } connection.post('/v1/attachments', payload).body end |