Class: Dailymile::Token
- Inherits:
-
Object
- Object
- Dailymile::Token
- Defined in:
- lib/dailymile/token.rb
Instance Method Summary collapse
- #access_token=(token) ⇒ Object
- #delete(path) ⇒ Object
- #get(path, params = {}) ⇒ Object
-
#initialize(client, token) ⇒ Token
constructor
A new instance of Token.
- #post(path, params = {}) ⇒ Object
- #put(path, params = {}) ⇒ Object
Constructor Details
#initialize(client, token) ⇒ Token
Returns a new instance of Token.
5 6 7 8 |
# File 'lib/dailymile/token.rb', line 5 def initialize(client, token) @client = client set_access_token token end |
Instance Method Details
#access_token=(token) ⇒ Object
10 11 12 |
# File 'lib/dailymile/token.rb', line 10 def access_token=(token) set_access_token token end |
#delete(path) ⇒ Object
26 27 28 |
# File 'lib/dailymile/token.rb', line 26 def delete(path) request :delete, path end |
#get(path, params = {}) ⇒ Object
14 15 16 |
# File 'lib/dailymile/token.rb', line 14 def get(path, params = {}) request :get, path, params end |
#post(path, params = {}) ⇒ Object
18 19 20 |
# File 'lib/dailymile/token.rb', line 18 def post(path, params = {}) request :post, path, params end |
#put(path, params = {}) ⇒ Object
22 23 24 |
# File 'lib/dailymile/token.rb', line 22 def put(path, params = {}) request :put, path, params end |