Module: Freefeed::V1::Attachments

Included in:
Client
Defined in:
lib/freefeed/v1/attachments.rb

Instance Method Summary collapse

Instance Method Details

#create_attachment(source, content_type: nil) ⇒ Object

or an IO object

Parameters:

  • source (String, Pathname, IO)

    could by a file path



11
12
13
14
# File 'lib/freefeed/v1/attachments.rb', line 11

def create_attachment(source, content_type: nil)
  options = { form: { file: file(source, content_type) } }
  authenticated_request(:post, "/v1/attachments", options)
end