Class: HumanAPI::Human
- Inherits:
-
Nestful::Resource
- Object
- Nestful::Resource
- HumanAPI::Human
- Defined in:
- lib/humanapi/human.rb
Class Method Summary collapse
- .activity(id, token = nil) ⇒ Object
-
.all_activity(token = nil) ⇒ Object
Activity.
- .all_blood_glucose(token = nil) ⇒ Object
- .all_blood_pressures(token = nil) ⇒ Object
- .all_bmis(token = nil) ⇒ Object
- .all_body_fats(token = nil) ⇒ Object
- .all_heart_rates(token = nil) ⇒ Object
- .all_heights(token = nil) ⇒ Object
-
.all_locations(token = nil) ⇒ Object
Location.
- .all_sleep(token = nil) ⇒ Object
- .all_weight(token = nil) ⇒ Object
-
.blood_glucose(id, token = nil) ⇒ Object
Blood Glucose.
-
.blood_pressure(id, token = nil) ⇒ Object
Blood presure.
-
.bmi(id, token = nil) ⇒ Object
BMI.
-
.body_fat(id, token = nil) ⇒ Object
Body fat.
- .daily_activity(date, token = nil) ⇒ Object
- .daily_blood_glucose(date, token = nil) ⇒ Object
- .daily_blood_pressure(date, token = nil) ⇒ Object
- .daily_bmi(date, token = nil) ⇒ Object
- .daily_body_fat(date, token = nil) ⇒ Object
- .daily_heart_rate(date, token = nil) ⇒ Object
- .daily_height(date, token = nil) ⇒ Object
- .daily_location(date, token = nil) ⇒ Object
- .daily_sleep(date, token = nil) ⇒ Object
- .daily_weight(date, token = nil) ⇒ Object
-
.genetic_traits(token = nil) ⇒ Object
Genetics.
-
.heart_rate(id, token = nil) ⇒ Object
Heart rate.
-
.height(id, token = nil) ⇒ Object
Height.
-
.profile(token = nil) ⇒ Object
Profile.
- .series_activity(date, token = nil) ⇒ Object
-
.sleep(id, token = nil) ⇒ Object
Sleep.
- .summary(token = nil) ⇒ Object
- .token=(value) ⇒ Object
-
.weight(id, token = nil) ⇒ Object
Weight.
Class Method Details
.activity(id, token = nil) ⇒ Object
26 27 28 |
# File 'lib/humanapi/human.rb', line 26 def self.activity(id, token = nil) get("activity/#{id}", :access_token => token) end |
.all_activity(token = nil) ⇒ Object
Activity
22 23 24 |
# File 'lib/humanapi/human.rb', line 22 def self.all_activity(token = nil) get("activity", :access_token => token) end |
.all_blood_glucose(token = nil) ⇒ Object
44 45 46 |
# File 'lib/humanapi/human.rb', line 44 def self.all_blood_glucose(token = nil) get('blood_glucose', :access_token => token) end |
.all_blood_pressures(token = nil) ⇒ Object
58 59 60 |
# File 'lib/humanapi/human.rb', line 58 def self.all_blood_pressures(token = nil) get('blood_pressure', :access_token => token) end |
.all_bmis(token = nil) ⇒ Object
72 73 74 |
# File 'lib/humanapi/human.rb', line 72 def self.all_bmis(token = nil) get('bmi', :access_token => token) end |
.all_body_fats(token = nil) ⇒ Object
86 87 88 |
# File 'lib/humanapi/human.rb', line 86 def self.all_body_fats(token = nil) get('body_fat', :access_token => token) end |
.all_heart_rates(token = nil) ⇒ Object
106 107 108 |
# File 'lib/humanapi/human.rb', line 106 def self.all_heart_rates(token = nil) get('heart_rate', :access_token => token) end |
.all_heights(token = nil) ⇒ Object
120 121 122 |
# File 'lib/humanapi/human.rb', line 120 def self.all_heights(token = nil) get('height', :access_token => token) end |
.all_locations(token = nil) ⇒ Object
Location
130 131 132 |
# File 'lib/humanapi/human.rb', line 130 def self.all_locations(token = nil) get('location', :access_token => token) end |
.all_sleep(token = nil) ⇒ Object
144 145 146 |
# File 'lib/humanapi/human.rb', line 144 def self.all_sleep(token = nil) get('sleep', :access_token => token) end |
.all_weight(token = nil) ⇒ Object
158 159 160 |
# File 'lib/humanapi/human.rb', line 158 def self.all_weight(token = nil) get('weight', :access_token => token) end |
.blood_glucose(id, token = nil) ⇒ Object
Blood Glucose
40 41 42 |
# File 'lib/humanapi/human.rb', line 40 def self.blood_glucose(id, token = nil) get("blood_glucose/#{id}", :access_token => token) end |
.blood_pressure(id, token = nil) ⇒ Object
Blood presure
54 55 56 |
# File 'lib/humanapi/human.rb', line 54 def self.blood_pressure(id, token = nil) get("blood_pressure/#{id}", :access_token => token) end |
.bmi(id, token = nil) ⇒ Object
BMI
68 69 70 |
# File 'lib/humanapi/human.rb', line 68 def self.bmi(id, token = nil) get("bmi/#{id}", :access_token => token) end |
.body_fat(id, token = nil) ⇒ Object
Body fat
82 83 84 |
# File 'lib/humanapi/human.rb', line 82 def self.body_fat(id, token = nil) get("body_fat/#{id}", :access_token => token) end |
.daily_activity(date, token = nil) ⇒ Object
30 31 32 |
# File 'lib/humanapi/human.rb', line 30 def self.daily_activity(date, token = nil) get("activity/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_blood_glucose(date, token = nil) ⇒ Object
48 49 50 |
# File 'lib/humanapi/human.rb', line 48 def self.daily_blood_glucose(date, token = nil) get("blood_glucose/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_blood_pressure(date, token = nil) ⇒ Object
62 63 64 |
# File 'lib/humanapi/human.rb', line 62 def self.daily_blood_pressure(date, token = nil) get("blood_pressure/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_bmi(date, token = nil) ⇒ Object
76 77 78 |
# File 'lib/humanapi/human.rb', line 76 def self.daily_bmi(date, token = nil) get("bmi/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_body_fat(date, token = nil) ⇒ Object
90 91 92 |
# File 'lib/humanapi/human.rb', line 90 def self.daily_body_fat(date, token = nil) get("body_fat/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_heart_rate(date, token = nil) ⇒ Object
110 111 112 |
# File 'lib/humanapi/human.rb', line 110 def self.daily_heart_rate(date, token = nil) get("heart_rate/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_height(date, token = nil) ⇒ Object
124 125 126 |
# File 'lib/humanapi/human.rb', line 124 def self.daily_height(date, token = nil) get("height/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_location(date, token = nil) ⇒ Object
134 135 136 |
# File 'lib/humanapi/human.rb', line 134 def self.daily_location(date, token = nil) get("location/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_sleep(date, token = nil) ⇒ Object
148 149 150 |
# File 'lib/humanapi/human.rb', line 148 def self.daily_sleep(date, token = nil) get("sleep/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_weight(date, token = nil) ⇒ Object
162 163 164 |
# File 'lib/humanapi/human.rb', line 162 def self.daily_weight(date, token = nil) get("weight/daily/#{date.strftime('%F')}", :access_token => token) end |
.genetic_traits(token = nil) ⇒ Object
Genetics
96 97 98 |
# File 'lib/humanapi/human.rb', line 96 def self.genetic_traits(token = nil) get('genetic/traits', :access_token => token) end |
.heart_rate(id, token = nil) ⇒ Object
Heart rate
102 103 104 |
# File 'lib/humanapi/human.rb', line 102 def self.heart_rate(id, token = nil) get("heart_rate/#{id}", :access_token => token) end |
.height(id, token = nil) ⇒ Object
Height
116 117 118 |
# File 'lib/humanapi/human.rb', line 116 def self.height(id, token = nil) get("height/#{id}", :access_token => token) end |
.profile(token = nil) ⇒ Object
Profile
12 13 14 |
# File 'lib/humanapi/human.rb', line 12 def self.profile(token = nil) get('profile', :access_token => token) end |
.series_activity(date, token = nil) ⇒ Object
34 35 36 |
# File 'lib/humanapi/human.rb', line 34 def self.series_activity(date, token = nil) get("activity/series/#{date.strftime('%F')}", :access_token => token) end |
.sleep(id, token = nil) ⇒ Object
Sleep
140 141 142 |
# File 'lib/humanapi/human.rb', line 140 def self.sleep(id, token = nil) get("sleep/#{id}", :access_token => token) end |
.summary(token = nil) ⇒ Object
16 17 18 |
# File 'lib/humanapi/human.rb', line 16 def self.summary(token = nil) get('', :access_token => token) end |
.token=(value) ⇒ Object
6 7 8 |
# File 'lib/humanapi/human.rb', line 6 def self.token=(value) [:access_token] = value end |
.weight(id, token = nil) ⇒ Object
Weight
154 155 156 |
# File 'lib/humanapi/human.rb', line 154 def self.weight(id, token = nil) get("weight/#{id}", :access_token => token) end |