Class: Eisenhower::Client
- Inherits:
-
Object
- Object
- Eisenhower::Client
- Includes:
- HTTParty
- Defined in:
- lib/eisenhower/client.rb
Instance Attribute Summary collapse
-
#oauth_token ⇒ Object
Returns the value of attribute oauth_token.
Class Method Summary collapse
Instance Attribute Details
#oauth_token ⇒ Object
Returns the value of attribute oauth_token.
3 4 5 |
# File 'lib/eisenhower/client.rb', line 3 def oauth_token @oauth_token end |
Class Method Details
.fetch(path, options = {}) ⇒ Object
9 10 11 12 |
# File 'lib/eisenhower/client.rb', line 9 def self.fetch(path, ={}) .merge!({:default_params => {:oauth_token=> Eisenhower.oauth_token}}) get(path, ) end |
.get_and_parse(path, options = {}) ⇒ Object
14 15 16 17 |
# File 'lib/eisenhower/client.rb', line 14 def self.get_and_parse(path, ={}) getter = fetch(path, ) return Crack::JSON.parse(getter.body)["response"] end |