Class: Quotefm::Recommendation
Class Method Summary collapse
- .get(id) ⇒ Object
- .listByArticle(id, options = {}) ⇒ Object
- .listByUser(username, options = {}) ⇒ Object
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, ={} = .merge({:id => id}) url = "https://quote.fm/api/recommendation/listByArticle/?"+.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, ={} = .merge({:username => username}) url = "https://quote.fm/api/recommendation/listByUser/?"+.to_param res = HTTParty.get(url) end |