fitbit_api 0.15.3 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/fitbit_api/sleep.rb +19 -0
- data/lib/fitbit_api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84c71b886a0267daec62f3be7c7a4f1b8da73a893cb766b3a0a246089f5bded0
|
4
|
+
data.tar.gz: f662e151b49f846953dd278676c0bb70d5f473b33ce5727df2a496311f09fcf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '03948d366e08835c27d58c128c654c46c8a11ad8eb306de10a8584aae78d0e6c885e9a6ee3e4d4a3a1a60bb45dafe1b807c57649c3dc9eb58af85381845323c3'
|
7
|
+
data.tar.gz: 6b39da3d88cd2f0440196a9ce52466950892bf25af5e5ecb60a5f9438c0a14d14b48f10cf4b792151b4d23da1e52086ac7767b9a6ad82b7c00ea3cabf1858aa0
|
data/CHANGELOG.md
CHANGED
data/lib/fitbit_api/sleep.rb
CHANGED
@@ -15,6 +15,25 @@ module FitbitAPI
|
|
15
15
|
get("user/#{user_id}/sleep/date/#{format_date(date)}.json")
|
16
16
|
end
|
17
17
|
|
18
|
+
# Returns a list of a user's sleep log entries for a given date range. The data returned for either date
|
19
|
+
# can include a sleep period that ended that date but began on the previous date. For example, if you
|
20
|
+
# request a Sleep Log between 2021-12-22 and 2021-12-26, it may return log entries that span 2021-12-21
|
21
|
+
# and 2021-12-22, as well as 2021-12-25 and 2021-12-26.
|
22
|
+
#
|
23
|
+
# @param opts [Hash] The request options
|
24
|
+
#
|
25
|
+
# @option opts :start_date [Date] The start of the date range
|
26
|
+
# @option opts :end_date [Date] The end of the date range
|
27
|
+
|
28
|
+
def sleep_logs_by_date_range(opts = {})
|
29
|
+
start_date = opts[:start_date]
|
30
|
+
end_date = opts[:end_date]
|
31
|
+
|
32
|
+
raise FitbitAPI::InvalidArgumentError, 'A start_date and end_date are required.' unless start_date && end_date
|
33
|
+
|
34
|
+
get("user/#{user_id}/sleep/date/#{format_date(start_date)}/#{format_date(end_date)}.json")
|
35
|
+
end
|
36
|
+
|
18
37
|
# Returns a list of a user's sleep log entries before or after a given date, and specifying offset,
|
19
38
|
# limit and sort order. The data returned for different dates can include sleep periods that began
|
20
39
|
# on the previous date. For example, a sleep log entry for 2018-10-21 may have ended that day but
|
data/lib/fitbit_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fitbit_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zoran
|
@@ -119,8 +119,8 @@ licenses:
|
|
119
119
|
- MIT
|
120
120
|
metadata:
|
121
121
|
source_code_uri: https://github.com/zokioki/fitbit_api
|
122
|
-
changelog_uri: https://github.com/zokioki/fitbit_api/blob/v0.
|
123
|
-
documentation_uri: https://www.rubydoc.info/gems/fitbit_api/0.
|
122
|
+
changelog_uri: https://github.com/zokioki/fitbit_api/blob/v0.16.0/CHANGELOG.md
|
123
|
+
documentation_uri: https://www.rubydoc.info/gems/fitbit_api/0.16.0
|
124
124
|
rubygems_mfa_required: 'true'
|
125
125
|
post_install_message:
|
126
126
|
rdoc_options: []
|