Class: Platforms::Yammer::Api::PendingAttachments
- Defined in:
- lib/platforms/yammer/api/pending_attachments.rb
Overview
Pending attachments in Yammer
Instance Method Summary collapse
-
#delete(id, options = {}, headers = {}) ⇒ Faraday::Response
Delete a pending attachment.
-
#post(upload_io, options = {}, headers = {}) ⇒ Faraday::Response
Add a pending attachment.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Platforms::Yammer::Api::Base
Instance Method Details
#delete(id, options = {}, headers = {}) ⇒ Faraday::Response
Delete a pending attachment
27 28 29 |
# File 'lib/platforms/yammer/api/pending_attachments.rb', line 27 def delete id, ={}, headers={} @connection.delete "pending_attachments/#{id}.json", , headers end |
#post(upload_io, options = {}, headers = {}) ⇒ Faraday::Response
Add a pending attachment
16 17 18 19 |
# File 'lib/platforms/yammer/api/pending_attachments.rb', line 16 def post upload_io, ={}, headers={} body = { file: upload_io }.reverse_merge() @connection.post 'pending_attachments.json', body, headers end |