Class: HumanAPI::Human
- Inherits:
-
Nestful::Resource
- Object
- Nestful::Resource
- HumanAPI::Human
- Defined in:
- lib/humanapi/human.rb
Class Method Summary collapse
- .activity(id, token = token) ⇒ Object
-
.all_activity(token = token) ⇒ Object
Activity.
- .all_blood_glucose(token = token) ⇒ Object
- .all_blood_pressures(token = token) ⇒ Object
- .all_bmis(token = token) ⇒ Object
- .all_body_fats(token = token) ⇒ Object
- .all_heart_rates(token = token) ⇒ Object
- .all_heights(token = token) ⇒ Object
-
.all_locations(token = token) ⇒ Object
Location.
- .all_sleep(token = token) ⇒ Object
- .all_weight(token = token) ⇒ Object
-
.blood_glucose(id, token = token) ⇒ Object
Blood Glucose.
-
.blood_pressure(id, token = token) ⇒ Object
Blood presure.
-
.bmi(id, token = token) ⇒ Object
BMI.
-
.body_fat(id, token = token) ⇒ Object
Body fat.
- .daily_activity(date, token = token) ⇒ Object
- .daily_blood_glucose(date, token = token) ⇒ Object
- .daily_blood_pressure(date, token = token) ⇒ Object
- .daily_bmi(date, token = token) ⇒ Object
- .daily_body_fat(date, token = token) ⇒ Object
- .daily_heart_rate(date, token = token) ⇒ Object
- .daily_height(date, token = token) ⇒ Object
- .daily_location(date, token = token) ⇒ Object
- .daily_sleep(date, token = token) ⇒ Object
- .daily_weight(date, token = token) ⇒ Object
-
.genetic_traits(token = token) ⇒ Object
Genetics.
-
.heart_rate(id, token = token) ⇒ Object
Heart rate.
-
.height(id, token = token) ⇒ Object
Height.
-
.profile(token = token) ⇒ Object
Profile.
- .series_activity(date, token = token) ⇒ Object
-
.sleep(id, token = token) ⇒ Object
Sleep.
- .summary(token = token) ⇒ Object
- .token ⇒ Object
- .token=(value) ⇒ Object
-
.weight(id, token = token) ⇒ Object
Weight.
Class Method Details
.activity(id, token = token) ⇒ Object
30 31 32 |
# File 'lib/humanapi/human.rb', line 30 def self.activity(id, token = token) get("activity/#{id}", :access_token => token) end |
.all_activity(token = token) ⇒ Object
Activity
26 27 28 |
# File 'lib/humanapi/human.rb', line 26 def self.all_activity(token = token) get("activity", :access_token => token) end |
.all_blood_glucose(token = token) ⇒ Object
48 49 50 |
# File 'lib/humanapi/human.rb', line 48 def self.all_blood_glucose(token = token) get('blood_glucose', :access_token => token) end |
.all_blood_pressures(token = token) ⇒ Object
62 63 64 |
# File 'lib/humanapi/human.rb', line 62 def self.all_blood_pressures(token = token) get('blood_pressure', :access_token => token) end |
.all_bmis(token = token) ⇒ Object
76 77 78 |
# File 'lib/humanapi/human.rb', line 76 def self.all_bmis(token = token) get('bmi', :access_token => token) end |
.all_body_fats(token = token) ⇒ Object
90 91 92 |
# File 'lib/humanapi/human.rb', line 90 def self.all_body_fats(token = token) get('body_fat', :access_token => token) end |
.all_heart_rates(token = token) ⇒ Object
110 111 112 |
# File 'lib/humanapi/human.rb', line 110 def self.all_heart_rates(token = token) get('heart_rate', :access_token => token) end |
.all_heights(token = token) ⇒ Object
124 125 126 |
# File 'lib/humanapi/human.rb', line 124 def self.all_heights(token = token) get('height', :access_token => token) end |
.all_locations(token = token) ⇒ Object
Location
134 135 136 |
# File 'lib/humanapi/human.rb', line 134 def self.all_locations(token = token) get('location', :access_token => token) end |
.all_sleep(token = token) ⇒ Object
148 149 150 |
# File 'lib/humanapi/human.rb', line 148 def self.all_sleep(token = token) get('sleep', :access_token => token) end |
.all_weight(token = token) ⇒ Object
162 163 164 |
# File 'lib/humanapi/human.rb', line 162 def self.all_weight(token = token) get('weight', :access_token => token) end |
.blood_glucose(id, token = token) ⇒ Object
Blood Glucose
44 45 46 |
# File 'lib/humanapi/human.rb', line 44 def self.blood_glucose(id, token = token) get("blood_glucose/#{id}", :access_token => token) end |
.blood_pressure(id, token = token) ⇒ Object
Blood presure
58 59 60 |
# File 'lib/humanapi/human.rb', line 58 def self.blood_pressure(id, token = token) get("blood_pressure/#{id}", :access_token => token) end |
.bmi(id, token = token) ⇒ Object
BMI
72 73 74 |
# File 'lib/humanapi/human.rb', line 72 def self.bmi(id, token = token) get("bmi/#{id}", :access_token => token) end |
.body_fat(id, token = token) ⇒ Object
Body fat
86 87 88 |
# File 'lib/humanapi/human.rb', line 86 def self.body_fat(id, token = token) get("body_fat/#{id}", :access_token => token) end |
.daily_activity(date, token = token) ⇒ Object
34 35 36 |
# File 'lib/humanapi/human.rb', line 34 def self.daily_activity(date, token = token) get("activity/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_blood_glucose(date, token = token) ⇒ Object
52 53 54 |
# File 'lib/humanapi/human.rb', line 52 def self.daily_blood_glucose(date, token = token) get("blood_glucose/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_blood_pressure(date, token = token) ⇒ Object
66 67 68 |
# File 'lib/humanapi/human.rb', line 66 def self.daily_blood_pressure(date, token = token) get("blood_pressure/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_bmi(date, token = token) ⇒ Object
80 81 82 |
# File 'lib/humanapi/human.rb', line 80 def self.daily_bmi(date, token = token) get("bmi/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_body_fat(date, token = token) ⇒ Object
94 95 96 |
# File 'lib/humanapi/human.rb', line 94 def self.daily_body_fat(date, token = token) get("body_fat/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_heart_rate(date, token = token) ⇒ Object
114 115 116 |
# File 'lib/humanapi/human.rb', line 114 def self.daily_heart_rate(date, token = token) get("heart_rate/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_height(date, token = token) ⇒ Object
128 129 130 |
# File 'lib/humanapi/human.rb', line 128 def self.daily_height(date, token = token) get("height/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_location(date, token = token) ⇒ Object
138 139 140 |
# File 'lib/humanapi/human.rb', line 138 def self.daily_location(date, token = token) get("location/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_sleep(date, token = token) ⇒ Object
152 153 154 |
# File 'lib/humanapi/human.rb', line 152 def self.daily_sleep(date, token = token) get("sleep/daily/#{date.strftime('%F')}", :access_token => token) end |
.daily_weight(date, token = token) ⇒ Object
166 167 168 |
# File 'lib/humanapi/human.rb', line 166 def self.daily_weight(date, token = token) get("weight/daily/#{date.strftime('%F')}", :access_token => token) end |
.genetic_traits(token = token) ⇒ Object
Genetics
100 101 102 |
# File 'lib/humanapi/human.rb', line 100 def self.genetic_traits(token = token) get('genetic/traits', :access_token => token) end |
.heart_rate(id, token = token) ⇒ Object
Heart rate
106 107 108 |
# File 'lib/humanapi/human.rb', line 106 def self.heart_rate(id, token = token) get("heart_rate/#{id}", :access_token => token) end |
.height(id, token = token) ⇒ Object
Height
120 121 122 |
# File 'lib/humanapi/human.rb', line 120 def self.height(id, token = token) get("height/#{id}", :access_token => token) end |
.profile(token = token) ⇒ Object
Profile
16 17 18 |
# File 'lib/humanapi/human.rb', line 16 def self.profile(token = token) get('profile', :access_token => token) end |
.series_activity(date, token = token) ⇒ Object
38 39 40 |
# File 'lib/humanapi/human.rb', line 38 def self.series_activity(date, token = token) get("activity/series/#{date.strftime('%F')}", :access_token => token) end |
.sleep(id, token = token) ⇒ Object
Sleep
144 145 146 |
# File 'lib/humanapi/human.rb', line 144 def self.sleep(id, token = token) get("sleep/#{id}", :access_token => token) end |
.summary(token = token) ⇒ Object
20 21 22 |
# File 'lib/humanapi/human.rb', line 20 def self.summary(token = token) get('', :access_token => token) end |
.token ⇒ Object
10 11 12 |
# File 'lib/humanapi/human.rb', line 10 def self.token @token end |
.token=(value) ⇒ Object
6 7 8 |
# File 'lib/humanapi/human.rb', line 6 def self.token=(value) @token = value end |
.weight(id, token = token) ⇒ Object
Weight
158 159 160 |
# File 'lib/humanapi/human.rb', line 158 def self.weight(id, token = token) get("weight/#{id}", :access_token => token) end |