humanapi 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef774d10fb83d4b24062051a4adec467d629f342
4
- data.tar.gz: 8370cd073899c8114a92d8b876dbdccaf44883dd
3
+ metadata.gz: e91b39960e47e7d8f18e251f390013e0bebfcc93
4
+ data.tar.gz: 5ef69bf3cff8d614e86686170e2b7d21656a54c5
5
5
  SHA512:
6
- metadata.gz: 7c98e7a07fc6e88c1341addacdf07f9fa84a5ef7b9835366ae8f58cfc3b0065dad1748c088a43d51d21d125fb82975cdd53aa4abc2840acdd8fead49efa16ff9
7
- data.tar.gz: 1ec174e00b454b61eb57b68e8efbcc189bc98fa57526c3fec6b544c81165ee580989d343ccfd7590a90e756b55d19c735b84b558640e1d6cfd243101b325ee34
6
+ metadata.gz: afc864cb2aaf18d1d755322499671d4d5f45b04d15136c2b88d6394227166ecf3c012abb69f68a4044a1d257340e93700bf426820f58518a3dbc59e2b195b515
7
+ data.tar.gz: 0bfbf8a62fa335ada3cdd17d7f6b2cac535718148d51e1015b25b2fbc731f2e5093a09e52ef6768787dabe9716ba8595a8b1fe2a0c8772cc16d47a2d2b45c10a
@@ -4,162 +4,166 @@ module HumanAPI
4
4
  path '/v1/human'
5
5
 
6
6
  def self.token=(value)
7
- options[:access_token] = value
7
+ @token = value
8
+ end
9
+
10
+ def self.token
11
+ @token
8
12
  end
9
13
 
10
14
  # Profile
11
15
 
12
- def self.profile(token = nil)
16
+ def self.profile(token = token)
13
17
  get('profile', :access_token => token)
14
18
  end
15
19
 
16
- def self.summary(token = nil)
20
+ def self.summary(token = token)
17
21
  get('', :access_token => token)
18
22
  end
19
23
 
20
24
  # Activity
21
25
 
22
- def self.all_activity(token = nil)
26
+ def self.all_activity(token = token)
23
27
  get("activity", :access_token => token)
24
28
  end
25
29
 
26
- def self.activity(id, token = nil)
30
+ def self.activity(id, token = token)
27
31
  get("activity/#{id}", :access_token => token)
28
32
  end
29
33
 
30
- def self.daily_activity(date, token = nil)
34
+ def self.daily_activity(date, token = token)
31
35
  get("activity/daily/#{date.strftime('%F')}", :access_token => token)
32
36
  end
33
37
 
34
- def self.series_activity(date, token = nil)
38
+ def self.series_activity(date, token = token)
35
39
  get("activity/series/#{date.strftime('%F')}", :access_token => token)
36
40
  end
37
41
 
38
42
  # Blood Glucose
39
43
 
40
- def self.blood_glucose(id, token = nil)
44
+ def self.blood_glucose(id, token = token)
41
45
  get("blood_glucose/#{id}", :access_token => token)
42
46
  end
43
47
 
44
- def self.all_blood_glucose(token = nil)
48
+ def self.all_blood_glucose(token = token)
45
49
  get('blood_glucose', :access_token => token)
46
50
  end
47
51
 
48
- def self.daily_blood_glucose(date, token = nil)
52
+ def self.daily_blood_glucose(date, token = token)
49
53
  get("blood_glucose/daily/#{date.strftime('%F')}", :access_token => token)
50
54
  end
51
55
 
52
56
  # Blood presure
53
57
 
54
- def self.blood_pressure(id, token = nil)
58
+ def self.blood_pressure(id, token = token)
55
59
  get("blood_pressure/#{id}", :access_token => token)
56
60
  end
57
61
 
58
- def self.all_blood_pressures(token = nil)
62
+ def self.all_blood_pressures(token = token)
59
63
  get('blood_pressure', :access_token => token)
60
64
  end
61
65
 
62
- def self.daily_blood_pressure(date, token = nil)
66
+ def self.daily_blood_pressure(date, token = token)
63
67
  get("blood_pressure/daily/#{date.strftime('%F')}", :access_token => token)
64
68
  end
65
69
 
66
70
  # BMI
67
71
 
68
- def self.bmi(id, token = nil)
72
+ def self.bmi(id, token = token)
69
73
  get("bmi/#{id}", :access_token => token)
