class Platforms::Yammer::Api::Messages
Messaging endpoints for the Yammer
API @author Benjamin Elias @since 0.1.0
Public Instance Methods
Messages
about a topic @param topic_id [#to_s] The topic to filter by @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/messagesabout_topicidjson
# File lib/platforms/yammer/api/messages.rb, line 108 def about_topic topic_id, options={}, headers={} @connection.get "messages/about_topic/#{topic_id}.json", options, headers end
Get Messages
through the algorithmic feed @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/messagesalgojson
# File lib/platforms/yammer/api/messages.rb, line 23 def algo options={}, headers={} @connection.get "messages/algo.json", options, headers end
Delete a message @param message_id [#to_s] The ID of the message 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/messagesid
# File lib/platforms/yammer/api/messages.rb, line 157 def delete message_id, options=nil, headers={} @connection.delete "messages/#{message_id}.json", options, headers end
E-mail a copy of the message to the current user @param message_id [#to_s] The ID of the message to delete @param body [#to_s] Body of the request (should not need to be used) @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/messagesemail
# File lib/platforms/yammer/api/messages.rb, line 127 def email message_id, body=nil, headers={} @connection.post "messages/email.json?message_id=#{message_id}", body, headers end
Get messages in 'following' feed @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/messagesfollowingjson
# File lib/platforms/yammer/api/messages.rb, line 41 def following options={}, headers={} @connection.get "messages/following.json", options, headers end
Get all messages @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/messagesjson
# File lib/platforms/yammer/api/messages.rb, line 32 def get options={}, headers={} @connection.get "messages.json", options, headers end
Messages
in a group @param group_id [#to_s] The group ID @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/messagesin_groupgroup_id
# File lib/platforms/yammer/api/messages.rb, line 88 def in_group group_id, options={}, headers={} @connection.get "messages/in_group/#{group_id}.json", options, headers end
Messages
in a thread @param thread_id [#to_s] The thread ID @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/messagesin_threadthreadidjson
# File lib/platforms/yammer/api/messages.rb, line 78 def in_thread thread_id, options={}, headers={} @connection.get "messages/in_thread/#{thread_id}.json", options, headers end
Like a message @param message_id [#to_s] The ID of the message to delete @param body [#to_s] Body of the request (should not need to be used) @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/messagesliked_bycurrentjsonmessage_idid
# File lib/platforms/yammer/api/messages.rb, line 137 def like message_id, body=nil, headers={} @connection.post "messages/liked_by/current.json?message_id=#{message_id}", body, headers end
Get Messages
from my feed @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/messagesmy_feedjson
# File lib/platforms/yammer/api/messages.rb, line 14 def my_feed options={}, headers={} @connection.get "messages/my_feed.json", options, headers end
Messages
about an Open Graph object @param id [#to_s] The Open Graph ID to filter by @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/messagesopen_graph_objects
# File lib/platforms/yammer/api/messages.rb, line 98 def open_graph_objects id, options={}, headers={} @connection.get "messages/open_graph_objects/#{id}.json", options, headers end
Post a new message @param body [#to_s] Body of the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/messages-json-post
# File lib/platforms/yammer/api/messages.rb, line 117 def post body, headers={} @connection.post "messages.json", body, headers end
Private messages @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/messagesprivatejson
# File lib/platforms/yammer/api/messages.rb, line 59 def private options={}, headers={} @connection.get "messages/private.json", options, headers end
Received messages @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/messagesreceivedjson
# File lib/platforms/yammer/api/messages.rb, line 68 def received options={}, headers={} @connection.get "messages/received.json", options, headers end
Sent messages @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/messagessentjson
# File lib/platforms/yammer/api/messages.rb, line 50 def sent options={}, headers={} @connection.get "messages/sent.json", options, headers end
Unlike a message @param message_id [#to_s] The ID of the message 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/messagesliked_bycurrentjsonmessage_idid-1
# File lib/platforms/yammer/api/messages.rb, line 147 def unlike message_id, options=nil, headers={} @connection.delete "messages/liked_by/current.json?message_id=#{message_id}", options, headers end