Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Season Inputs to flea api calls #408

Merged
merged 10 commits into from
Aug 13, 2023
2 changes: 1 addition & 1 deletion R/flea_franchises.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#' @export

ff_franchises.flea_conn <- function(conn) {
x <- fleaflicker_getendpoint("FetchLeagueStandings", league_id = conn$league_id, sport = "NFL") %>%
x <- fleaflicker_getendpoint("FetchLeagueStandings", season = conn$season, league_id = conn$league_id, sport = "NFL") %>%
RandalMorris marked this conversation as resolved.
Show resolved Hide resolved
purrr::pluck("content", "divisions") %>%
tibble::tibble() %>%
tidyr::hoist(1, "division_id" = "id", "division_name" = "name", "teams") %>%
Expand Down
1 change: 1 addition & 0 deletions R/flea_playerscores.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ff_playerscores.flea_conn <- function(conn, page_limit = NULL, ...) {
endpoint = "FetchPlayerListing",
sport = "NFL",
league_id = conn$league_id,
season = conn$season,
Copy link
Member

@tanho63 tanho63 Aug 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like this parameter is actually called sort_season https://www.fleaflicker.com/api-docs/index.html#operation--FetchPlayerListing-get - have updated

external_id_type = "SPORTRADAR",
result_offset = result_offset
) %>%
Expand Down
3 changes: 2 additions & 1 deletion R/flea_rosters.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ ff_rosters.flea_conn <- function(conn, ...) {
df_rosters <- fleaflicker_getendpoint("FetchLeagueRosters",
sport = "NFL",
external_id_type = "SPORTRADAR",
league_id = conn$league_id
league_id = conn$league_id,
season = conn$season
) %>%
purrr::pluck("content", "rosters") %>%
tibble::tibble() %>%
Expand Down