Class: Quotefm::Recommendation

Inherits:
Object
  • Object
show all
Defined in:
lib/quotefm/recommendation.rb

Class Method Summary collapse

Class Method Details

.get(id) ⇒ Object



4
5
6
# File 'lib/quotefm/recommendation.rb', line 4

def self.get id
  res = HTTParty.get("https://quote.fm/api/recommendation/get/?id="+id.to_s)
end

.listByArticle(id, options = {}) ⇒ Object



8
9
10
11
12
# File 'lib/quotefm/recommendation.rb', line 8

def self.listByArticle id, options={}
  options = options.merge({:id => id})
  url = "https://quote.fm/api/recommendation/listByArticle/?"+options.to_param
  res = HTTParty.get(url)
end

.listByUser(username, options = {}) ⇒ Object



14
15
16
17
18
# File 'lib/quotefm/recommendation.rb', line 14

def self.listByUser username, options={}
  options = options.merge({:username => username})
  url = "https://quote.fm/api/recommendation/listByUser/?"+options.to_param
  res = HTTParty.get(url)
end