Class: Mondo::FeedItem
Instance Attribute Summary collapse
-
#background_color ⇒ Object
Returns the value of attribute background_color.
-
#body ⇒ Object
Returns the value of attribute body.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#url ⇒ Object
Returns the value of attribute url.
Attributes inherited from Resource
Instance Method Summary collapse
- #create_params ⇒ Object
-
#save ⇒ Object
temporary fix until the API accepts JSON data in the request body.
Methods inherited from Resource
boolean_accessor, boolean_reader, date_accessor, date_writer, #initialize, #inspect, #to_s
Constructor Details
This class inherits a constructor from Mondo::Resource
Instance Attribute Details
#background_color ⇒ Object
Returns the value of attribute background_color.
4 5 6 |
# File 'lib/api/mondo/feed_item.rb', line 4 def background_color @background_color end |
#body ⇒ Object
Returns the value of attribute body.
4 5 6 |
# File 'lib/api/mondo/feed_item.rb', line 4 def body @body end |
#image_url ⇒ Object
Returns the value of attribute image_url.
4 5 6 |
# File 'lib/api/mondo/feed_item.rb', line 4 def image_url @image_url end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/api/mondo/feed_item.rb', line 4 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/api/mondo/feed_item.rb', line 4 def type @type end |
#url ⇒ Object
Returns the value of attribute url.
4 5 6 |
# File 'lib/api/mondo/feed_item.rb', line 4 def url @url end |
Instance Method Details
#create_params ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/api/mondo/feed_item.rb', line 17 def create_params { account_id: self.client.account_id, type: "basic", url: self.url, params: { title: self.title, image_url: self.image_url, background_color: self.background_color, body: self.body } } end |
#save ⇒ Object
temporary fix until the API accepts JSON data in the request body
13 14 15 |
# File 'lib/api/mondo/feed_item.rb', line 13 def save self.client.api_post("/feed", self.create_params) end |