class Platforms::Yammer::Api::PendingAttachments
Pending attachments in Yammer
@author Benjamin Elias @since 0.1.0
Public Instance Methods
delete(id, options={})
click to toggle source
Delete a pending attachment @param id [#to_s] ID of pending attachment to delete @param options [Hash] Options for the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/pending_attachmentsid
# File lib/platforms/yammer/api/pending_attachments.rb, line 27 def delete id, options={}, headers={} @connection.delete "pending_attachments/#{id}.json", options, headers end
post(upload_io, options={})
click to toggle source
Add a pending attachment @param upload_io [Faraday::UploadIO] The file payload @param options [Hash] Additional options for the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/pending_attachments @see stackoverflow.com/questions/16725195/upload-files-using-faraday
# File lib/platforms/yammer/api/pending_attachments.rb, line 16 def post upload_io, options={}, headers={} body = { file: upload_io }.reverse_merge(options) @connection.post 'pending_attachments.json', body, headers end