cyberjunky / python-garminconnect

Python 3 API wrapper for Garmin Connect to get activity statistics
MIT License
964 stars 149 forks source link

Race Predictions Endpoint #153

Closed psdupvi closed 1 year ago

psdupvi commented 1 year ago

I'm working on a PR for race predictions, but I'm interested in seeing if other users see the same thing I do, before I potentially expose some private GUID that Garmin uses for me.

The url for the race predictions has the format: /metrics-service/metrics/racepredictions/latest/{GUID}?_={a number which increments by 1 each time I reload the page}

The parameter _ does not appear to be necessary in the URL call, so I don't really care about it

I see this url get hit when I access the page at https://connect.garmin.com/modern/report/-29/running/current, and it has the following response values

{
    "userId": 123456789,
    "fromCalendarDate": null,
    "toCalendarDate": null,
    "calendarDate": "2023-09-18",
    "time5K": 1093,
    "time10K": 2297,
    "timeHalfMarathon": 5037,
    "timeMarathon": 10859
}

The (almost) full url I see (with only the last part of the GUID visible) is: /metrics-service/metrics/racepredictions/latest/XXXXXXXX-XXXX-XXXX-XXXX-16967b1e82fb

Would anyone be willing to see if they see the same GUID? I imagine it will be, but I'd love to get some confirmation

psdupvi commented 1 year ago

Nevermind, it appears to be the display name -- so it can be reproduced. Incoming PR

cyberjunky commented 1 year ago

Merged related PR