70
74
  end
71
75
 
72
- def self.all_bmis(token = nil)
76
+ def self.all_bmis(token = token)
73
77
  get('bmi', :access_token => token)
74
78
  end
75
79
 
76
- def self.daily_bmi(date, token = nil)
80
+ def self.daily_bmi(date, token = token)
77
81
  get("bmi/daily/#{date.strftime('%F')}", :access_token => token)
78
82
  end
79
83
 
80
84
  # Body fat
81
85
 
82
- def self.body_fat(id, token = nil)
86
+ def self.body_fat(id, token = token)
83
87
  get("body_fat/#{id}", :access_token => token)
84
88
  end
85
89
 
86
- def self.all_body_fats(token = nil)
90
+ def self.all_body_fats(token = token)
87
91
  get('body_fat', :access_token => token)
88
92
  end
89
93
 
90
- def self.daily_body_fat(date, token = nil)
94
+ def self.daily_body_fat(date, token = token)
91
95
  get("body_fat/daily/#{date.strftime('%F')}", :access_token => token)
92
96
  end
93
97
 
94
98
  # Genetics
95
99
 
96
- def self.genetic_traits(token = nil)
100
+ def self.genetic_traits(token = token)
97
101
  get('genetic/traits', :access_token => token)
98
102
  end
99
103
 
100
104
  # Heart rate
101
105
 
102
- def self.heart_rate(id, token = nil)
106
+ def self.heart_rate(id, token = token)
103
107
  get("heart_rate/#{id}", :access_token => token)
104
108
  end
105
109
 
106
- def self.all_heart_rates(token = nil)
110
+ def self.all_heart_rates(token = token)
107
111
  get('heart_rate', :access_token => token)
108
112
  end
109
113
 
110
- def self.daily_heart_rate(date, token = nil)
114
+ def self.daily_heart_rate(date, token = token)
111
115
  get("heart_rate/daily/#{date.strftime('%F')}", :access_token => token)
112
116
  end
113
117
 
114
118
  # Height
115
119
 
116
- def self.height(id, token = nil)
120
+ def self.height(id, token = token)
117
121
  get("height/#{id}", :access_token => token)
118
122
  end
119
123
 
120
- def self.all_heights(token = nil)
124
+ def self.all_heights(token = token)
121
125
  get('height', :access_token => token)
122
126
  end
123
127
 
124
- def self.daily_height(date, token = nil)
128
+ def self.daily_height(date, token = token)
125
129
  get("height/daily/#{date.strftime('%F')}", :access_token => token)
126
130
  end
127
131
 
128
132
  # Location
129
133
 
130
- def self.all_locations(token = nil)
134
+ def self.all_locations(token = token)
131
135
  get('location', :access_token => token)
132
136
  end
133
137
 
134
- def self.daily_location(date, token = nil)
138
+ def self.daily_location(date, token = token)
135
139
  get("location/daily/#{date.strftime('%F')}", :access_token => token)
136
140
  end
137
141
 
138
142
  # Sleep
139
143
 
140
- def self.sleep(id, token = nil)
144
+ def self.sleep(id, token = token)
141
145
  get("sleep/#{id}", :access_token => token)
142
146
  end
143
147
 
144
- def self.all_sleep(token = nil)
148
+ def self.all_sleep(token = token)
145
149
  get('sleep', :access_token => token)
146
150
  end
147
151
 
148
- def self.daily_sleep(date, token = nil)
152
+ def self.daily_sleep(date, token = token)
149
153
  get("sleep/daily/#{date.strftime('%F')}", :access_token => token)
150
154
  end
151
155
 
152
156
  # Weight
153
157
 
154
- def self.weight(id, token = nil)
158
+ def self.weight(id, token = token)
155
159
  get("weight/#{id}", :access_token => token)
156
160
  end
157
161
 
158
- def self.all_weight(token = nil)
162
+ def self.all_weight(token = token)
159
163
  get('weight', :access_token => token)
160
164
  end
161
165
 
162
- def self.daily_weight(date, token = nil)
166
+ def self.daily_weight(date, token = token)
163
167
  get("weight/daily/#{date.strftime('%F')}", :access_token => token)
164
168
  end
165
169
  end
@@ -1,3 +1,3 @@
1
1
  module HumanAPI
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: humanapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex MacCaw