fitbit_api 1.0.1 → 1.1.0
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/README.md +1 -1
- data/lib/fitbit_api/base.rb +1 -1
- data/lib/fitbit_api/client.rb +1 -0
- data/lib/fitbit_api/irregular_rhythm_notifications.rb +29 -0
- data/lib/fitbit_api/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e098773d09205d1ea4a0232df914bec3fe7032ffd81339b8551294c3c5495059
|
4
|
+
data.tar.gz: d8fb56568661230c2bd6893b41324b24b41439cdcb9b8d93fa7134f7e54c0f38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ec11c165d17e279cb7621f6b22fd1cb8ae172d7f8af4d57b38899c37e0e1b2f7fb605c9c27f200278086df331651f635ab79e20c7a61ed5a9359a54e25cb400
|
7
|
+
data.tar.gz: 8270fc77279f80209d47bb7769cbc5640379d2908c36f265999da820a7189c57c9a01efe4f0452d7e414464b8fade3a6fecd7972361ae28b55d17effa6771457
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -100,7 +100,7 @@ When initializing a `FitbitAPI::Client` instance, you're given access to a handf
|
|
100
100
|
| `api_version` | API version to be used when making requests | `"1"` |
|
101
101
|
| `unit_system` | The measurement unit system to use for response values | `"en_US"` |
|
102
102
|
| `locale` | The locale to use for response values | `"en_US"` |
|
103
|
-
| `scope` | A list of permissions being requested (array or space-delimited string) | `%w[activity nutrition profile settings sleep social weight heartrate respiratory_rate oxygen_saturation cardio_fitness temperature electrocardiogram]` |
|
103
|
+
| `scope` | A list of permissions being requested (array or space-delimited string) | `%w[activity nutrition profile settings sleep social weight heartrate respiratory_rate oxygen_saturation cardio_fitness temperature electrocardiogram irregular_rhythm_notifications]` |
|
104
104
|
| `snake_case_keys` | Transform response payload's keys to snake case format | `false` |
|
105
105
|
| `symbolize_keys` | Transform response payload's keys to symbols | `false` |
|
106
106
|
| `auto_refresh_token` | Automatically refreshes the access token once expired | `true` |
|
data/lib/fitbit_api/base.rb
CHANGED
@@ -19,7 +19,7 @@ module FitbitAPI
|
|
19
19
|
define_setting :locale, 'en_US'
|
20
20
|
define_setting :scope, %w[activity nutrition profile settings sleep social weight
|
21
21
|
heartrate respiratory_rate oxygen_saturation cardio_fitness
|
22
|
-
temperature electrocardiogram]
|
22
|
+
temperature electrocardiogram irregular_rhythm_notifications]
|
23
23
|
|
24
24
|
define_setting :api_version, '1'
|
25
25
|
|
data/lib/fitbit_api/client.rb
CHANGED
@@ -8,6 +8,7 @@ require 'fitbit_api/cardio_score'
|
|
8
8
|
require 'fitbit_api/electrocardiogram'
|
9
9
|
require 'fitbit_api/heart_rate'
|
10
10
|
require 'fitbit_api/heart_rate_variability'
|
11
|
+
require 'fitbit_api/irregular_rhythm_notifications'
|
11
12
|
require 'fitbit_api/goals'
|
12
13
|
require 'fitbit_api/alarms'
|
13
14
|
require 'fitbit_api/body'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FitbitAPI
|
4
|
+
class Client
|
5
|
+
# Retrieves a paginated list of Irregular Rhythm Notifications (IRN) alerts,
|
6
|
+
# as well as all of the alert tachograms.
|
7
|
+
#
|
8
|
+
# irn_alerts_list(before_date: Date.parse('2021-05-24'), limit: 5)
|
9
|
+
#
|
10
|
+
# @param params [Hash] The request parameters
|
11
|
+
#
|
12
|
+
# @option params :before_date [Date] Specify when filtering entries that occured before the given date
|
13
|
+
# @option params :after_date [Date] Specify when filtering entries that occured after the given date
|
14
|
+
# @option params :sort [String] The Sort order of entries by date (asc or desc)
|
15
|
+
# @option params :offset [Integer] The offset number of entries. Must always be 0
|
16
|
+
# @option params :limit [Integer] The max of the number of entries returned (max: 10)
|
17
|
+
|
18
|
+
def irn_alerts_list(params = {})
|
19
|
+
default_params = { before_date: Date.today, sort: 'desc', limit: 10, offset: 0 }
|
20
|
+
get("user/#{user_id}/irn/alerts/list.json", default_params.merge(params))
|
21
|
+
end
|
22
|
+
|
23
|
+
# Retrieves the user state for Irregular Rhythm Notifications (IRN).
|
24
|
+
|
25
|
+
def irn_profile
|
26
|
+
get("user/#{user_id}/irn/profile.json")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/fitbit_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fitbit_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zoran
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|
@@ -108,6 +108,7 @@ files:
|
|
108
108
|
- lib/fitbit_api/helpers/configuration.rb
|
109
109
|
- lib/fitbit_api/helpers/exceptions.rb
|
110
110
|
- lib/fitbit_api/helpers/utils.rb
|
111
|
+
- lib/fitbit_api/irregular_rhythm_notifications.rb
|
111
112
|
- lib/fitbit_api/meals.rb
|
112
113
|
- lib/fitbit_api/oxygen_saturation.rb
|
113
114
|
- lib/fitbit_api/sleep.rb
|
@@ -121,8 +122,8 @@ licenses:
|
|
121
122
|
- MIT
|
122
123
|
metadata:
|
123
124
|
source_code_uri: https://github.com/zokioki/fitbit_api
|
124
|
-
changelog_uri: https://github.com/zokioki/fitbit_api/blob/v1.0
|
125
|
-
documentation_uri: https://www.rubydoc.info/gems/fitbit_api/1.0
|
125
|
+
changelog_uri: https://github.com/zokioki/fitbit_api/blob/v1.1.0/CHANGELOG.md
|
126
|
+
documentation_uri: https://www.rubydoc.info/gems/fitbit_api/1.1.0
|
126
127
|
rubygems_mfa_required: 'true'
|
127
128
|
post_install_message:
|
128
129
|
rdoc_options: []
|