Module: Yammer::Api::OpenGraphObject
- Included in:
- Client
- Defined in:
- lib/yammer/api/open_graph_object.rb
Instance Method Summary collapse
-
#create_open_graph_object(url, props = {}) ⇒ Yammer::ApiResponse
Yammer.create_open_graph_object('http://www.microsoft.com', { :site_name => 'Microsoft' :image => 'https://microsoft.com/global/images/test.jpg' }).
-
#follow_open_graph_object(id) ⇒ Yammer::ApiResponse
Subscribes the current user to the open graph object with the request id.
-
#get_activity_stream_open_graph_objects(id) ⇒ Yammer::ApiResponse
Returns open graph objects in a user's activity stream.
-
#is_following_open_graph_object?(id) ⇒ Yammer::ApiResponse
Determines if the current user follows an open graph object => Yammer.following_open_graph_object?(89).
Instance Method Details
#create_open_graph_object(url, props = {}) ⇒ Yammer::ApiResponse
Yammer.create_open_graph_object('http://www.microsoft.com', { :site_name => 'Microsoft' :image => 'https://microsoft.com/global/images/test.jpg' })
41 42 43 |
# File 'lib/yammer/api/open_graph_object.rb', line 41 def create_open_graph_object(url, props={}) post("/api/v1/open_graph_objects", { :url => url, :properties => props }) end |
#follow_open_graph_object(id) ⇒ Yammer::ApiResponse
Subscribes the current user to the open graph object with the request id. => Yammer.follow_open_graph_object(8)
56 57 58 |
# File 'lib/yammer/api/open_graph_object.rb', line 56 def follow_open_graph_object(id) post('/api/v1/subscriptions', :target_id => id, :target_type => 'OpenGraphObject') end |
#get_activity_stream_open_graph_objects(id) ⇒ Yammer::ApiResponse
Returns open graph objects in a user's activity stream
87 88 89 |
# File 'lib/yammer/api/open_graph_object.rb', line 87 def get_activity_stream_open_graph_objects(id) get("/api/v1/streams/activities", :owner_type => 'open_graph_object', :owner_id => id) end |
#is_following_open_graph_object?(id) ⇒ Yammer::ApiResponse
Determines if the current user follows an open graph object => Yammer.following_open_graph_object?(89)
71 72 73 |
# File 'lib/yammer/api/open_graph_object.rb', line 71 def is_following_open_graph_object?(id) get("/api/v1/subscriptions/to_open_graph_object/#{id}") end |