The Hub is now in read-only mode as we make improvements to the Hub experience. More information is available here.
07-11-2024 02:51 AM
Hi,
Trying to get a view of local segments and what the fastest time/speed on each is. I can return local segments in a bounded area, but can't get any data on the results for that segment. Would be great if I could get the number of attempts that deemed it Local Legend also. I can do it on the site, but I'd like to do it programmatically so I can show a heat map for athletes.
any pointers gratefully recieved.
Solved! Go to Solution.
07-12-2024 08:50 AM
I guess the problem is the incomplete API documentation, there are many fields not mentioned for the DetailedSegment model. You are expected to browse through the result json for anything that might be interesting to you. The values you want are the following:
07-11-2024 07:48 AM
You find these information in the segments/id endpoint: https://developers.strava.com/docs/reference/#api-Segments-getSegmentById
07-11-2024 08:27 AM
Hi thanks Jan, I think that only does my own data, not the 'best on segment' leaderboard data. Unless I'm grabbing it wrong.
07-11-2024 10:33 AM
In your original post there wasn't anything about leaderboards, you wanted the fastest overall time and the local legend including their number of attempts. All these you can get with the mentioned endpoint. Leaderboards aren't available in the API.
07-12-2024 01:59 AM
Hi Jan, apologies for confusing here. I'm an awful coder and an even worse explainer.
When I run the script I've cobbled together it doesn't pull back the fastest time or local legend pieces. I used kom_rank and pr_rank from the DetailedSegmentEffort, but couldn't get it to run.
Again, apologies for confusion (and my ignorance at doing this!)
07-12-2024 08:50 AM
I guess the problem is the incomplete API documentation, there are many fields not mentioned for the DetailedSegment model. You are expected to browse through the result json for anything that might be interesting to you. The values you want are the following:
Welcome to the Community - here is your guide to help you get started!