Class: Daylife::Article
Instance Attribute Summary collapse
-
#article_id ⇒ Object
Returns the value of attribute article_id.
-
#daylife_url ⇒ Object
Returns the value of attribute daylife_url.
-
#excerpt ⇒ Object
Returns the value of attribute excerpt.
-
#headline ⇒ Object
Returns the value of attribute headline.
-
#image ⇒ Object
Returns the value of attribute image.
-
#quote_story_relevance ⇒ Object
Returns the value of attribute quote_story_relevance.
-
#source ⇒ Object
Returns the value of attribute source.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
- .core_identifier ⇒ Object
-
.get_info(article_id, parameters = {}) ⇒ Object
This function returns basic information about a given article.
-
.get_quotes(article_id, parameters = {}) ⇒ Object
This method is used to retrieve quotes from within the given article.
-
.get_related_articles(article_id, parameters = {}) ⇒ Object
This method is used to retrieve articles that are related to the given article.
-
.get_related_images(article_id, parameters = {}) ⇒ Object
This method is used to retrieve images from articles related to the given article.
-
.get_related_quotes(article_id, parameters = {}) ⇒ Object
This method is used to retrieve quotes from articles related to the given article.
-
.get_related_topics(article_id, parameters = {}) ⇒ Object
This method is used to retrieve topics from articles related to the given article.
-
.get_topics(article_id, parameters = {}) ⇒ Object
This method is used to retrieve topics from within the given article.
Methods inherited from API
auth, get, #initialize, methodize
Constructor Details
This class inherits a constructor from Daylife::API
Instance Attribute Details
#article_id ⇒ Object
Returns the value of attribute article_id.
3 4 5 |
# File 'lib/daylife/article.rb', line 3 def article_id @article_id end |
#daylife_url ⇒ Object
Returns the value of attribute daylife_url.
3 4 5 |
# File 'lib/daylife/article.rb', line 3 def daylife_url @daylife_url end |
#excerpt ⇒ Object
Returns the value of attribute excerpt.
3 4 5 |
# File 'lib/daylife/article.rb', line 3 def excerpt @excerpt end |
#headline ⇒ Object
Returns the value of attribute headline.
3 4 5 |
# File 'lib/daylife/article.rb', line 3 def headline @headline end |
#image ⇒ Object
Returns the value of attribute image.
3 4 5 |
# File 'lib/daylife/article.rb', line 3 def image @image end |
#quote_story_relevance ⇒ Object
Returns the value of attribute quote_story_relevance.
3 4 5 |
# File 'lib/daylife/article.rb', line 3 def quote_story_relevance @quote_story_relevance end |
#source ⇒ Object
Returns the value of attribute source.
3 4 5 |
# File 'lib/daylife/article.rb', line 3 def source @source end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/daylife/article.rb', line 3 def @timestamp end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/daylife/article.rb', line 3 def url @url end |
Class Method Details
.core_identifier ⇒ Object
5 6 7 |
# File 'lib/daylife/article.rb', line 5 def self.core_identifier return :article_id end |
.get_info(article_id, parameters = {}) ⇒ Object
This function returns basic information about a given article.
10 11 12 |
# File 'lib/daylife/article.rb', line 10 def self.get_info(article_id, parameters={}) get :get_info, parameters.merge(:article_id => article_id) end |
.get_quotes(article_id, parameters = {}) ⇒ Object
This method is used to retrieve quotes from within the given article.
35 36 37 |
# File 'lib/daylife/article.rb', line 35 def self.get_quotes(article_id, parameters={}) get :get_quotes, parameters.merge(:article_id => article_id) end |
.get_related_articles(article_id, parameters = {}) ⇒ Object
This method is used to retrieve articles that are related to the given article.
15 16 17 |
# File 'lib/daylife/article.rb', line 15 def self.(article_id, parameters={}) get :get_related_articles, parameters.merge(:article_id => article_id) end |
.get_related_images(article_id, parameters = {}) ⇒ Object
This method is used to retrieve images from articles related to the given article.
20 21 22 |
# File 'lib/daylife/article.rb', line 20 def self.(article_id, parameters={}) get :get_related_images, parameters.merge(:article_id => article_id) end |
.get_related_quotes(article_id, parameters = {}) ⇒ Object
This method is used to retrieve quotes from articles related to the given article.
25 26 27 |
# File 'lib/daylife/article.rb', line 25 def self.(article_id, parameters={}) get :get_related_quotes, parameters.merge(:article_id => article_id) end |
.get_related_topics(article_id, parameters = {}) ⇒ Object
This method is used to retrieve topics from articles related to the given article.
30 31 32 |
# File 'lib/daylife/article.rb', line 30 def self.(article_id, parameters={}) get :get_related_topics, parameters.merge(:article_id => article_id) end |
.get_topics(article_id, parameters = {}) ⇒ Object
This method is used to retrieve topics from within the given article.
40 41 42 |
# File 'lib/daylife/article.rb', line 40 def self.get_topics(article_id, parameters={}) get :get_topics, parameters.merge(:article_id => article_id) end |