mirror of
https://github.com/sstent/go-garth.git
synced 2026-01-26 17:11:42 +00:00
working auth and activity list
This commit is contained in:
35
garth/tests/data/cassettes/test_body_battery_data_get.yaml
Normal file
35
garth/tests/data/cassettes/test_body_battery_data_get.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/wellness-service/wellness/bodyBattery/events/2023-07-20
|
||||
response:
|
||||
body:
|
||||
string: '[{"event": {"eventType": "sleep", "eventStartTimeGmt": "2023-07-19T21:30:00.000",
|
||||
"timezoneOffset": -25200000, "durationInMilliseconds": 28800000, "bodyBatteryImpact": 35,
|
||||
"feedbackType": "good_sleep", "shortFeedback": "Good sleep restored your Body Battery"},
|
||||
"activityName": null, "activityType": null, "activityId": null, "averageStress": 15.5,
|
||||
"stressValuesArray": [[1689811800000, 12], [1689812100000, 18], [1689812400000, 15]],
|
||||
"bodyBatteryValuesArray": [[1689811800000, "charging", 45, 1.0], [1689812100000, "charging", 48, 1.0],
|
||||
[1689812400000, "charging", 52, 1.0], [1689840600000, "draining", 85, 1.0]]}]'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json;charset=UTF-8
|
||||
Date:
|
||||
- Thu, 20 Jul 2023 12:00:00 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
90
garth/tests/data/cassettes/test_body_battery_data_list.yaml
Normal file
90
garth/tests/data/cassettes/test_body_battery_data_list.yaml
Normal file
@@ -0,0 +1,90 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/wellness-service/wellness/bodyBattery/events/2023-07-20
|
||||
response:
|
||||
body:
|
||||
string: '[{"event": {"eventType": "sleep", "eventStartTimeGmt": "2023-07-19T21:30:00.000",
|
||||
"timezoneOffset": -25200000, "durationInMilliseconds": 28800000, "bodyBatteryImpact": 35,
|
||||
"feedbackType": "good_sleep", "shortFeedback": "Good sleep restored your Body Battery"},
|
||||
"activityName": null, "activityType": null, "activityId": null, "averageStress": 15.5,
|
||||
"stressValuesArray": [[1689811800000, 12], [1689812100000, 18]],
|
||||
"bodyBatteryValuesArray": [[1689811800000, "charging", 45, 1.0], [1689840600000, "draining", 85, 1.0]]}]'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json;charset=UTF-8
|
||||
Date:
|
||||
- Thu, 20 Jul 2023 12:00:00 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/wellness-service/wellness/bodyBattery/events/2023-07-19
|
||||
response:
|
||||
body:
|
||||
string: '[]'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json;charset=UTF-8
|
||||
Date:
|
||||
- Thu, 19 Jul 2023 12:00:00 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/wellness-service/wellness/bodyBattery/events/2023-07-18
|
||||
response:
|
||||
body:
|
||||
string: '[{"event": null, "activityName": "Running", "activityType": "running",
|
||||
"activityId": "12345", "averageStress": 45.2, "stressValuesArray": [],
|
||||
"bodyBatteryValuesArray": [[1689667200000, "draining", 75, 1.0], [1689670800000, "draining", 65, 1.0]]}]'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json;charset=UTF-8
|
||||
Date:
|
||||
- Tue, 18 Jul 2023 12:00:00 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
@@ -0,0 +1,33 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/wellness-service/wellness/dailyStress/2023-07-20
|
||||
response:
|
||||
body:
|
||||
string: '{"userProfilePK": 2591602, "calendarDate": "2023-07-20",
|
||||
"startTimestampGMT": "2023-07-20T06:00:00.000Z", "endTimestampGMT": "2023-07-21T05:59:59.999Z",
|
||||
"startTimestampLocal": "2023-07-19T23:00:00.000Z", "endTimestampLocal": "2023-07-20T22:59:59.999Z",
|
||||
"maxStressLevel": 0, "avgStressLevel": 0, "stressChartValueOffset": 0, "stressChartYAxisOrigin": 0,
|
||||
"stressValuesArray": [], "bodyBatteryValuesArray": []}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json;charset=UTF-8
|
||||
Date:
|
||||
- Thu, 20 Jul 2023 12:00:00 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
@@ -0,0 +1,41 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/wellness-service/wellness/dailyStress/2023-07-20
|
||||
response:
|
||||
body:
|
||||
string: '{"userProfilePK": 2591602, "calendarDate": "2023-07-20",
|
||||
"startTimestampGMT": "2023-07-20T06:00:00.000Z", "endTimestampGMT": "2023-07-21T05:59:59.999Z",
|
||||
"startTimestampLocal": "2023-07-19T23:00:00.000Z", "endTimestampLocal": "2023-07-20T22:59:59.999Z",
|
||||
"maxStressLevel": 85, "avgStressLevel": 25, "stressChartValueOffset": 0, "stressChartYAxisOrigin": 0,
|
||||
"stressValuesArray": [[1689811800000, 12], [1689812100000, 18], [1689812400000, 15],
|
||||
[1689815700000, 45], [1689819300000, 85], [1689822900000, 35], [1689826500000, 20],
|
||||
[1689830100000, 15], [1689833700000, 25], [1689837300000, 30]],
|
||||
"bodyBatteryValuesArray": [[1689811800000, "charging", 45, 1.0], [1689812100000, "charging", 48, 1.0],
|
||||
[1689812400000, "charging", 52, 1.0], [1689815700000, "charging", 65, 1.0],
|
||||
[1689819300000, "draining", 85, 1.0], [1689822900000, "draining", 75, 1.0],
|
||||
[1689826500000, "draining", 65, 1.0], [1689830100000, "draining", 55, 1.0],
|
||||
[1689833700000, "draining", 45, 1.0], [1689837300000, "draining", 35, 1.0],
|
||||
[1689840900000, "draining", 25, 1.0]]}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json;charset=UTF-8
|
||||
Date:
|
||||
- Thu, 20 Jul 2023 12:00:00 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
@@ -0,0 +1,29 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/wellness-service/wellness/dailyStress/2020-01-01
|
||||
response:
|
||||
body:
|
||||
string: 'null'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json;charset=UTF-8
|
||||
Date:
|
||||
- Wed, 01 Jan 2020 12:00:00 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
@@ -0,0 +1,93 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/wellness-service/wellness/dailyStress/2023-07-20
|
||||
response:
|
||||
body:
|
||||
string: '{"userProfilePK": 2591602, "calendarDate": "2023-07-20",
|
||||
"startTimestampGMT": "2023-07-20T06:00:00.000Z", "endTimestampGMT": "2023-07-21T05:59:59.999Z",
|
||||
"startTimestampLocal": "2023-07-19T23:00:00.000Z", "endTimestampLocal": "2023-07-20T22:59:59.999Z",
|
||||
"maxStressLevel": 85, "avgStressLevel": 25, "stressChartValueOffset": 0, "stressChartYAxisOrigin": 0,
|
||||
"stressValuesArray": [[1689811800000, 12], [1689812100000, 18]],
|
||||
"bodyBatteryValuesArray": [[1689811800000, "charging", 45, 1.0], [1689840900000, "draining", 25, 1.0]]}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json;charset=UTF-8
|
||||
Date:
|
||||
- Thu, 20 Jul 2023 12:00:00 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/wellness-service/wellness/dailyStress/2023-07-19
|
||||
response:
|
||||
body:
|
||||
string: '{"userProfilePK": 2591602, "calendarDate": "2023-07-19",
|
||||
"startTimestampGMT": "2023-07-19T06:00:00.000Z", "endTimestampGMT": "2023-07-20T05:59:59.999Z",
|
||||
"startTimestampLocal": "2023-07-18T23:00:00.000Z", "endTimestampLocal": "2023-07-19T22:59:59.999Z",
|
||||
"maxStressLevel": 65, "avgStressLevel": 30, "stressChartValueOffset": 0, "stressChartYAxisOrigin": 0,
|
||||
"stressValuesArray": [[1689725400000, 25], [1689729000000, 40]],
|
||||
"bodyBatteryValuesArray": [[1689725400000, "draining", 80, 1.0], [1689754200000, "charging", 30, 1.0]]}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json;charset=UTF-8
|
||||
Date:
|
||||
- Wed, 19 Jul 2023 12:00:00 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/wellness-service/wellness/dailyStress/2023-07-18
|
||||
response:
|
||||
body:
|
||||
string: 'null'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json;charset=UTF-8
|
||||
Date:
|
||||
- Tue, 18 Jul 2023 12:00:00 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
58
garth/tests/data/cassettes/test_get_daily_weight_data.yaml
Normal file
58
garth/tests/data/cassettes/test_get_daily_weight_data.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- GCM-iOS-5.7.2.1
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/weight-service/weight/dayview/2025-06-15
|
||||
response:
|
||||
body:
|
||||
string: '{"startDate": "2025-06-15", "endDate": "2025-06-15", "dateWeightList":
|
||||
[{"samplePk": 1749996902851, "date": 1749975276000, "calendarDate": "2025-06-15",
|
||||
"weight": 59720.0, "bmi": 22.799999237060547, "bodyFat": 19.3, "bodyWater":
|
||||
58.9, "boneMass": 3539, "muscleMass": 26979, "physiqueRating": null, "visceralFat":
|
||||
null, "metabolicAge": null, "sourceType": "INDEX_SCALE", "timestampGMT": 1749996876000,
|
||||
"weightDelta": 200.00000000000284}], "totalAverage": {"from": 1749945600000,
|
||||
"until": 1750031999999, "weight": 59720.0, "bmi": 22.799999237060547, "bodyFat":
|
||||
19.3, "bodyWater": 58.9, "boneMass": 3539, "muscleMass": 26979, "physiqueRating":
|
||||
null, "visceralFat": null, "metabolicAge": null}}'
|
||||
headers:
|
||||
CF-RAY:
|
||||
- 9505ceb74f5fd875-QRO
|
||||
Cache-Control:
|
||||
- no-cache, no-store, private
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Sun, 15 Jun 2025 23:22:05 GMT
|
||||
NEL:
|
||||
- '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=UH9A8geP4FHMJjd6y07FBmPslL9A%2B3JKPZa2WHai0fGEwDokhD2YqXsG155VIgSjGPY8Av3IYcI%2B%2FH%2B38GY15TN4THIsNucuROuGSc3NlFY1c%2BmSER4pGCfCqwF1BH1cmMr%2Fu8TKFKFjkS8bzk1P%2FM4l%2Bg%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- _cfuvid=SANITIZED; path=SANITIZED; domain=SANITIZED; HttpOnly; Secure; SameSite=SANITIZED
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
cf-cache-status:
|
||||
- DYNAMIC
|
||||
pragma:
|
||||
- no-cache
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
62
garth/tests/data/cassettes/test_get_manual_weight_data.yaml
Normal file
62
garth/tests/data/cassettes/test_get_manual_weight_data.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- GCM-iOS-5.7.2.1
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/weight-service/weight/dayview/2025-06-14
|
||||
response:
|
||||
body:
|
||||
string: '{"startDate": "2025-06-14", "endDate": "2025-06-14", "dateWeightList":
|
||||
[{"samplePk": 1749948744411, "date": 1749927125175, "calendarDate": "2025-06-14",
|
||||
"weight": 59500.0, "bmi": null, "bodyFat": null, "bodyWater": null, "boneMass":
|
||||
null, "muscleMass": null, "physiqueRating": null, "visceralFat": null, "metabolicAge":
|
||||
null, "sourceType": "MANUAL", "timestampGMT": 1749948725175, "weightDelta":
|
||||
399.9999999999986}, {"samplePk": 1749909217098, "date": 1749887580000, "calendarDate":
|
||||
"2025-06-14", "weight": 59130.0, "bmi": 22.5, "bodyFat": 20.3, "bodyWater":
|
||||
58.2, "boneMass": 3430, "muscleMass": 26840, "physiqueRating": null, "visceralFat":
|
||||
null, "metabolicAge": null, "sourceType": "INDEX_SCALE", "timestampGMT": 1749909180000,
|
||||
"weightDelta": -100.00000000000142}], "totalAverage": {"from": 1749859200000,
|
||||
"until": 1749945599999, "weight": 59315.0, "bmi": 22.5, "bodyFat": 20.3, "bodyWater":
|
||||
58.2, "boneMass": 3430, "muscleMass": 26840, "physiqueRating": null, "visceralFat":
|
||||
null, "metabolicAge": null}}'
|
||||
headers:
|
||||
CF-RAY:
|
||||
- 95064313addc55c3-QRO
|
||||
Cache-Control:
|
||||
- no-cache, no-store, private
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 16 Jun 2025 00:41:31 GMT
|
||||
NEL:
|
||||
- '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=4k83lvSQ0EaF3v3SPJQfFUMAz%2FRDzu%2BJpC4JQGBU9eLNTYcx5pUfnIWwmgS0AdXoavdcbR4CvPW0TyI%2BRQBpV%2FQo3qe1GcGAaUzrQq5KRBbEpkHZseRhz1jmcUv17rnmwMucrfKf9wMne477n%2BBT0wPNgg%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- _cfuvid=SANITIZED; path=SANITIZED; domain=SANITIZED; HttpOnly; Secure; SameSite=SANITIZED
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
cf-cache-status:
|
||||
- DYNAMIC
|
||||
pragma:
|
||||
- no-cache
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
@@ -0,0 +1,53 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- GCM-iOS-5.7.2.1
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/weight-service/weight/dayview/2020-01-01
|
||||
response:
|
||||
body:
|
||||
string: '{"startDate": "2020-01-01", "endDate": "2020-01-01", "dateWeightList":
|
||||
[], "totalAverage": {"from": 1577836800000, "until": 1577923199999, "weight":
|
||||
null, "bmi": null, "bodyFat": null, "bodyWater": null, "boneMass": null, "muscleMass":
|
||||
null, "physiqueRating": null, "visceralFat": null, "metabolicAge": null}}'
|
||||
headers:
|
||||
CF-RAY:
|
||||
- 950644801ca4d9f7-QRO
|
||||
Cache-Control:
|
||||
- no-cache, no-store, private
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 16 Jun 2025 00:42:29 GMT
|
||||
NEL:
|
||||
- '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=BJIcx9Zh1zt1cLoKMZAVgYYQfsvpXBQP04VMD2f4iMyfjHCnNu5Sh%2BdA7NcZ2FkaJ7%2Bxw8up1nDASiKuMf8XqsAi1BYG2kqRNBvEQQEkvhY0L63y%2BXwDbb%2BUcurig3gGRUI3oNq%2F8II2iL62j6q0iLJ9pA%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- _cfuvid=SANITIZED; path=SANITIZED; domain=SANITIZED; HttpOnly; Secure; SameSite=SANITIZED
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
cf-cache-status:
|
||||
- DYNAMIC
|
||||
pragma:
|
||||
- no-cache
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
222
garth/tests/data/cassettes/test_hrv_data_get.yaml
Normal file
222
garth/tests/data/cassettes/test_hrv_data_get.yaml
Normal file
@@ -0,0 +1,222 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/hrv-service/hrv/2023-07-20
|
||||
response:
|
||||
body:
|
||||
string: '{"userProfilePk": 2591602, "hrvSummary": {"calendarDate": "2023-07-20",
|
||||
"weeklyAvg": 39, "lastNightAvg": 42, "lastNight5MinHigh": 66, "baseline":
|
||||
{"lowUpper": 36, "balancedLow": 39, "balancedUpper": 52, "markerValue": 0.25},
|
||||
"status": "BALANCED", "feedbackPhrase": "HRV_BALANCED_7", "createTimeStamp":
|
||||
"2023-07-20T12:14:11.898"}, "hrvReadings": [{"hrvValue": 54, "readingTimeGMT":
|
||||
"2023-07-20T05:29:48.0", "readingTimeLocal": "2023-07-19T23:29:48.0"}, {"hrvValue":
|
||||
56, "readingTimeGMT": "2023-07-20T05:34:48.0", "readingTimeLocal": "2023-07-19T23:34:48.0"},
|
||||
{"hrvValue": 51, "readingTimeGMT": "2023-07-20T05:39:48.0", "readingTimeLocal":
|
||||
"2023-07-19T23:39:48.0"}, {"hrvValue": 50, "readingTimeGMT": "2023-07-20T05:44:48.0",
|
||||
"readingTimeLocal": "2023-07-19T23:44:48.0"}, {"hrvValue": 55, "readingTimeGMT":
|
||||
"2023-07-20T05:49:48.0", "readingTimeLocal": "2023-07-19T23:49:48.0"}, {"hrvValue":
|
||||
55, "readingTimeGMT": "2023-07-20T05:54:48.0", "readingTimeLocal": "2023-07-19T23:54:48.0"},
|
||||
{"hrvValue": 55, "readingTimeGMT": "2023-07-20T05:59:48.0", "readingTimeLocal":
|
||||
"2023-07-19T23:59:48.0"}, {"hrvValue": 43, "readingTimeGMT": "2023-07-20T06:04:48.0",
|
||||
"readingTimeLocal": "2023-07-20T00:04:48.0"}, {"hrvValue": 53, "readingTimeGMT":
|
||||
"2023-07-20T06:09:48.0", "readingTimeLocal": "2023-07-20T00:09:48.0"}, {"hrvValue":
|
||||
53, "readingTimeGMT": "2023-07-20T06:14:48.0", "readingTimeLocal": "2023-07-20T00:14:48.0"},
|
||||
{"hrvValue": 41, "readingTimeGMT": "2023-07-20T06:19:48.0", "readingTimeLocal":
|
||||
"2023-07-20T00:19:48.0"}, {"hrvValue": 47, "readingTimeGMT": "2023-07-20T06:24:48.0",
|
||||
"readingTimeLocal": "2023-07-20T00:24:48.0"}, {"hrvValue": 45, "readingTimeGMT":
|
||||
"2023-07-20T06:29:48.0", "readingTimeLocal": "2023-07-20T00:29:48.0"}, {"hrvValue":
|
||||
38, "readingTimeGMT": "2023-07-20T06:34:48.0", "readingTimeLocal": "2023-07-20T00:34:48.0"},
|
||||
{"hrvValue": 33, "readingTimeGMT": "2023-07-20T06:39:48.0", "readingTimeLocal":
|
||||
"2023-07-20T00:39:48.0"}, {"hrvValue": 43, "readingTimeGMT": "2023-07-20T06:44:48.0",
|
||||
"readingTimeLocal": "2023-07-20T00:44:48.0"}, {"hrvValue": 49, "readingTimeGMT":
|
||||
"2023-07-20T06:49:48.0", "readingTimeLocal": "2023-07-20T00:49:48.0"}, {"hrvValue":
|
||||
43, "readingTimeGMT": "2023-07-20T06:54:48.0", "readingTimeLocal": "2023-07-20T00:54:48.0"},
|
||||
{"hrvValue": 47, "readingTimeGMT": "2023-07-20T06:59:48.0", "readingTimeLocal":
|
||||
"2023-07-20T00:59:48.0"}, {"hrvValue": 38, "readingTimeGMT": "2023-07-20T07:04:48.0",
|
||||
"readingTimeLocal": "2023-07-20T01:04:48.0"}, {"hrvValue": 39, "readingTimeGMT":
|
||||
"2023-07-20T07:09:48.0", "readingTimeLocal": "2023-07-20T01:09:48.0"}, {"hrvValue":
|
||||
33, "readingTimeGMT": "2023-07-20T07:14:48.0", "readingTimeLocal": "2023-07-20T01:14:48.0"},
|
||||
{"hrvValue": 43, "readingTimeGMT": "2023-07-20T07:19:48.0", "readingTimeLocal":
|
||||
"2023-07-20T01:19:48.0"}, {"hrvValue": 45, "readingTimeGMT": "2023-07-20T07:24:48.0",
|
||||
"readingTimeLocal": "2023-07-20T01:24:48.0"}, {"hrvValue": 36, "readingTimeGMT":
|
||||
"2023-07-20T07:29:48.0", "readingTimeLocal": "2023-07-20T01:29:48.0"}, {"hrvValue":
|
||||
47, "readingTimeGMT": "2023-07-20T07:34:48.0", "readingTimeLocal": "2023-07-20T01:34:48.0"},
|
||||
{"hrvValue": 46, "readingTimeGMT": "2023-07-20T07:39:48.0", "readingTimeLocal":
|
||||
"2023-07-20T01:39:48.0"}, {"hrvValue": 53, "readingTimeGMT": "2023-07-20T07:44:48.0",
|
||||
"readingTimeLocal": "2023-07-20T01:44:48.0"}, {"hrvValue": 35, "readingTimeGMT":
|
||||
"2023-07-20T07:49:48.0", "readingTimeLocal": "2023-07-20T01:49:48.0"}, {"hrvValue":
|
||||
28, "readingTimeGMT": "2023-07-20T07:54:48.0", "readingTimeLocal": "2023-07-20T01:54:48.0"},
|
||||
{"hrvValue": 30, "readingTimeGMT": "2023-07-20T07:59:48.0", "readingTimeLocal":
|
||||
"2023-07-20T01:59:48.0"}, {"hrvValue": 38, "readingTimeGMT": "2023-07-20T08:04:48.0",
|
||||
"readingTimeLocal": "2023-07-20T02:04:48.0"}, {"hrvValue": 49, "readingTimeGMT":
|
||||
"2023-07-20T08:09:48.0", "readingTimeLocal": "2023-07-20T02:09:48.0"}, {"hrvValue":
|
||||
46, "readingTimeGMT": "2023-07-20T08:14:48.0", "readingTimeLocal": "2023-07-20T02:14:48.0"},
|
||||
{"hrvValue": 31, "readingTimeGMT": "2023-07-20T08:19:48.0", "readingTimeLocal":
|
||||
"2023-07-20T02:19:48.0"}, {"hrvValue": 29, "readingTimeGMT": "2023-07-20T08:24:48.0",
|
||||
"readingTimeLocal": "2023-07-20T02:24:48.0"}, {"hrvValue": 32, "readingTimeGMT":
|
||||
"2023-07-20T08:29:48.0", "readingTimeLocal": "2023-07-20T02:29:48.0"}, {"hrvValue":
|
||||
27, "readingTimeGMT": "2023-07-20T08:34:48.0", "readingTimeLocal": "2023-07-20T02:34:48.0"},
|
||||
{"hrvValue": 31, "readingTimeGMT": "2023-07-20T08:39:48.0", "readingTimeLocal":
|
||||
"2023-07-20T02:39:48.0"}, {"hrvValue": 33, "readingTimeGMT": "2023-07-20T08:44:48.0",
|
||||
"readingTimeLocal": "2023-07-20T02:44:48.0"}, {"hrvValue": 32, "readingTimeGMT":
|
||||
"2023-07-20T08:49:48.0", "readingTimeLocal": "2023-07-20T02:49:48.0"}, {"hrvValue":
|
||||
29, "readingTimeGMT": "2023-07-20T08:54:48.0", "readingTimeLocal": "2023-07-20T02:54:48.0"},
|
||||
{"hrvValue": 35, "readingTimeGMT": "2023-07-20T08:59:48.0", "readingTimeLocal":
|
||||
"2023-07-20T02:59:48.0"}, {"hrvValue": 30, "readingTimeGMT": "2023-07-20T09:04:48.0",
|
||||
"readingTimeLocal": "2023-07-20T03:04:48.0"}, {"hrvValue": 32, "readingTimeGMT":
|
||||
"2023-07-20T09:09:48.0", "readingTimeLocal": "2023-07-20T03:09:48.0"}, {"hrvValue":
|
||||
37, "readingTimeGMT": "2023-07-20T09:14:48.0", "readingTimeLocal": "2023-07-20T03:14:48.0"},
|
||||
{"hrvValue": 40, "readingTimeGMT": "2023-07-20T09:19:48.0", "readingTimeLocal":
|
||||
"2023-07-20T03:19:48.0"}, {"hrvValue": 39, "readingTimeGMT": "2023-07-20T09:24:48.0",
|
||||
"readingTimeLocal": "2023-07-20T03:24:48.0"}, {"hrvValue": 47, "readingTimeGMT":
|
||||
"2023-07-20T09:29:48.0", "readingTimeLocal": "2023-07-20T03:29:48.0"}, {"hrvValue":
|
||||
45, "readingTimeGMT": "2023-07-20T09:34:48.0", "readingTimeLocal": "2023-07-20T03:34:48.0"},
|
||||
{"hrvValue": 43, "readingTimeGMT": "2023-07-20T09:39:48.0", "readingTimeLocal":
|
||||
"2023-07-20T03:39:48.0"}, {"hrvValue": 31, "readingTimeGMT": "2023-07-20T09:44:48.0",
|
||||
"readingTimeLocal": "2023-07-20T03:44:48.0"}, {"hrvValue": 35, "readingTimeGMT":
|
||||
"2023-07-20T09:49:48.0", "readingTimeLocal": "2023-07-20T03:49:48.0"}, {"hrvValue":
|
||||
40, "readingTimeGMT": "2023-07-20T09:54:48.0", "readingTimeLocal": "2023-07-20T03:54:48.0"},
|
||||
{"hrvValue": 44, "readingTimeGMT": "2023-07-20T09:59:48.0", "readingTimeLocal":
|
||||
"2023-07-20T03:59:48.0"}, {"hrvValue": 35, "readingTimeGMT": "2023-07-20T10:04:48.0",
|
||||
"readingTimeLocal": "2023-07-20T04:04:48.0"}, {"hrvValue": 43, "readingTimeGMT":
|
||||
"2023-07-20T10:09:48.0", "readingTimeLocal": "2023-07-20T04:09:48.0"}, {"hrvValue":
|
||||
54, "readingTimeGMT": "2023-07-20T10:14:48.0", "readingTimeLocal": "2023-07-20T04:14:48.0"},
|
||||
{"hrvValue": 57, "readingTimeGMT": "2023-07-20T10:19:48.0", "readingTimeLocal":
|
||||
"2023-07-20T04:19:48.0"}, {"hrvValue": 66, "readingTimeGMT": "2023-07-20T10:24:48.0",
|
||||
"readingTimeLocal": "2023-07-20T04:24:48.0"}, {"hrvValue": 58, "readingTimeGMT":
|
||||
"2023-07-20T10:29:48.0", "readingTimeLocal": "2023-07-20T04:29:48.0"}, {"hrvValue":
|
||||
61, "readingTimeGMT": "2023-07-20T10:34:48.0", "readingTimeLocal": "2023-07-20T04:34:48.0"},
|
||||
{"hrvValue": 45, "readingTimeGMT": "2023-07-20T10:39:48.0", "readingTimeLocal":
|
||||
"2023-07-20T04:39:48.0"}, {"hrvValue": 52, "readingTimeGMT": "2023-07-20T10:44:48.0",
|
||||
"readingTimeLocal": "2023-07-20T04:44:48.0"}, {"hrvValue": 43, "readingTimeGMT":
|
||||
"2023-07-20T10:49:48.0", "readingTimeLocal": "2023-07-20T04:49:48.0"}, {"hrvValue":
|
||||
33, "readingTimeGMT": "2023-07-20T10:54:48.0", "readingTimeLocal": "2023-07-20T04:54:48.0"},
|
||||
{"hrvValue": 31, "readingTimeGMT": "2023-07-20T10:59:48.0", "readingTimeLocal":
|
||||
"2023-07-20T04:59:48.0"}, {"hrvValue": 11, "readingTimeGMT": "2023-07-20T11:04:48.0",
|
||||
"readingTimeLocal": "2023-07-20T05:04:48.0"}, {"hrvValue": 32, "readingTimeGMT":
|
||||
"2023-07-20T11:09:48.0", "readingTimeLocal": "2023-07-20T05:09:48.0"}, {"hrvValue":
|
||||
38, "readingTimeGMT": "2023-07-20T11:14:48.0", "readingTimeLocal": "2023-07-20T05:14:48.0"},
|
||||
{"hrvValue": 38, "readingTimeGMT": "2023-07-20T11:19:48.0", "readingTimeLocal":
|
||||
"2023-07-20T05:19:48.0"}, {"hrvValue": 29, "readingTimeGMT": "2023-07-20T11:24:48.0",
|
||||
"readingTimeLocal": "2023-07-20T05:24:48.0"}, {"hrvValue": 38, "readingTimeGMT":
|
||||
"2023-07-20T11:29:48.0", "readingTimeLocal": "2023-07-20T05:29:48.0"}, {"hrvValue":
|
||||
27, "readingTimeGMT": "2023-07-20T11:34:48.0", "readingTimeLocal": "2023-07-20T05:34:48.0"},
|
||||
{"hrvValue": 30, "readingTimeGMT": "2023-07-20T11:39:48.0", "readingTimeLocal":
|
||||
"2023-07-20T05:39:48.0"}, {"hrvValue": 55, "readingTimeGMT": "2023-07-20T11:44:48.0",
|
||||
"readingTimeLocal": "2023-07-20T05:44:48.0"}, {"hrvValue": 33, "readingTimeGMT":
|
||||
"2023-07-20T11:49:48.0", "readingTimeLocal": "2023-07-20T05:49:48.0"}, {"hrvValue":
|
||||
40, "readingTimeGMT": "2023-07-20T11:54:48.0", "readingTimeLocal": "2023-07-20T05:54:48.0"},
|
||||
{"hrvValue": 42, "readingTimeGMT": "2023-07-20T11:59:48.0", "readingTimeLocal":
|
||||
"2023-07-20T05:59:48.0"}, {"hrvValue": 50, "readingTimeGMT": "2023-07-20T12:04:48.0",
|
||||
"readingTimeLocal": "2023-07-20T06:04:48.0"}, {"hrvValue": 38, "readingTimeGMT":
|
||||
"2023-07-20T12:09:48.0", "readingTimeLocal": "2023-07-20T06:09:48.0"}], "startTimestampGMT":
|
||||
"2023-07-20T05:25:00.0", "endTimestampGMT": "2023-07-20T12:09:48.0", "startTimestampLocal":
|
||||
"2023-07-19T23:25:00.0", "endTimestampLocal": "2023-07-20T06:09:48.0", "sleepStartTimestampGMT":
|
||||
"2023-07-20T05:25:00.0", "sleepEndTimestampGMT": "2023-07-20T12:11:00.0",
|
||||
"sleepStartTimestampLocal": "2023-07-19T23:25:00.0", "sleepEndTimestampLocal":
|
||||
"2023-07-20T06:11:00.0"}'
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7fea5791ac5b155e-QRO
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Wed, 30 Aug 2023 04:38:03 GMT
|
||||
NEL:
|
||||
- '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=WPNDBwn%2Bfxqb0O6vEmlCrJ8G95qISZzDCH%2BKyUwlszTlFuY1obIOOv%2Flxxab8UwAeJMjXilnv4GT5%2Be6xR62sdLvcthLHgBQS9Imf3tn%2FOtkM0RaVRGP7MnFn1Klb26eMJo3fXWLjw%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
cache-control:
|
||||
- no-cache, no-store, private
|
||||
pragma:
|
||||
- no-cache
|
||||
set-cookie:
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- SameSite=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- _cfuvid=SANITIZED; path=SANITIZED; domain=SANITIZED; HttpOnly; Secure; SameSite=SANITIZED
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
Cookie:
|
||||
- _cfuvid=SANITIZED; ADRUM_BT1=SANITIZED; ADRUM_BTa=SANITIZED; SameSite=SANITIZED
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/hrv-service/hrv/2021-07-20
|
||||
response:
|
||||
body:
|
||||
string: ''
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7fea5792ff3b154b-QRO
|
||||
Connection:
|
||||
- keep-alive
|
||||
Date:
|
||||
- Wed, 30 Aug 2023 04:38:04 GMT
|
||||
NEL:
|
||||
- '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=AbFAU6ePddXCH6t5Ivd3iEs8icSg%2BboWeYfDzAOhakCxvGS0NvnCzxvNFMi5Cog2IvU82WhBEv8tUKYeIFzeOW%2BvE4c%2BQ1E4RCmoWq%2FeAc859qFp7U0wQgbZXS%2F5r8dBFEb0244AOA%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
||||
Server:
|
||||
- cloudflare
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
cache-control:
|
||||
- no-cache, no-store, private
|
||||
pragma:
|
||||
- no-cache
|
||||
set-cookie:
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- SameSite=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
status:
|
||||
code: 204
|
||||
message: No Content
|
||||
version: 1
|
||||
162
garth/tests/data/cassettes/test_hrv_data_list.yaml
Normal file
162
garth/tests/data/cassettes/test_hrv_data_list.yaml
Normal file
@@ -0,0 +1,162 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/hrv-service/hrv/2023-07-20
|
||||
response:
|
||||
body:
|
||||
string: !!binary |
|
||||
H4sIAAAAAAAAA52aXU/bMBSG/4uvA/LxRxLnjg00LgAh6LiZJhRa01ZNP5S0IIT636cUiiizd975
|
||||
ksT49WMnT46TvopN59vrdvk4bfz1TFTKOsqlysSkfbrdzOd1+yKqVzGsG78Y1e1pvfaiEkoqfSSL
|
||||
IyVFJp69nzUvJ09jUWmXiabu1lfT8WS9O2LUpyP2cro4n44nosrzTDzUnW+mC9/33yyff65WvhWV
|
||||
3p1p6sXQjy6Wz2997g+8t7EqE/O6nfn2rm42XlTyWNltJrp1vd50ohLfTi5Orr6fnYpMPHo/eqiH
|
||||
s+tJW3f92M9v7u735+8LkYlh6+u1H0zn/nZdz1cHeANSFZmK6Lh0pdjupuXG16PpYtyJ6tdr//f7
|
||||
GKzJRPt2qu/rx+XgsCdpK+UqUx73c/ap4cVyWDefmpIbKP3RdJsdZORshjZwxr7plwziM3AOHeaQ
|
||||
bIbBOUyYw/IZOIdxiRkW57CpHBbnsEEOo5mMvJIIR99UfjT9wgFkODzDJWYQzkFBDkN8Bs5B4fUo
|
||||
2AyFc6gwh+UzcI6wr3TJZmicI+wrza+5xjl06v1hcI6wr4zjM3AOk8phcY6wr4Br1+IcNu26KnBf
|
||||
UcRX2vEZDs9wSddugfuKYr4CMnCOiK8sm6FwjrCvdM5n4BwqzbsF7iuK+MrwHBrn0GnPwQL3FUV8
|
||||
pfk1NzhH2FeKv88tzhH2lZZ8Bs6R6KsS95WK+Ip9fpS4r1TEV+y1W+K+UhFfaeIzcI6wrxQ/Vwrn
|
||||
iPhK8Rk4R9hXqmAzNM6hU9dD4xw67TlY4r5SMV/x62FwDpN6XVmcw6Z5t8R9pWK+4pzocF/pWH2l
|
||||
+AyHZ4Q5CjaDcI5IfcXPFeEcYV+xtajDfaVj+0F+rhTOodLqRIf7Kvb+iq13He6r2Psr1okO95VO
|
||||
ra8c7qvY+yvg2rU4R2Q/aPgMnCPiK2auSOK+MrH6SvMZDs8I1+2GzSCcI+wrW/AZOEfYV3nOZiic
|
||||
I+wrW/IZOEfYVzmxGRrn0Env4UjivjKx/aBiMwzOYVLvD4NzmKQ6kSTuKxOrr/g1tzhH2FfEZRDu
|
||||
K5tYXxHhvrKx+qpkMwjniOwHgQycI20/SIT7ysb2gzyHwjnS9oNEuK9sbD8o+QycQyd9VyPCfWVj
|
||||
9ZXmM3COtPqKCPeVjdVX/H1ucQ6b9L2WFO6rPOarks9weMae4/fuZwHtum/a9d/3gx/mbSXlrmO/
|
||||
GMVbHgzhsNfIV/xgv/8ecSa6xvvV7X8MevcPZ8zIe9/LWP/c8P9KCDPsM7Z/ALlCPuhYIgAA
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 812800c81f4c479e-DFW
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Sat, 07 Oct 2023 17:53:20 GMT
|
||||
NEL:
|
||||
- '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=1efXaZ9bQvYJF8jZkRNJeCENTFUGwDN6ljNCY3V9t8M17uF6Eq4aI4bI%2BrhUvg2sw5dEWCCf7SVlDKE0sYvbYE1MtrVNYOqposaDhcgu3w7t9t1Vpz1Lher36IKgicfzMAEw5RmXtw%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- SameSite=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- _cfuvid=SANITIZED; path=SANITIZED; domain=SANITIZED; HttpOnly; Secure; SameSite=SANITIZED
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
cache-control:
|
||||
- no-cache, no-store, private
|
||||
pragma:
|
||||
- no-cache
|
||||
set-cookie:
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- SameSite=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- _cfuvid=SANITIZED; path=SANITIZED; domain=SANITIZED; HttpOnly; Secure; SameSite=SANITIZED
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
Cookie:
|
||||
- _cfuvid=SANITIZED; ADRUM_BT1=SANITIZED; ADRUM_BTa=SANITIZED; SameSite=SANITIZED
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/hrv-service/hrv/2023-07-19
|
||||
response:
|
||||
body:
|
||||
string: !!binary |
|
||||
H4sIAAAAAAAAA52aUW/TPBSG/4uvw+Rz7JPUuRsf6ONioIn14wYhFFqzVUu7Ke2Y0LT//qmFTVT4
|
||||
cF58ucTz68eOn9pOHtzdNk/n083X1ZjPr13Pkqj13Lir6dvF3Xo9TN9d/+AWw5g3y2F6Neyy6x17
|
||||
Di9894KSa9x9ztfj99Nvl64PqXHjsN29W11e7Q5XYvjlirxdbd6sLq9c3/rGfRm2eVxt8r7+8eb+
|
||||
v9vbPLk+tPs747BZ5OXZzf2POp8u/Cwj3Lj1MF3n6cMw3mXX+xOWx8Ztd8Pubut69/L07PTdP69f
|
||||
ucZ9zXn5ZVhcn19Nw3bf9jfvP3x+uv85usYtpjzs8ny1zhe7YX17hDen2MfQU3sSUnSPh255n4fl
|
||||
anO5df3Hh/3fP9sQuXHTj1v7uv59Oz+uyUsfUh9nJ94dFTy7WQzjr0Vncw7PRR+bv8yIEc54Knqc
|
||||
EcTOwDlimcObGYJzSJmjtTNwDilyhJmR0fYe4khz75+LHmdwZ2ckPKPIwcnMIJyDyuMBZOAcVB6P
|
||||
YGYwzsFlDrYzcA4uz49oZgScI5SfK/vZDThH2VdAX0WcQ/GVzRFxjkpftaCvDhlS+1wJziF186PD
|
||||
fUWKr5CMhGeUOTozg3AOqvv96HBfkeYrm4NxjrKvxOZgnIPr5keH+4oUX0WbI+AcyvpqZmZEnKPs
|
||||
KyQD54i181xwjkpfdbivSPOVNeYz3Fes+CqSnZHwjLp5PsN9xZqv2M7AOcq+EruvGOeo9NUM9xVr
|
||||
vrI5As6h+Moe84BzKOurZGZEnKPsK/F2Bs6hrK9sDsE5pJZDcA6pmx8J91VQfCViZyQ8o8zRmRmE
|
||||
c1DdeCTcV0HxVbT7inEOrluXJNxXQfPVzMwIOIfiq2Rn4BxlXwmbGRHniLXPVcQ5Yi2H4BxlX7U2
|
||||
h+Aciq+M54o87quo+SrYGQnPqBoP8rivouIra49DHvdV1Hxl9xXjHFx1XkIe91VUfBWimRFwjlC1
|
||||
PyeP+ypq+0E7I+IcdftB8rivouIrFjNDcI6yr9juK8E5yr5ia54T7ivR9oOdnZHwjKrzEiLcV1Lr
|
||||
K8J9Jdp+MJgZjHNw1XsDItxXovhK7DEPOEfZV2I/uwHnqFtfEeG+ksr3g0S4r0Q7v7IzBOeQut9B
|
||||
wn0liq+sNTUx7qtWO2/v7IyEZ1TtP4hxX7XafjDYGThHpa8Y91WrnV+JnYFzcNW5DzHuq1ZbX0U7
|
||||
A+eoez9IjPuq1dZX9phHnOPZV58On5tMu33R7f67EeWDD+8PFefNUi951ITjWtWvQwr1/rnFjduO
|
||||
Od9e/EWjD//w2mi5UB9Fq99q/m8JZYanjMf/AU1pYOmwJAAA
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 812800c8f836479e-DFW
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Encoding:
|
||||
- gzip
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Sat, 07 Oct 2023 17:53:20 GMT
|
||||
NEL:
|
||||
- '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=aYF7%2Fjff6q%2BSW3DoLj4L0k%2BOVpTIJg1uTyZAJlPPxWfk8qcKnyoYSbdeMeFKDwiveT57hbjuS7p2fiY%2FKfvkmhY4ie2PKVugdBz29e64xajlg0jA3eE5e9fSMkV%2BZHMbJkLa4r%2BPOw%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
cache-control:
|
||||
- no-cache, no-store, private
|
||||
pragma:
|
||||
- no-cache
|
||||
set-cookie:
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- SameSite=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
170
garth/tests/data/cassettes/test_sleep_data_get.yaml
Normal file
170
garth/tests/data/cassettes/test_sleep_data_get.yaml
Normal file
@@ -0,0 +1,170 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/userprofile-service/socialProfile
|
||||
response:
|
||||
body:
|
||||
string: '{"id": 3154645, "profileId": 2591602, "garminGUID": "0690cc1d-d23d-4412-b027-80fd4ed1c0f6",
|
||||
"displayName": "mtamizi", "fullName": "Matin Tamizi", "userName": "mtamizi",
|
||||
"profileImageUuid": "73240e81-6e4d-43fc-8af8-c8f6c51b3b8f", "profileImageUrlLarge":
|
||||
"https://s3.amazonaws.com/garmin-connect-prod/profile_images/73240e81-6e4d-43fc-8af8-c8f6c51b3b8f-2591602.png",
|
||||
"profileImageUrlMedium": "https://s3.amazonaws.com/garmin-connect-prod/profile_images/685a19e9-a7be-4a11-9bf9-faca0c5d1f1a-2591602.png",
|
||||
"profileImageUrlSmall": "https://s3.amazonaws.com/garmin-connect-prod/profile_images/6302f021-0ec7-4dc9-b0c3-d5a19bc5a08c-2591602.png",
|
||||
"location": "Ciudad de M\u00e9xico, CDMX", "facebookUrl": null, "twitterUrl":
|
||||
null, "personalWebsite": null, "motivation": null, "bio": null, "primaryActivity":
|
||||
null, "favoriteActivityTypes": [], "runningTrainingSpeed": 0.0, "cyclingTrainingSpeed":
|
||||
0.0, "favoriteCyclingActivityTypes": [], "cyclingClassification": null, "cyclingMaxAvgPower":
|
||||
0.0, "swimmingTrainingSpeed": 0.0, "profileVisibility": "private", "activityStartVisibility":
|
||||
"private", "activityMapVisibility": "public", "courseVisibility": "public",
|
||||
"activityHeartRateVisibility": "public", "activityPowerVisibility": "public",
|
||||
"badgeVisibility": "private", "showAge": false, "showWeight": false, "showHeight":
|
||||
false, "showWeightClass": false, "showAgeRange": false, "showGender": false,
|
||||
"showActivityClass": false, "showVO2Max": false, "showPersonalRecords": false,
|
||||
"showLast12Months": false, "showLifetimeTotals": false, "showUpcomingEvents":
|
||||
false, "showRecentFavorites": false, "showRecentDevice": false, "showRecentGear":
|
||||
false, "showBadges": true, "otherActivity": null, "otherPrimaryActivity":
|
||||
null, "otherMotivation": null, "userRoles": ["SCOPE_ATP_READ", "SCOPE_ATP_WRITE",
|
||||
"SCOPE_COMMUNITY_COURSE_READ", "SCOPE_COMMUNITY_COURSE_WRITE", "SCOPE_CONNECT_READ",
|
||||
"SCOPE_CONNECT_WRITE", "SCOPE_DT_CLIENT_ANALYTICS_WRITE", "SCOPE_GARMINPAY_READ",
|
||||
"SCOPE_GARMINPAY_WRITE", "SCOPE_GCOFFER_READ", "SCOPE_GCOFFER_WRITE", "SCOPE_GHS_SAMD",
|
||||
"SCOPE_GHS_UPLOAD", "SCOPE_GOLF_API_READ", "SCOPE_GOLF_API_WRITE", "SCOPE_INSIGHTS_READ",
|
||||
"SCOPE_INSIGHTS_WRITE", "SCOPE_PRODUCT_SEARCH_READ", "ROLE_CONNECTUSER", "ROLE_FITNESS_USER",
|
||||
"ROLE_WELLNESS_USER", "ROLE_OUTDOOR_USER", "ROLE_CONNECT_2_USER", "ROLE_TACX_APP_USER"],
|
||||
"nameApproved": true, "userProfileFullName": "Matin Tamizi", "makeGolfScorecardsPrivate":
|
||||
true, "allowGolfLiveScoring": false, "allowGolfScoringByConnections": true,
|
||||
"userLevel": 3, "userPoint": 117, "levelUpdateDate": "2020-12-12T15:20:38.0",
|
||||
"levelIsViewed": false, "levelPointThreshold": 140, "userPointOffset": 0,
|
||||
"userPro": false}'
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7f12d0081a724797-DFW
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Type:
|
||||
- application/json;charset=UTF-8
|
||||
Date:
|
||||
- Fri, 04 Aug 2023 00:51:33 GMT
|
||||
NEL:
|
||||
- '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=7Jm3%2BQkQNnW8yDQr8zz%2FW93FRmApY0UugFBzK5SgwmO8atpbxSWdU7uz2UcLfuGZajQJkLQ28E%2FBQ7f0ki9S6f2eY3EDSfVn7CNNgmuZdvo38guNpuMK5guqKP3cYIQy4fF5GLPHUQ%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
cache-control:
|
||||
- no-cache, no-store, private
|
||||
pragma:
|
||||
- no-cache
|
||||
set-cookie:
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- SameSite=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- _cfuvid=SANITIZED; path=SANITIZED; domain=SANITIZED; HttpOnly; Secure; SameSite=SANITIZED
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
Cookie:
|
||||
- _cfuvid=SANITIZED; ADRUM_BT1=SANITIZED; ADRUM_BTa=SANITIZED; SameSite=SANITIZED
|
||||
User-Agent:
|
||||
- Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15
|
||||
(KHTML, like Gecko) Mobile/15E148
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/wellness-service/wellness/dailySleepData/mtamizi?nonSleepBufferMinutes=60&date=2021-07-20
|
||||
response:
|
||||
body:
|
||||
string: '{"dailySleepDTO": {"id": 1626758400000, "userProfilePK": 2591602, "calendarDate":
|
||||
"2021-07-20", "sleepTimeSeconds": 25740, "napTimeSeconds": 0, "sleepWindowConfirmed":
|
||||
true, "sleepWindowConfirmationType": "enhanced_confirmed_final", "sleepStartTimestampGMT":
|
||||
1626758400000, "sleepEndTimestampGMT": 1626785940000, "sleepStartTimestampLocal":
|
||||
1626740400000, "sleepEndTimestampLocal": 1626767940000, "autoSleepStartTimestampGMT":
|
||||
null, "autoSleepEndTimestampGMT": null, "sleepQualityTypePK": null, "sleepResultTypePK":
|
||||
null, "unmeasurableSleepSeconds": 0, "deepSleepSeconds": 4440, "lightSleepSeconds":
|
||||
18720, "remSleepSeconds": 2580, "awakeSleepSeconds": 1800, "deviceRemCapable":
|
||||
true, "retro": false, "sleepFromDevice": true, "averageSpO2Value": 92.0, "lowestSpO2Value":
|
||||
84, "highestSpO2Value": 100, "averageSpO2HRSleep": 51.0, "averageRespirationValue":
|
||||
15.0, "lowestRespirationValue": 8.0, "highestRespirationValue": 18.0, "sleepVersion":
|
||||
1}, "sleepMovement": [], "remSleepData": true, "sleepLevels": [], "wellnessSpO2SleepSummaryDTO":
|
||||
{"userProfilePk": 2591602, "deviceId": 3329978681, "sleepMeasurementStartGMT":
|
||||
"2021-07-20T05:21:00.0", "sleepMeasurementEndGMT": "2021-07-20T12:56:00.0",
|
||||
"alertThresholdValue": null, "numberOfEventsBelowThreshold": null, "durationOfEventsBelowThreshold":
|
||||
null, "averageSPO2": 92.0, "averageSpO2HR": 51.0, "lowestSPO2": 84}}'
|
||||
headers:
|
||||
CF-Cache-Status:
|
||||
- DYNAMIC
|
||||
CF-RAY:
|
||||
- 7f12d0093b58b6e2-QRO
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Type:
|
||||
- application/json;charset=UTF-8
|
||||
Date:
|
||||
- Fri, 04 Aug 2023 00:51:34 GMT
|
||||
NEL:
|
||||
- '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=asU9NqPsuSmxxN96St1ca3wY06WSkANwfXch1MOBitkjzSuq45fyuSUC%2BXGE%2F7S9FHwRT13HYOi%2FDLINfwbYmWT9Vrwld3zjhkDxpGkSP2EsN7vdWSKXrF23uV3RSIoBkU9JthnrZQ%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
||||
Server:
|
||||
- cloudflare
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
cache-control:
|
||||
- no-cache, no-store, private
|
||||
pragma:
|
||||
- no-cache
|
||||
set-cookie:
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- ADRUM_BTa=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- SameSite=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
- ADRUM_BT1=SANITIZED; Max-Age=SANITIZED; Expires=SANITIZED; Path=SANITIZED;
|
||||
Secure
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
1665
garth/tests/data/cassettes/test_sleep_data_list.yaml
Normal file
1665
garth/tests/data/cassettes/test_sleep_data_list.yaml
Normal file
File diff suppressed because it is too large
Load Diff
97
garth/tests/data/cassettes/test_weight_data_list.yaml
Normal file
97
garth/tests/data/cassettes/test_weight_data_list.yaml
Normal file
@@ -0,0 +1,97 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- GCM-iOS-5.7.2.1
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/weight-service/weight/range/2025-06-01/2025-06-15?includeAll=true
|
||||
response:
|
||||
body:
|
||||
string: '{"dailyWeightSummaries": [{"summaryDate": "2025-06-15", "numOfWeightEntries":
|
||||
1, "minWeight": 59720.0, "maxWeight": 59720.0, "latestWeight": {"samplePk":
|
||||
1749996902851, "date": 1749975276000, "calendarDate": "2025-06-15", "weight":
|
||||
59720.0, "bmi": 22.799999237060547, "bodyFat": 19.3, "bodyWater": 58.9, "boneMass":
|
||||
3539, "muscleMass": 26979, "physiqueRating": null, "visceralFat": null, "metabolicAge":
|
||||
null, "sourceType": "INDEX_SCALE", "timestampGMT": 1749996876000, "weightDelta":
|
||||
200.00000000000284}, "allWeightMetrics": [{"samplePk": 1749996902851, "date":
|
||||
1749975276000, "calendarDate": "2025-06-15", "weight": 59720.0, "bmi": 22.799999237060547,
|
||||
"bodyFat": 19.3, "bodyWater": 58.9, "boneMass": 3539, "muscleMass": 26979,
|
||||
"physiqueRating": null, "visceralFat": null, "metabolicAge": null, "sourceType":
|
||||
"INDEX_SCALE", "timestampGMT": 1749996876000, "weightDelta": 200.00000000000284}]},
|
||||
{"summaryDate": "2025-06-14", "numOfWeightEntries": 2, "minWeight": 59130.0,
|
||||
"maxWeight": 59500.0, "latestWeight": {"samplePk": 1749948744411, "date":
|
||||
1749927125175, "calendarDate": "2025-06-14", "weight": 59500.0, "bmi": null,
|
||||
"bodyFat": null, "bodyWater": null, "boneMass": null, "muscleMass": null,
|
||||
"physiqueRating": null, "visceralFat": null, "metabolicAge": null, "sourceType":
|
||||
"MANUAL", "timestampGMT": 1749948725175, "weightDelta": 299.99999999999716},
|
||||
"allWeightMetrics": [{"samplePk": 1749948744411, "date": 1749927125175, "calendarDate":
|
||||
"2025-06-14", "weight": 59500.0, "bmi": null, "bodyFat": null, "bodyWater":
|
||||
null, "boneMass": null, "muscleMass": null, "physiqueRating": null, "visceralFat":
|
||||
null, "metabolicAge": null, "sourceType": "MANUAL", "timestampGMT": 1749948725175,
|
||||
"weightDelta": 399.9999999999986}, {"samplePk": 1749909217098, "date": 1749887580000,
|
||||
"calendarDate": "2025-06-14", "weight": 59130.0, "bmi": 22.5, "bodyFat": 20.3,
|
||||
"bodyWater": 58.2, "boneMass": 3430, "muscleMass": 26840, "physiqueRating":
|
||||
null, "visceralFat": null, "metabolicAge": null, "sourceType": "INDEX_SCALE",
|
||||
"timestampGMT": 1749909180000, "weightDelta": -100.00000000000142}]}, {"summaryDate":
|
||||
"2025-06-07", "numOfWeightEntries": 1, "minWeight": 59189.0, "maxWeight":
|
||||
59189.0, "latestWeight": {"samplePk": 1749307692871, "date": 1749286058000,
|
||||
"calendarDate": "2025-06-07", "weight": 59189.0, "bmi": 22.600000381469727,
|
||||
"bodyFat": 20.0, "bodyWater": 58.4, "boneMass": 3450, "muscleMass": 26850,
|
||||
"physiqueRating": null, "visceralFat": null, "metabolicAge": null, "sourceType":
|
||||
"INDEX_SCALE", "timestampGMT": 1749307658000, "weightDelta": 500.0}, "allWeightMetrics":
|
||||
[{"samplePk": 1749307692871, "date": 1749286058000, "calendarDate": "2025-06-07",
|
||||
"weight": 59189.0, "bmi": 22.600000381469727, "bodyFat": 20.0, "bodyWater":
|
||||
58.4, "boneMass": 3450, "muscleMass": 26850, "physiqueRating": null, "visceralFat":
|
||||
null, "metabolicAge": null, "sourceType": "INDEX_SCALE", "timestampGMT": 1749307658000,
|
||||
"weightDelta": 500.0}]}], "totalAverage": {"from": 1748736000000, "until":
|
||||
1750031999999, "weight": 59469.666666666664, "bmi": 22.699999809265137, "bodyFat":
|
||||
19.7, "bodyWater": 58.7, "boneMass": 3494, "muscleMass": 26914, "physiqueRating":
|
||||
null, "visceralFat": null, "metabolicAge": null}, "previousDateWeight": {"samplePk":
|
||||
1748709464191, "date": 1748687805000, "calendarDate": "2025-05-31", "weight":
|
||||
58700.0, "bmi": 22.399999618530273, "bodyFat": 20.7, "bodyWater": 57.9, "boneMass":
|
||||
3369, "muscleMass": 26729, "physiqueRating": null, "visceralFat": null, "metabolicAge":
|
||||
null, "sourceType": "INDEX_SCALE", "timestampGMT": 1748709405000, "weightDelta":
|
||||
null}, "nextDateWeight": {"samplePk": null, "date": null, "calendarDate":
|
||||
null, "weight": null, "bmi": null, "bodyFat": null, "bodyWater": null, "boneMass":
|
||||
null, "muscleMass": null, "physiqueRating": null, "visceralFat": null, "metabolicAge":
|
||||
null, "sourceType": null, "timestampGMT": null, "weightDelta": null}}'
|
||||
headers:
|
||||
CF-RAY:
|
||||
- 95064b68690b1f84-QRO
|
||||
Cache-Control:
|
||||
- no-cache, no-store, private
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 16 Jun 2025 00:47:12 GMT
|
||||
NEL:
|
||||
- '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=9ExXlb7xohhNWV42MyBDMFTW8fcvDW7s7NvGZZsQ7QjtfUyT%2FYq2LTKDwbG1mdwpyUYacYYBjzSOZNw3Tu8MfsrfLBPOgWE4LsgwmirKigo5mVi5%2FJqIfZgyWULExMxPoeX88D%2B6iXcluwUE8dlp4VL2yA%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- _cfuvid=SANITIZED; path=SANITIZED; domain=SANITIZED; HttpOnly; Secure; SameSite=SANITIZED
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
cf-cache-status:
|
||||
- DYNAMIC
|
||||
pragma:
|
||||
- no-cache
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
61
garth/tests/data/cassettes/test_weight_data_list_empty.yaml
Normal file
61
garth/tests/data/cassettes/test_weight_data_list_empty.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- GCM-iOS-5.7.2.1
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/weight-service/weight/range/2019-12-18/2020-01-01?includeAll=true
|
||||
response:
|
||||
body:
|
||||
string: '{"dailyWeightSummaries": [], "totalAverage": {"from": 1576627200000,
|
||||
"until": 1577923199999, "weight": null, "bmi": null, "bodyFat": null, "bodyWater":
|
||||
null, "boneMass": null, "muscleMass": null, "physiqueRating": null, "visceralFat":
|
||||
null, "metabolicAge": null}, "previousDateWeight": {"samplePk": null, "date":
|
||||
null, "calendarDate": null, "weight": null, "bmi": null, "bodyFat": null,
|
||||
"bodyWater": null, "boneMass": null, "muscleMass": null, "physiqueRating":
|
||||
null, "visceralFat": null, "metabolicAge": null, "sourceType": null, "timestampGMT":
|
||||
null, "weightDelta": null}, "nextDateWeight": {"samplePk": null, "date": null,
|
||||
"calendarDate": null, "weight": null, "bmi": null, "bodyFat": null, "bodyWater":
|
||||
null, "boneMass": null, "muscleMass": null, "physiqueRating": null, "visceralFat":
|
||||
null, "metabolicAge": null, "sourceType": null, "timestampGMT": null, "weightDelta":
|
||||
null}}'
|
||||
headers:
|
||||
CF-RAY:
|
||||
- 95065fe3afea2fde-QRO
|
||||
Cache-Control:
|
||||
- no-cache, no-store, private
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 16 Jun 2025 01:01:11 GMT
|
||||
NEL:
|
||||
- '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=YZscbyvERqaC8NIT00%2Fv%2FV3X%2BSEXE8LosKNrrmILOYZWBqF906BX31WBG9C5u4NtRh73%2BRPj2OyWX%2FgtYZcd9QricbIkwL8Np9kXdKtPcufnwwAg7odFD4X4JnUeS0d%2BEk1u5Kb2VAIyW4O%2BxfR1FNVErw%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- _cfuvid=SANITIZED; path=SANITIZED; domain=SANITIZED; HttpOnly; Secure; SameSite=SANITIZED
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
cf-cache-status:
|
||||
- DYNAMIC
|
||||
pragma:
|
||||
- no-cache
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
@@ -0,0 +1,77 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept:
|
||||
- '*/*'
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
Authorization:
|
||||
- Bearer SANITIZED
|
||||
Connection:
|
||||
- keep-alive
|
||||
User-Agent:
|
||||
- GCM-iOS-5.7.2.1
|
||||
method: GET
|
||||
uri: https://connectapi.garmin.com/weight-service/weight/range/2025-06-14/2025-06-14?includeAll=true
|
||||
response:
|
||||
body:
|
||||
string: '{"dailyWeightSummaries": [{"summaryDate": "2025-06-14", "numOfWeightEntries":
|
||||
2, "minWeight": 59130.0, "maxWeight": 59500.0, "latestWeight": {"samplePk":
|
||||
1749948744411, "date": 1749927125175, "calendarDate": "2025-06-14", "weight":
|
||||
59500.0, "bmi": null, "bodyFat": null, "bodyWater": null, "boneMass": null,
|
||||
"muscleMass": null, "physiqueRating": null, "visceralFat": null, "metabolicAge":
|
||||
null, "sourceType": "MANUAL", "timestampGMT": 1749948725175, "weightDelta":
|
||||
299.99999999999716}, "allWeightMetrics": [{"samplePk": 1749948744411, "date":
|
||||
1749927125175, "calendarDate": "2025-06-14", "weight": 59500.0, "bmi": null,
|
||||
"bodyFat": null, "bodyWater": null, "boneMass": null, "muscleMass": null,
|
||||
"physiqueRating": null, "visceralFat": null, "metabolicAge": null, "sourceType":
|
||||
"MANUAL", "timestampGMT": 1749948725175, "weightDelta": 399.9999999999986},
|
||||
{"samplePk": 1749909217098, "date": 1749887580000, "calendarDate": "2025-06-14",
|
||||
"weight": 59130.0, "bmi": 22.5, "bodyFat": 20.3, "bodyWater": 58.2, "boneMass":
|
||||
3430, "muscleMass": 26840, "physiqueRating": null, "visceralFat": null, "metabolicAge":
|
||||
null, "sourceType": "INDEX_SCALE", "timestampGMT": 1749909180000, "weightDelta":
|
||||
-100.00000000000142}]}], "totalAverage": {"from": 1749859200000, "until":
|
||||
1749945599999, "weight": 59500.0, "bmi": null, "bodyFat": null, "bodyWater":
|
||||
null, "boneMass": null, "muscleMass": null, "physiqueRating": null, "visceralFat":
|
||||
null, "metabolicAge": null}, "previousDateWeight": {"samplePk": 1749307692871,
|
||||
"date": 1749286058000, "calendarDate": "2025-06-07", "weight": 59189.0, "bmi":
|
||||
22.600000381469727, "bodyFat": 20.0, "bodyWater": 58.4, "boneMass": 3450,
|
||||
"muscleMass": 26850, "physiqueRating": null, "visceralFat": null, "metabolicAge":
|
||||
null, "sourceType": "INDEX_SCALE", "timestampGMT": 1749307658000, "weightDelta":
|
||||
null}, "nextDateWeight": {"samplePk": 1749996902851, "date": 1749975276000,
|
||||
"calendarDate": "2025-06-15", "weight": 59720.0, "bmi": 22.799999237060547,
|
||||
"bodyFat": 19.3, "bodyWater": 58.9, "boneMass": 3539, "muscleMass": 26979,
|
||||
"physiqueRating": null, "visceralFat": null, "metabolicAge": null, "sourceType":
|
||||
"INDEX_SCALE", "timestampGMT": 1749996876000, "weightDelta": null}}'
|
||||
headers:
|
||||
CF-RAY:
|
||||
- 9506620b6d30b6e5-QRO
|
||||
Cache-Control:
|
||||
- no-cache, no-store, private
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Type:
|
||||
- application/json
|
||||
Date:
|
||||
- Mon, 16 Jun 2025 01:02:39 GMT
|
||||
NEL:
|
||||
- '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
|
||||
Report-To:
|
||||
- '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=TNhpJPozun%2FMkRaaYU%2FYH7B2ZrX%2BfDEbq2rKyeuDmDpxQgshSkQTs0eOWr0XO1i1EwLmf%2F0SYtAecesFwm0eugpiNFopVrsvBlvMj1vk3RaPwL37B46JBHOYvrvm1OhMNzNqTF7QWLHAFYe%2Bk6zeTmTcVQ%3D%3D"}],"group":"cf-nel","max_age":604800}'
|
||||
Server:
|
||||
- cloudflare
|
||||
Set-Cookie:
|
||||
- _cfuvid=SANITIZED; path=SANITIZED; domain=SANITIZED; HttpOnly; Secure; SameSite=SANITIZED
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
alt-svc:
|
||||
- h3=":443"; ma=86400
|
||||
cf-cache-status:
|
||||
- DYNAMIC
|
||||
pragma:
|
||||
- no-cache
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
Reference in New Issue
Block a user