Hi thanks Jan, I think that only does my own data, not the 'best on segment' leaderboard data. Unless I'm grabbing it wrong.
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.
Hi Jan, apologies for confusing here. I'm an awful coder and an even worse explainer.
- I'm trying to define an area (done)
- Pull back a list of segments (done)
- Show the fastest time on that segment (not mine, any athlete) - (not done)
- Show the current local legend (and attempts they've made). - (not done)
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!)
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:
- "xoms.kom" for the seconds of the best effort for men
- "xoms.qom" for the seconds of the best effort for women
- "local_legend.effort_count" are the attempts of the LL
- "local_legend.title" for the athlete name of the LL