Class: Platforms::Yammer::Api::Messages
- Defined in:
- lib/platforms/yammer/api/messages.rb
Overview
Messaging endpoints for the Yammer API
Instance Method Summary collapse
-
#about_topic(topic_id, options = {}, headers = {}) ⇒ Faraday::Response
Messages about a topic.
-
#algo(options = {}, headers = {}) ⇒ Faraday::Response
Get Messages through the algorithmic feed.
-
#delete(message_id, options = nil, headers = {}) ⇒ Faraday::Response
Delete a message.
-
#email(message_id, body = nil, headers = {}) ⇒ Faraday::Response
E-mail a copy of the message to the current user.
-
#following(options = {}, headers = {}) ⇒ Faraday::Response
Get messages in ‘following’ feed.
-
#get(options = {}, headers = {}) ⇒ Faraday::Response
Get all messages.
-
#in_group(group_id, options = {}, headers = {}) ⇒ Faraday::Response
Messages in a group.
-
#in_thread(thread_id, options = {}, headers = {}) ⇒ Faraday::Response
Messages in a thread.
-
#like(message_id, body = nil, headers = {}) ⇒ Faraday::Response
Like a message.
-
#my_feed(options = {}, headers = {}) ⇒ Faraday::Response
Get Messages from my feed.
-
#open_graph_objects(id, options = {}, headers = {}) ⇒ Faraday::Response
Messages about an Open Graph object.
-
#post(body, headers = {}) ⇒ Faraday::Response
Post a new message.
-
#private(options = {}, headers = {}) ⇒ Faraday::Response
Private messages.
-
#received(options = {}, headers = {}) ⇒ Faraday::Response
Received messages.
-
#sent(options = {}, headers = {}) ⇒ Faraday::Response
Sent messages.
-
#unlike(message_id, options = nil, headers = {}) ⇒ Faraday::Response
Unlike a message.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Platforms::Yammer::Api::Base
Instance Method Details
#about_topic(topic_id, options = {}, headers = {}) ⇒ Faraday::Response
Messages about a topic
108 109 110 |
# File 'lib/platforms/yammer/api/messages.rb', line 108 def about_topic topic_id, ={}, headers={} @connection.get "messages/about_topic/#{topic_id}.json", , headers end |
#algo(options = {}, headers = {}) ⇒ Faraday::Response
Get Messages through the algorithmic feed
23 24 25 |
# File 'lib/platforms/yammer/api/messages.rb', line 23 def algo ={}, headers={} @connection.get "messages/algo.json", , headers end |
#delete(message_id, options = nil, headers = {}) ⇒ Faraday::Response
Delete a message
157 158 159 |
# File 'lib/platforms/yammer/api/messages.rb', line 157 def delete , =nil, headers={} @connection.delete "messages/#{}.json", , headers end |
#email(message_id, body = nil, headers = {}) ⇒ Faraday::Response
E-mail a copy of the message to the current user
127 128 129 |
# File 'lib/platforms/yammer/api/messages.rb', line 127 def email , body=nil, headers={} @connection.post "messages/email.json?message_id=#{}", body, headers end |
#following(options = {}, headers = {}) ⇒ Faraday::Response
Get messages in ‘following’ feed
41 42 43 |
# File 'lib/platforms/yammer/api/messages.rb', line 41 def following ={}, headers={} @connection.get "messages/following.json", , headers end |
#get(options = {}, headers = {}) ⇒ Faraday::Response
Get all messages
32 33 34 |
# File 'lib/platforms/yammer/api/messages.rb', line 32 def get ={}, headers={} @connection.get "messages.json", , headers end |
#in_group(group_id, options = {}, headers = {}) ⇒ Faraday::Response
Messages in a group
88 89 90 |
# File 'lib/platforms/yammer/api/messages.rb', line 88 def in_group group_id, ={}, headers={} @connection.get "messages/in_group/#{group_id}.json", , headers end |
#in_thread(thread_id, options = {}, headers = {}) ⇒ Faraday::Response
Messages in a thread
78 79 80 |
# File 'lib/platforms/yammer/api/messages.rb', line 78 def in_thread thread_id, ={}, headers={} @connection.get "messages/in_thread/#{thread_id}.json", , headers end |
#like(message_id, body = nil, headers = {}) ⇒ Faraday::Response
Like a message
137 138 139 |
# File 'lib/platforms/yammer/api/messages.rb', line 137 def like , body=nil, headers={} @connection.post "messages/liked_by/current.json?message_id=#{}", body, headers end |
#my_feed(options = {}, headers = {}) ⇒ Faraday::Response
Get Messages from my feed
14 15 16 |
# File 'lib/platforms/yammer/api/messages.rb', line 14 def my_feed ={}, headers={} @connection.get "messages/my_feed.json", , headers end |
#open_graph_objects(id, options = {}, headers = {}) ⇒ Faraday::Response
Messages about an Open Graph object
98 99 100 |
# File 'lib/platforms/yammer/api/messages.rb', line 98 def open_graph_objects id, ={}, headers={} @connection.get "messages/open_graph_objects/#{id}.json", , headers end |
#post(body, headers = {}) ⇒ Faraday::Response
Post a new message
117 118 119 |
# File 'lib/platforms/yammer/api/messages.rb', line 117 def post body, headers={} @connection.post "messages.json", body, headers end |
#private(options = {}, headers = {}) ⇒ Faraday::Response
Private messages
59 60 61 |
# File 'lib/platforms/yammer/api/messages.rb', line 59 def private ={}, headers={} @connection.get "messages/private.json", , headers end |
#received(options = {}, headers = {}) ⇒ Faraday::Response
Received messages
68 69 70 |
# File 'lib/platforms/yammer/api/messages.rb', line 68 def received ={}, headers={} @connection.get "messages/received.json", , headers end |
#sent(options = {}, headers = {}) ⇒ Faraday::Response
Sent messages
50 51 52 |
# File 'lib/platforms/yammer/api/messages.rb', line 50 def sent ={}, headers={} @connection.get "messages/sent.json", , headers end |
#unlike(message_id, options = nil, headers = {}) ⇒ Faraday::Response
Unlike a message
147 148 149 |
# File 'lib/platforms/yammer/api/messages.rb', line 147 def unlike , =nil, headers={} @connection.delete "messages/liked_by/current.json?message_id=#{}", , headers end |