Class: Daylife::Topic
Instance Attribute Summary collapse
-
#daylife_url ⇒ Object
Returns the value of attribute daylife_url.
-
#name ⇒ Object
Returns the value of attribute name.
-
#topic_id ⇒ Object
Returns the value of attribute topic_id.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
- .core_identifier ⇒ Object
-
.get_info(name, parameters = {}) ⇒ Object
This function returns basic information about a given topic specified by name.
-
.get_related_articles(name, parameters = {}) ⇒ Object
This method is used to retrieve recent articles that contain the given topic specified by name or topic_id.
-
.get_related_images(topic_id, parameters = {}) ⇒ Object
This method is used to retrieve images related to articles that contain the given topic_id.
-
.get_related_quotes(name, parameters = {}) ⇒ Object
This method is used to retrieve quotes from articles that contain the given topic specified by name or topic_id.
-
.get_related_topics(topic_id, parameters = {}) ⇒ Object
This method retrieves topics that appear in the same articles as the given topic specified by name or topic_id.
Methods inherited from API
auth, get, #initialize, methodize
Constructor Details
This class inherits a constructor from Daylife::API
Instance Attribute Details
#daylife_url ⇒ Object
Returns the value of attribute daylife_url.
3 4 5 |
# File 'lib/daylife/topic.rb', line 3 def daylife_url @daylife_url end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/daylife/topic.rb', line 3 def name @name end |
#topic_id ⇒ Object
Returns the value of attribute topic_id.
3 4 5 |
# File 'lib/daylife/topic.rb', line 3 def topic_id @topic_id end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/daylife/topic.rb', line 3 def type @type end |
Class Method Details
.core_identifier ⇒ Object
5 6 7 |
# File 'lib/daylife/topic.rb', line 5 def self.core_identifier return :name end |
.get_info(name, parameters = {}) ⇒ Object
This function returns basic information about a given topic specified by name. (A topic_id is not a valid input parameter for this call.)
11 12 13 |
# File 'lib/daylife/topic.rb', line 11 def self.get_info(name, parameters={}) get :get_info, parameters.merge(:name => name) end |
.get_related_articles(name, parameters = {}) ⇒ Object
This method is used to retrieve recent articles that contain the given topic specified by name or topic_id.
31 32 33 |
# File 'lib/daylife/topic.rb', line 31 def self.(name, parameters={}) get :get_related_articles, parameters.merge(:name => name) end |
.get_related_images(topic_id, parameters = {}) ⇒ Object
This method is used to retrieve images related to articles that contain the given topic_id.
16 17 18 |
# File 'lib/daylife/topic.rb', line 16 def self.(topic_id, parameters={}) get :get_related_images, parameters.merge(:name => name) end |
.get_related_quotes(name, parameters = {}) ⇒ Object
This method is used to retrieve quotes from articles that contain the given topic specified by name or topic_id.
26 27 28 |
# File 'lib/daylife/topic.rb', line 26 def self.(name, parameters={}) get :get_related_quotes, parameters.merge(:name => name) end |
.get_related_topics(topic_id, parameters = {}) ⇒ Object
This method retrieves topics that appear in the same articles as the given topic specified by name or topic_id.
21 22 23 |
# File 'lib/daylife/topic.rb', line 21 def self.(topic_id, parameters={}) get :get_related_topics, parameters.merge(:name => name) end |