ffverse / ffscrapr

R API Client for Fantasy Football League Platforms
https://ffscrapr.ffverse.com
Other
76 stars 21 forks source link

Request Season parameter be added to FleaFlicker endpoints #405

Closed RandalMorris closed 11 months ago

RandalMorris commented 11 months ago

When using ff_franchises for example, the FetchLeagueStandings endpoint accepts season as a parameter, but the package isn't passing it from the connection dataset. It defaults to current season so even if the connection data has 2022, it is pulling 2023

tanho63 commented 11 months ago

Hmm. This looks like a pretty straightforward addition- do you want to give it a go in a PR?

RandalMorris commented 11 months ago

I changed the R/flea_franchises.R to fleaflicker_getendpoint("FetchLeagueStandings", season = conn$season, league_id = conn$league_id, sport = "NFL"). Still pulls 2023, I even manually set it to 2022.

When I create the function locally, it works so i am missing something.

tanho63 commented 11 months ago

hmm. may need to restart R to make sure it’s not being cached

RandalMorris commented 11 months ago

That did it, I thought i had tried that lol.

I will submit a PR soon. I am going through them to add that where it can be used.

tanho63 commented 11 months ago

Gonna keep this open and close it when the appropriate PR is merged into main, see feedback in PR comments

tanho63 commented 11 months ago

Resolved in #408