Class: Daylife::Article

Inherits:
API
  • Object
show all
Defined in:
lib/daylife/article.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from API

auth, get, #initialize, methodize

Constructor Details

This class inherits a constructor from Daylife::API

Instance Attribute Details

#article_idObject

Returns the value of attribute article_id.


3
4
5
# File 'lib/daylife/article.rb', line 3

def article_id
  @article_id
end

#daylife_urlObject

Returns the value of attribute daylife_url.


3
4
5
# File 'lib/daylife/article.rb', line 3

def daylife_url
  @daylife_url
end

#excerptObject

Returns the value of attribute excerpt.


3
4
5
# File 'lib/daylife/article.rb', line 3

def excerpt
  @excerpt
end

#headlineObject

Returns the value of attribute headline.


3
4
5
# File 'lib/daylife/article.rb', line 3

def headline
  @headline
end

#imageObject

Returns the value of attribute image.


3
4
5
# File 'lib/daylife/article.rb', line 3

def image
  @image
end

#quote_story_relevanceObject

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

#sourceObject

Returns the value of attribute source.


3
4
5
# File 'lib/daylife/article.rb', line 3

def source
  @source
end

#timestampObject

Returns the value of attribute timestamp.


3
4
5
# File 'lib/daylife/article.rb', line 3

def timestamp
  @timestamp
end

#urlObject

Returns the value of attribute url.


3
4
5
# File 'lib/daylife/article.rb', line 3

def url
  @url
end

Class Method Details

.core_identifierObject


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

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.get_related_articles(article_id, parameters={})
  get :get_related_articles, parameters.merge(:article_id => article_id)
end

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.get_related_images(article_id, parameters={})
  get :get_related_images, parameters.merge(:article_id => article_id)
end

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.get_related_quotes(article_id, parameters={})
  get :get_related_quotes, parameters.merge(:article_id => article_id)
end

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.get_related_topics(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