Class: Daylife::Quote

Inherits:
API
  • Object
show all
Defined in:
lib/daylife/quote.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

#articleObject

Returns the value of attribute article.



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

def article
  @article
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#quote_idObject

Returns the value of attribute quote_id.



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

def quote_id
  @quote_id
end

#quote_textObject

Returns the value of attribute quote_text.



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

def quote_text
  @quote_text
end

#sourceObject

Returns the value of attribute source.



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

def source
  @source
end

#timestampObject

Returns the value of attribute timestamp.



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

def timestamp
  @timestamp
end

Class Method Details

.core_identifierObject



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

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

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

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