Class: Awesm::Stats
- Inherits:
-
Hashie::Mash
- Object
- Hashie::Mash
- Awesm::Stats
- Defined in:
- lib/awesm/stats.rb
Constant Summary collapse
- PATH =
'/stats'
Class Method Summary collapse
Class Method Details
.range(options) ⇒ Object
5 6 7 8 9 |
# File 'lib/awesm/stats.rb', line 5 def self.range() response = Awesm.http_client.get "#{Awesm::HOST}#{PATH}/range.json", { :v => 3 }.merge() json = JSON.parse response.content new(json) end |
.url(options) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/awesm/stats.rb', line 11 def self.url() awesm_id = .delete(:awesm_id) response = Awesm.http_client.get "#{Awesm::HOST}#{PATH}/#{awesm_id}.json", { :v => 3 }.merge() json = JSON.parse response.content new(json) end |