Class: Daylife::Quote
Instance Attribute Summary collapse
-
#article ⇒ Object
Returns the value of attribute article.
-
#name ⇒ Object
Returns the value of attribute name.
-
#quote_id ⇒ Object
Returns the value of attribute quote_id.
-
#quote_text ⇒ Object
Returns the value of attribute quote_text.
-
#source ⇒ Object
Returns the value of attribute source.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Class Method Summary collapse
- .core_identifier ⇒ Object
-
.get_info(quote_id, parameters = {}) ⇒ Object
This method returns basic information for a quote.
-
.get_related_articles(quote_id, parameters = {}) ⇒ Object
This method is used to retrieve articles that are related to the article that contains the given quote.
-
.get_related_quotes(quote_id, parameters = {}) ⇒ Object
This method is used to retrieve quotes from articles that are related to the article containing the given quote.
-
.get_related_topics(quote_id, parameters = {}) ⇒ Object
This method is used to retrieve topics from articles that are related to the article containing the given quote.
Methods inherited from API
auth, get, #initialize, methodize
Constructor Details
This class inherits a constructor from Daylife::API
Instance Attribute Details
#article ⇒ Object
Returns the value of attribute article.
3 4 5 |
# File 'lib/daylife/quote.rb', line 3 def article @article end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/daylife/quote.rb', line 3 def name @name end |
#quote_id ⇒ Object
Returns the value of attribute quote_id.
3 4 5 |
# File 'lib/daylife/quote.rb', line 3 def quote_id @quote_id end |
#quote_text ⇒ Object
Returns the value of attribute quote_text.
3 4 5 |
# File 'lib/daylife/quote.rb', line 3 def quote_text @quote_text end |
#source ⇒ Object
Returns the value of attribute source.
3 4 5 |
# File 'lib/daylife/quote.rb', line 3 def source @source end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/daylife/quote.rb', line 3 def @timestamp end |
Class Method Details
.core_identifier ⇒ Object
5 6 7 |
# File 'lib/daylife/quote.rb', line 5 def self.core_identifier return :quote_id end |
.get_info(quote_id, parameters = {}) ⇒ Object
This method returns basic information for a quote.
10 11 12 |
# File 'lib/daylife/quote.rb', line 10 def self.get_info(quote_id, parameters={}) get :get_info, parameters.merge(:quote_id => quote_id) end |
.get_related_articles(quote_id, parameters = {}) ⇒ Object
This method is used to retrieve articles that are related to the article that contains the given quote.
15 16 17 |
# File 'lib/daylife/quote.rb', line 15 def self.(quote_id, parameters={}) get :get_related_articles, parameters.merge(:quote_id => quote_id) end |
.get_related_quotes(quote_id, parameters = {}) ⇒ Object
This method is used to retrieve quotes from articles that are related to the article containing the given quote.
20 21 22 |
# File 'lib/daylife/quote.rb', line 20 def self.(quote_id, parameters={}) get :get_related_quotes, parameters.merge(:quote_id => quote_id) end |
.get_related_topics(quote_id, parameters = {}) ⇒ Object
This method is used to retrieve topics from articles that are related to the article containing the given quote.
25 26 27 |
# File 'lib/daylife/quote.rb', line 25 def self.(quote_id, parameters={}) get :get_related_topics, parameters.merge(:quote_id => quote_id) end |