Closed danstacy1 closed 2 years ago
have you tried console.logging out the api variable after your assignment ? in the docs it has the syntax set to destructure out everything inside of module with the { ... }
Yeah, I tried that but I'm not getting anything.
Update: I'm getting some info in my terminal now, but it is only a few data keys (not all of them) and the value says [Getter]
sharing that would be helpful
this is my data Object [Module] { Boxscore: [Getter], BoxscorePlayer: [Getter], Client: [Getter], FreeAgentPlayer: [Getter], Player: [Getter], PlayerStats: [Getter], Team: [Getter]
also How to Get Data Creating a Client This will allow you to call the various methods on the Client class to grab data for the passed league. For working with multiple leagues, create multiple Client instances.
import { Client } from 'espn-fantasy-football-api';
const myClient = new Client({ leagueId: 432132 });
I'm confused by that part. Not really sure what to do there.
When I put the client code into my code, it breaks everything.
closing for now since the api is no longer maintained
What's the problem you're trying to solve?
My API is a npm install and I can not figure out how to connect to it. I have read the documentation and it is still not working.
Post any code you think might be relevant (one fenced block per file)
If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?
**I am not getting an error message.
What is your best guess as to the source of the problem?
Either, I need to declare a different const somewhere else or I am not calling the data correctly. Or both.
What things have you already tried to solve the problem?
I read the documentation on how to get the data from the API and I have copied and pasted the code but it is not working.
Paste a link to your repository here
https://github.com/danstacy1/Project_2.git