Class: Basecamp::Services::AttachmentsService
- Inherits:
-
BaseService
- Object
- BaseService
- Basecamp::Services::AttachmentsService
- Defined in:
- lib/basecamp/generated/services/attachments_service.rb
Overview
Service for Attachments operations
Instance Method Summary collapse
-
#create(data:, content_type:, name:) ⇒ Hash
Create an attachment (upload a file for embedding).
Constructor Details
This class inherits a constructor from Basecamp::Services::BaseService
Instance Method Details
#create(data:, content_type:, name:) ⇒ Hash
Create an attachment (upload a file for embedding)
17 18 19 20 21 |
# File 'lib/basecamp/generated/services/attachments_service.rb', line 17 def create(data:, content_type:, name:) with_operation(service: "attachments", operation: "create", is_mutation: true) do http_post_raw("/attachments.json?name=#{URI.encode_www_form_component(name.to_s)}", body: data, content_type: content_type).json end end |