Class: Quotefm::Article
Class Method Summary collapse
- .getByID(id) ⇒ Object
- .getByURL(url) ⇒ Object
- .listByCategories(ids, options = {}) ⇒ Object
- .listByPage(id, options = {}) ⇒ Object
Class Method Details
.getByID(id) ⇒ Object
4 5 6 |
# File 'lib/quotefm/article.rb', line 4 def self.getByID id res = HTTParty.get("https://quote.fm/api/article/get/?id="+id.to_s) end |
.getByURL(url) ⇒ Object
8 9 10 |
# File 'lib/quotefm/article.rb', line 8 def self.getByURL url res = HTTParty.get("https://quote.fm/api/article/get/?url="+url) end |
.listByCategories(ids, options = {}) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/quotefm/article.rb', line 18 def self.listByCategories ids, ={} = .merge({:ids => ids}) url = "https://quote.fm/api/article/listByCategories/?"+.to_param puts url res = HTTParty.get(url) end |
.listByPage(id, options = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/quotefm/article.rb', line 12 def self.listByPage id, ={} = .merge({:id => id}) url = "https://quote.fm/api/article/listByPage/?"+.to_param res = HTTParty.get(url) end |