Closed djotaku closed 5 years ago
Use the Num-Records
response header from the team participants endpoint.
https://github.com/DonorDrive/PublicAPI/tree/master/docs/1.0
Num-Records is a great way to get that info if you're already pulling participants. I think there's value adding it to the team endpoint as well. I'm gonna knock this out as soon as I can. Keep being awesome, EL community! ♥️
Cool! I will use Num-Records for now (took a bit to figure out it's returned as an email.message.message type in python and then how to read that. But I can at least get that number for now and use that to iterate in order to find the top X participants on a team.
By the way, if you want to see what I'm doing w/ the API -> https://github.com/djotaku/ELDonationTracker
I've got internal commits PR'ed. The update here will reflect what you'll see on the consumer-end when this ships. Pretty straightforward?
excited
this is now live!
It's possible I'm missing something, but when I look at https://www.extra-life.org/api/teams/44013 I don't see a way of knowing how many team members are on the team. If I go to https://extra-life.org/api/teams/44013/participants I could check if there are 100 and that would tell me that MAYBE there are 101, but it'd be easier if I could know ahead of time.
Thanks!