fitbit_api 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/fitbit_api/activities.rb +13 -13
- data/lib/fitbit_api/alarms.rb +12 -12
- data/lib/fitbit_api/goals.rb +10 -10
- data/lib/fitbit_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 767484bcfc76da3df543118553915957931085d397929a10a4ab044aa2a0ccf8
|
4
|
+
data.tar.gz: 58c722470d69043d9bed70e0234471d76f1156612c7222d1a2725a73b2acdb4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: febd698371e86ef605756827d51cd5d2fd669df5ac0737254b842cb15ec6912f3675578479596f0fac7eed6e02cf1fce85336b83777d01e108700763559086de
|
7
|
+
data.tar.gz: 170fc85f95423adbf6179087a9912c40ed5d830bc333a6a897f40ca808188721e314f44a241811644c30243421c388af64b780fcfb9b18bd20e117ce5ac9d89d
|
data/CHANGELOG.md
CHANGED
@@ -54,11 +54,11 @@ module FitbitAPI
|
|
54
54
|
#
|
55
55
|
# activity_logs_list(before_date: Date.parse('2021-05-24'), limit: 5)
|
56
56
|
#
|
57
|
-
# @
|
58
|
-
# @
|
59
|
-
# @
|
60
|
-
# @
|
61
|
-
# @
|
57
|
+
# @param before_date [Date] Specify when filtering entries that occured before the given date
|
58
|
+
# @param after_date [Date] Specify when filtering entries that occured after the given date
|
59
|
+
# @param sort [String] the Sort order of entries by date (asc or desc)
|
60
|
+
# @param offset [Integer] The offset number of entries. Must always be 0
|
61
|
+
# @param limit [Integer] The max of the number of entries returned (max: 20)
|
62
62
|
|
63
63
|
def activity_logs_list(opts={})
|
64
64
|
opts[:params] = {}
|
@@ -153,14 +153,14 @@ module FitbitAPI
|
|
153
153
|
#
|
154
154
|
# log_activity(body: { activity_id: 90013, manual_calories: 300, duration_millis: 6000000 })
|
155
155
|
#
|
156
|
-
# @
|
157
|
-
# @
|
158
|
-
# @
|
159
|
-
# @
|
160
|
-
# @
|
161
|
-
# @
|
162
|
-
# @
|
163
|
-
# @
|
156
|
+
# @param activity_id [Integer, String] The activity ID
|
157
|
+
# @param activity_name [String] Custom activity name. Either activity ID or activity_name must be provided
|
158
|
+
# @param manual_calories [Integer] Calories burned, specified manually. Required with activity_name, otherwise optional
|
159
|
+
# @param start_time [String] Activity start time; formatted in HH:mm:ss
|
160
|
+
# @param duration_millis [Integer] Duration in milliseconds
|
161
|
+
# @param date [String] Log entry date; formatted in yyyy-MM-dd
|
162
|
+
# @param distance [Integer] Distance; required for logging directory activity
|
163
|
+
# @param distance_unit [String] Distance measurement unit
|
164
164
|
|
165
165
|
def log_activity(opts)
|
166
166
|
post("user/#{user_id}/activities.json", opts)
|
data/lib/fitbit_api/alarms.rb
CHANGED
@@ -20,10 +20,10 @@ module FitbitAPI
|
|
20
20
|
#
|
21
21
|
# @param tracker_id [Integer] The ID of the tracker for which the alarm is created
|
22
22
|
#
|
23
|
-
# @
|
24
|
-
# @
|
25
|
-
# @
|
26
|
-
# @
|
23
|
+
# @param time [String] Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00
|
24
|
+
# @param enabled [Boolean] If false, alarm does not vibrate until enabled is set to true
|
25
|
+
# @param recurring [Boolean] If false, the alarm is a single event
|
26
|
+
# @param week_days [String] Comma separated list of days of the week on which the alarm vibrates (MONDAY,TUESDAY)
|
27
27
|
|
28
28
|
def add_alarm(tracker_id, opts={})
|
29
29
|
post("user/#{user_id}/devices/tracker/#{tracker_id}/alarms.json", opts)
|
@@ -34,14 +34,14 @@ module FitbitAPI
|
|
34
34
|
# @param tracker_id [Integer] The ID of the tracker for which the alarm is created
|
35
35
|
# @param alarm_id [Integer] The ID of the alarm to be updated
|
36
36
|
#
|
37
|
-
# @
|
38
|
-
# @
|
39
|
-
# @
|
40
|
-
# @
|
41
|
-
# @
|
42
|
-
# @
|
43
|
-
# @
|
44
|
-
# @
|
37
|
+
# @param time [String] Time of day that the alarm vibrates with a UTC timezone offset, e.g. 07:15-08:00
|
38
|
+
# @param enabled [Boolean] If false, alarm does not vibrate until enabled is set to true
|
39
|
+
# @param recurring [Boolean] If false, the alarm is a single event
|
40
|
+
# @param week_days [String] Comma separated list of days of the week on which the alarm vibrates (MONDAY,TUESDAY)
|
41
|
+
# @param snooze_length [Integer] Minutes between alarms
|
42
|
+
# @param snooze_count [Integer] Maximum snooze count
|
43
|
+
# @param label [String] Label for alarm
|
44
|
+
# @param vibe [String] Vibe pattern; only one value for now (DEFAULT)
|
45
45
|
|
46
46
|
def update_alarm(tracker_id, alarm_id, opts={})
|
47
47
|
post("user/#{user_id}/devices/tracker/#{tracker_id}/alarms/#{alarm_id}.json", opts)
|
data/lib/fitbit_api/goals.rb
CHANGED
@@ -35,11 +35,11 @@ module FitbitAPI
|
|
35
35
|
#
|
36
36
|
# create_or_update_daily_goals(body: {calories_out: 2000, active_minutes: 90, floors: 5})
|
37
37
|
#
|
38
|
-
# @
|
39
|
-
# @
|
40
|
-
# @
|
41
|
-
# @
|
42
|
-
# @
|
38
|
+
# @param calories_out [Integer] Calories output goal value
|
39
|
+
# @param active_minutes [Integer] Active minutes goal value
|
40
|
+
# @param floors [Integer] Floor goal value
|
41
|
+
# @param distance [Integer, Float] Distance goal value
|
42
|
+
# @param steps [Integer] Steps goal value
|
43
43
|
|
44
44
|
def create_or_update_daily_goals(opts={})
|
45
45
|
post("user/#{user_id}/activities/goals/daily.json", opts)
|
@@ -50,11 +50,11 @@ module FitbitAPI
|
|
50
50
|
#
|
51
51
|
# create_or_update_weekly_goals(body: { active_minutes: 300, floors: 20 })
|
52
52
|
#
|
53
|
-
# @
|
54
|
-
# @
|
55
|
-
# @
|
56
|
-
# @
|
57
|
-
# @
|
53
|
+
# @param calories_out [Integer] Calories output goal value
|
54
|
+
# @param active_minutes [Integer] Active minutes goal value
|
55
|
+
# @param floors [Integer] Floor goal value
|
56
|
+
# @param distance [Integer, Float] Distance goal value
|
57
|
+
# @param steps [Integer] Steps goal value
|
58
58
|
|
59
59
|
def create_or_update_weekly_goals(opts={})
|
60
60
|
post("user/#{user_id}/activities/goals/weekly.json", opts)
|
data/lib/fitbit_api/version.rb
CHANGED