Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add floors endpoint, function, and example #121

Merged
merged 3 commits into from
Mar 10, 2023

Conversation

Ghodot
Copy link

@Ghodot Ghodot commented Jan 29, 2023

Adds a function to get the details of floors ascended / descended for a day.
I found the graph on https://connect.garmin.com/modern/daily-summary/2023-01-29, and did not find a way to get more than a day at a time

Response from the API (this wasn't a very active day ...)

-------------------- api.get_floors_data('2023-01-29') --------------------
{
    "startTimestampGMT": "2023-01-28T23:00:00.0",
    "endTimestampGMT": "2023-01-29T07:38:00.0",
    "startTimestampLocal": "2023-01-29T00:00:00.0",
    "endTimestampLocal": "2023-01-29T08:38:00.0",
    "floorsValueDescriptorDTOList": [
        {
            "key": "startTimeGMT",
            "index": 0
        },
        {
            "key": "endTimeGMT",
            "index": 1
        },
        {
            "key": "floorsAscended",
            "index": 2
        },
        {
            "key": "floorsDescended",
            "index": 3
        }
    ],
    "floorValuesArray": [
        [
            "2023-01-28T23:00:00.0",
            "2023-01-28T23:15:00.0",
            0,
            0
        ],
        [
            "2023-01-28T23:15:00.0",
            "2023-01-28T23:30:00.0",
            0,
            0
        ],
        ...
        [
            "2023-01-29T07:15:00.0",
            "2023-01-29T07:30:00.0",
            0,
            0
        ],
        [
            "2023-01-29T07:30:00.0",
            "2023-01-29T07:45:00.0",
            0,
            0
        ]
    ]
}
---------------------------------------------------------------------------

@psdupvi
Copy link
Contributor

psdupvi commented Jan 30, 2023

On the reports page, inspecting the endpoint, I see usersummary-service/stats/floors/daily/2023-01-23/2023-01-30 which looks like it returns multiple days, but I don't believe it returns details about them. I haven't actually tested it yet, but maybe that would be somewhere to investigate?

[
    {
        "calendarDate": "2023-01-23",
        "values": {
            "wellnessUserFloorsAscendedGoal": *,
            "wellnessFloorsAscended": *,
            "wellnessFloorsDescended": *
        }
    },
    {
        "calendarDate": "2023-01-24",
        "values": {
            "wellnessUserFloorsAscendedGoal":*, 
            "wellnessFloorsAscended": *,
            "wellnessFloorsDescended": *
        }
    },
    ...
    {
        "calendarDate": "2023-01-30",
        "values": {
            "wellnessUserFloorsAscendedGoal": *,
            "wellnessFloorsAscended": *,
            "wellnessFloorsDescended": *
        }
    }
]

@cyberjunky cyberjunky merged commit 731fc70 into cyberjunky:master Mar 10, 2023
@cyberjunky
Copy link
Owner

cyberjunky commented Mar 10, 2023

@Ghodot thanks a lot, I merged it, I changed the call to be called get_floors()

hirebusbrandon pushed a commit to hirebusbrandon/python-garminconnect that referenced this pull request Jul 10, 2024
Add floors endpoint, function, and example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants