simplificator-withings 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/withings/measurement_group.rb +3 -0
- data/lib/withings/user.rb +2 -2
- data/simplificator-withings.gemspec +1 -1
- metadata +3 -3
@@ -16,6 +16,9 @@ class Withings::MeasurementGroup
|
|
16
16
|
TYPE_SYSTOLIC_BLOOD_PRESSURE = 10 # mmHg (max, upper)
|
17
17
|
TYPE_HEART_PULSE = 11 # bpm
|
18
18
|
|
19
|
+
BLOOD_PRESSURE_MONITOR_TYPES = [TYPE_DIASTOLIC_BLOOD_PRESSURE, TYPE_SYSTOLIC_BLOOD_PRESSURE, TYPE_HEART_PULSE]
|
20
|
+
SCALE_TYPES = [TYPE_WEIGHT, TYPE_SIZE, TYPE_FAT_FREE_MASS_WEIGHT, TYPE_FAT_RATIO, TYPE_FAT_MASS_WEIGHT]
|
21
|
+
|
19
22
|
attr_reader :group_id, :attribution, :created_at, :category
|
20
23
|
attr_reader :weight, :size, :fat, :ratio, :fat_free, :diastolic_blood_pressure, :systolic_blood_pressure, :heart_pulse
|
21
24
|
def initialize(params)
|
data/lib/withings/user.rb
CHANGED
@@ -79,12 +79,12 @@ class Withings::User
|
|
79
79
|
end
|
80
80
|
|
81
81
|
# sharing enabled for a device?
|
82
|
-
def share?(device = Withings::
|
82
|
+
def share?(device = Withings::SCALE | Withings::BLOOD_PRESSURE_MONITOR)
|
83
83
|
@share & device
|
84
84
|
end
|
85
85
|
|
86
86
|
def to_s
|
87
|
-
"[User #{short_name} / #{:user_id} / #{
|
87
|
+
"[User #{short_name} / #{:user_id} / #{share?}]"
|
88
88
|
end
|
89
89
|
|
90
90
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplificator-withings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- pascalbetz
|