Class: Jawbone::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/client.rb

Constant Summary collapse

API_VERSION =
"1.0"
BASE_URL =
"https://jawbone.com/nudge/api/v.1.0"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token) ⇒ Client

Returns a new instance of Client.



14
15
16
# File 'lib/client.rb', line 14

def initialize(token)
  @token = token
end

Instance Attribute Details

#tokenObject

Returns the value of attribute token.



7
8
9
# File 'lib/client.rb', line 7

def token
  @token
end

Instance Method Details

#friendsObject



22
23
24
# File 'lib/client.rb', line 22

def friends
  get_helper("users/@me/friends", {})
end


26
27
28
# File 'lib/client.rb', line 26

def trends(params={})
  get_helper("users/@me/trends", params)
end

#userObject



18
19
20
# File 'lib/client.rb', line 18

def user
  get_helper("users/@me", {})
end