Closed jaredwheet closed 3 years ago
I think I did a bad job of defining the parameters. This is literally my first node project. I think your code should work, it looks like how I expect the function to work. Give it a day for me to figure out the issue
This should now work without issues as far as I can tell as of v1.0.7, apparently groups is non-negotiable. Also, seasontype = 2 is regular season, 3 is post-season, 4 is offseason, 1 is pre-season
const inputs = {
group: 50,
year: 2021,
month: 02,
day: 15
};
const result = await sdv.cbbScoreboard.getScoreboard(inputs);
Let me know if that change helps fix your issue so I can close it.
thanks for quickly looking at it. It still seems to give me the bad request.
Error: Request failed with status code 400
at createError (C:\Users\jared\OneDrive\Documents\score_scraper\node_modules\axios\lib\core\createError.js:16:15)
at settle (C:\Users\jared\OneDrive\Documents\score_scraper\node_modules\axios\lib\core\settle.js:17:12)
at Unzip.handleStreamEnd (C:\Users\jared\OneDrive\Documents\score_scraper\node_modules\axios\lib\adapters\http.js:260:11)
at Unzip.emit (events.js:315:20)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
config: {
url: 'http://site.api.espn.com/apis/site/v2/sports/basketball/mens-college-basketball/scoreboard',
method: 'get',
headers: {
Accept: 'application/json, text/plain, */*',
'User-Agent': 'axios/0.21.1'
},
params: { dates: '2021215', group: 50, seasontype: 2, limit: 1000 },
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
validateStatus: [Function: validateStatus],
data: undefined
},
Is there a good place to find docs on the espnAPI? I am having a hard time finding a resource that is clear on what params are required
https://gist.github.com/akeaswaran/b48b02f1c94f873c6655e7129910fc3b
if you're so inclined, you can come hang out with us in the cfbscrapR discord (a related cfb project where we discuss code and such)
very cool, im gonna jump in there and see if we can figure it out - and looking forward to seeing what else you guys are up to
we all gang gang now. issue fixed by #9c429cea
Hi, this is a great package and really hoping to use it to gather ncaa basketball scores for an app. I am running into an issue, and I cannot seem to resolve it. Here is my code
When i run
node index.js
I am getting an error - output below. Cant seem to fix this, was wondering if you can help dissect why this error is occuring?