What is the significance of "groups" parameter?
> groups: 80, // all FBS games
What does this mean?
Also, getTeamList requires this "groups" input. Might want to update the readme.
ESPN (the main source for the data) has a groups param with an id. 80 represents all of FBS, but other values can be used for individual conferences. All functions have been updated such that this parameter is now optional and should now default to all of FBS.
TypeError: Cannot destructure property groups of 'undefined' or 'null'.
I am getting this when I try to run in RunKit just to test some things.
var cfbData = require("cfb-data")
const results = await cfbData.teams.getTeamList();
@ferociouskyle you need to supply {groups: 80} as "inputs" for getTeamList()
@ferociouskyle you need to supply {groups: 80} as "inputs" for getTeamList()
I am stupid! Thanks :)
const inputs = { groups: 80 };
const results = await cfbData.teams.getTeamList(inputs);
Yeah, it should be optional. Re-opening the issue. Should be an easy fix.
Came here to bring up something I found regarding the group parameter in the package, but guess I'll just drop it here since you're already looking at it.
It looks like ESPN has changed their accepted query params with regards to 'groups' vs. 'group'. At least as it pertains to schedules, if you use the plural 'groups', the group filter doesn't work at all and you'll get all FBS results.
@blakep2012 https://github.com/BlueSCar/cfb-data/blob/master/app/services/schedule.service.js does already use "group" instead of "groups"
"groups" is used for other endpoints. I don't think anything has changed (since last year at least).
@kajensen yeah, that is fixed from my PR that had just gone through. It's all working now.