Module: FidorApi::Client::DSL::Messages
- Defined in:
- lib/fidor_api/client/dsl/messages.rb
Instance Method Summary collapse
- #message(id, options = {}) ⇒ Object
- #message_attachment(id) ⇒ Object
- #message_content(id) ⇒ Object
- #messages(options = {}) ⇒ Object
Instance Method Details
#message(id, options = {}) ⇒ Object
9 10 11 |
# File 'lib/fidor_api/client/dsl/messages.rb', line 9 def (id, = {}) fetch(:single, Model::Message, "messages/#{id}", ) end |
#message_attachment(id) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/fidor_api/client/dsl/messages.rb', line 13 def (id) response = connection.get("messages/#{id}/attachment") Model::Message::Attachment.new( type: response.headers['content-type'], filename: response.headers['content-disposition'][/filename="([^"]+)"/, 1], content: response.body ) end |