Class: Dailymile::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/dailymile/token.rb

Instance Method Summary collapse

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