Class: GrandExchange::Categories
- Inherits:
-
Object
- Object
- GrandExchange::Categories
- Defined in:
- lib/rs_api-ruby/grandexchange.rb
Class Method Summary collapse
Class Method Details
.getInformation(categoryID) ⇒ Object
4 5 6 7 8 |
# File 'lib/rs_api-ruby/grandexchange.rb', line 4 def self.getInformation(categoryID) uri = Utils.baseURI + 'itemdb_rs/api/catalogue/category.json?category=' + categoryID.to_s jsonRequest = open(uri).read return JSON.parse(jsonRequest) end |
.getPrices(categoryID, alpha, pageNumber) ⇒ Object
10 11 12 13 |
# File 'lib/rs_api-ruby/grandexchange.rb', line 10 def self.getPrices(categoryID, alpha, pageNumber) jsonRequest = open(Utils.baseURI + 'itemdb_rs/api/catalogue/items.json?category='+ categoryID.to_s + '&alpha=' + alpha.to_s + '&page=' + pageNumber.to_s).read return JSON.parse(jsonRequest) end |