Module: SalesforceChatter::Client::FeedItems

Included in:
SalesforceChatter::Client
Defined in:
lib/salesforce-chatter/client/feed_items.rb

Overview

Defines methods related to feed items

Instance Method Summary collapse

Instance Method Details

#feed_item(id, options = {}) ⇒ Object



20
21
22
# File 'lib/salesforce-chatter/client/feed_items.rb', line 20

def feed_item(id, options={})
  response = get("/chatter/feed-items/#{id}", options)
end

#feed_item_create(text, options = {}) ⇒ Object



11
12
13
14
# File 'lib/salesforce-chatter/client/feed_items.rb', line 11

def feed_item_create(text, options={})
  options[:text] = text
  response = post("/chatter/feeds/news/me/feed-items", options)
end

#feed_item_destroy(id, options = {}) ⇒ Object



16
17
18
# File 'lib/salesforce-chatter/client/feed_items.rb', line 16

def feed_item_destroy(id, options={})
  response = delete("/chatter/feed-items/#{id}", options)
end

#feed_items(*args) ⇒ Object



5
6
7
8
9
# File 'lib/salesforce-chatter/client/feed_items.rb', line 5

def feed_items(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  user = args.first
  response = get('/chatter/feeds/news/me/feed-items', options)
end