This is a request for matchup specific REST queries. For example, what's the most efficient way to get data for a given weeks matchup (either current or past years) including how many points each team scored, and the points scored per player (at least, those in the lineup) for that week.
Thanks, you're fast. :)Hm, interesting question. I'm working on adding in a schedule resource to help get all of that information for all weeks in a single view, but that might take a little bit to get out. As it stands right now, I'd think you'd just want to change all of the week parameters in that query above to match whichever week that you're interested in? It would be one query per week, but it seems like that would get you the information that you're looking for.
I notice you added "players/stats" to your query so maybe that'll be useful one day in the future (or is now?)? It seems only useful with individual team stats. Anyway, I hope this is useful for people :)
And one more. Statistics are stored within the player stats query [C] above, but the statistical category descriptions aren't listed there (only the stat ids are). Here's the query to get those category names, which you should save (only need to query once) or write within a config file :
That's an excellent summary, Phil. I keep forgetting exactly how the stats restrictions work, but you're right -- in any context where you're requesting more than one team (even for matchups), it looks like we won't show player stats, meaning you would need to submit separate queries to get the player stat information for each team within a matchup (for the appropriate weekly context), as listed as step C of your post. Very annoying, sorry that we don't have a nicer way around that.
Worth noting that if you're already getting a league resource, you can also see the stat category information within there by requesting the "settings" subresource beneath the league. Otherwise, yes, holding onto the top level game stat_categories resource probably makes the most sense.