Module: YammerApi::Api::Messages
Instance Method Summary collapse
-
#delete_message(id, options = {}) ⇒ Object
Deletes a specified message from the authenticating user.
-
#send_direct_message(message, user_id, options = {}) ⇒ YammerApi::Post
Creates a new direct message from the authenticating user to selected user.
-
#update(message, options = {}) ⇒ YammerApi::Post
Creates a new message from the authenticating user.
Methods included from Helper
Instance Method Details
#delete_message(id, options = {}) ⇒ Object
Deletes a specified message from the authenticating user
50 51 52 53 |
# File 'lib/yammer_api/api/messages.rb', line 50 def (id, ={}) path = "/messages/#{id}" delete(path, ) end |
#send_direct_message(message, user_id, options = {}) ⇒ YammerApi::Post
Creates a new direct message from the authenticating user to selected user
37 38 39 40 41 |
# File 'lib/yammer_api/api/messages.rb', line 37 def (, user_id, ={}) path = "/messages.json" response = post(path, {:body => , :direct_to_id => user_id}.merge().to_json) parse_post(response) end |
#update(message, options = {}) ⇒ YammerApi::Post
Note:
A status update with text identical to the authenticating user’s current status will be ignored to prevent duplicates.
Creates a new message from the authenticating user
21 22 23 24 25 |
# File 'lib/yammer_api/api/messages.rb', line 21 def update(, ={}) path = "/messages.json" response = post(path, {:body => }.merge().to_json) parse_post(response) end |