Coder Social home page Coder Social logo

fflr's Introduction

fflr

Lifecycle: experimental CRAN status Downloads Codecov test coverage R build status

The fflr package is used to query the ESPN Fantasy Football API. Get data on fantasy football league members, teams, and individual athletes.

This package has been tested with a narrow subset of possible league settings. If a function doesn’t work as intended, please file an issue on GitHub.

Installation

Important

As of 2024-05-17, fflr was removed from CRAN for failure to comply with the policy on internet resources. This issue arose when ESPN changed their API format and adjusted andpoints to account for the end of the 2023 NFL season. I hope to work with CRAN to get the package published again before the 2024 season, but it may not be possible.

The most recent development version can always be installed from GitHub:

# install.packages("remotes")
remotes::install_github("k5cents/fflr")

Usage

library(fflr)
packageVersion("fflr")
#> [1] '2.3.0'

Data is only available for public leagues. See this help page on how to make a private league public

Functions require a unique leagueId, which can be found in any ESPN page URL.

https://fantasy.espn.com/football/league?leagueId=42654852

Use ffl_id() to set a default fflr.leagueId option. Your .Rprofile file can set this option on startup.

ffl_id(leagueId = "42654852")
#> Temporarily set `fflr.leagueId` option to 42654852
#> [1] "42654852"

The leagueId argument defaults to ffl_id() and can be omitted once set.

league_info()
#> # A tibble: 1 × 6
#>         id seasonId name             isPublic  size finalScoringPeriod
#>      <int>    <int> <chr>            <lgl>    <int>              <int>
#> 1 42654852     2024 FFLR Test League TRUE         4                 17
league_teams()
#> # A tibble: 4 × 6
#>   teamId abbrev name              logo                                            logoType memberId
#>    <int> <fct>  <chr>             <chr>                                           <chr>    <chr>   
#> 1      1 AUS    Austin Astronauts https://g.espncdn.com/lm-static/logo-packs/cor… VECTOR   {22DFE7…
#> 2      2 BOS    Boston Buzzards   https://g.espncdn.com/lm-static/logo-packs/cor… VECTOR   {22DFE7…
#> 3      3 CHI    Chicago Crowns    https://g.espncdn.com/lm-static/logo-packs/cor… VECTOR   {22DFE7…
#> 4      4 DEN    Denver Devils     https://g.espncdn.com/lm-static/logo-packs/cor… VECTOR   {22DFE7…

The scoringPeriodId argument can be used to get data from past weeks.

all_rost <- team_roster(scoringPeriodId = 1)
all_rost$CHI[, 5:13][-7]
#> NULL

There are included objects for NFL teams and players.

nfl_teams
#> # A tibble: 33 × 6
#>    proTeamId abbrev location   name       byeWeek conference
#>        <int> <fct>  <chr>      <chr>        <int> <chr>     
#>  1         0 FA     <NA>       Free Agent      NA <NA>      
#>  2         1 Atl    Atlanta    Falcons         14 NFC       
#>  3         2 Buf    Buffalo    Bills            7 AFC       
#>  4         3 Chi    Chicago    Bears           14 NFC       
#>  5         4 Cin    Cincinnati Bengals         10 AFC       
#>  6         5 Cle    Cleveland  Browns           9 AFC       
#>  7         6 Dal    Dallas     Cowboys          9 NFC       
#>  8         7 Den    Denver     Broncos          9 AFC       
#>  9         8 Det    Detroit    Lions            6 NFC       
#> 10         9 GB     Green Bay  Packers         14 NFC       
#> # ℹ 23 more rows

Note

The fflr project is released with a Contributor Code of Conduct. By contributing, you agree to abide by its terms.

fflr's People

Contributors

bpepy avatar k5cents avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fflr's Issues

Move acquisition data to separate function

It's ugly to have the acquisition columns appear or not depending on week. Plus, that data isn't found on the roster home page.

str(fflr::team_roster(252353)[[5]])
#> tibble [16 × 17] (S3: tbl_df/tbl/data.frame)
#>  $ year    : int [1:16] 2020 2020 2020 2020 2020 2020 2020 2020 2020 2020 ...
#>  $ week    : int [1:16] 5 5 5 5 5 5 5 5 5 5 ...
#>  $ team    : Factor w/ 8 levels "AGUS","PEPE",..: 5 5 5 5 5 5 5 5 5 5 ...
#>  $ slot    : Factor w/ 9 levels "QB","RB","WR",..: 1 2 2 3 3 4 5 6 7 8 ...
#>  $ id      : int [1:16] 4038524 3054850 3025433 15795 16733 15847 2508176 -16014 3915165 2977187 ...
#>  $ first   : chr [1:16] "Gardner" "Alvin" "Mike" "DeAndre" ...
#>  $ last    : chr [1:16] "Minshew II" "Kamara" "Davis" "Hopkins" ...
#>  $ pro     : Factor w/ 33 levels "FA","Atl","Buf",..: 31 19 30 23 6 13 33 15 12 15 ...
#>  $ pos     : Factor w/ 7 levels "QB","RB","WR",..: 1 2 2 3 3 4 2 7 5 3 ...
#>  $ status  : Named chr [1:16] "A" "A" "A" "A" ...
#>   ..- attr(*, "names")= chr [1:16] "ACTIVE" "ACTIVE" "ACTIVE" "ACTIVE" ...
#>  $ proj    : num [1:16] 19.36 15.98 14.08 11.63 9.27 ...
#>  $ score   : num [1:16] NA NA NA NA NA NA NA NA NA NA ...
#>  $ start   : num [1:16] 30.8 99.8 89.7 99.2 82.4 ...
#>  $ rost    : num [1:16] 55.7 100 94.6 99.9 98.6 ...
#>  $ change  : num [1:16] 11.301 -0.001 5.578 0 0.365 ...
#>  $ acq_type: chr [1:16] "ADD" "DRAFT" "ADD" "DRAFT" ...
#>  $ acq_date: POSIXct[1:16], format: "2020-09-23 11:00:09" "2020-09-06 22:17:42" ...

Created on 2020-10-10 by the reprex package (v0.3.0)

Update v1.0.0 functions to work with v2.0.0

  • all_players()
  • best_roster()
  • draft_picks()
  • draft_settings()
  • espn_games()
  • fee_settings()
  • ffl_api()
  • ffl_info()
  • ffl_merge()
  • ffl_seasons()
  • ffl_week()
  • ffl_year()
  • league_info()
  • league_members()
  • league_messages()
  • league_name()
  • league_size()
  • league_status()
  • league_teams()
  • live_scoring()
  • match_schedule()
  • match_scores()
  • moves_summary()
  • opponent_ranks()
  • player_acquire()
  • player_info()
  • player_news()
  • player_outlook()
  • pro_schedule()
  • roster_moves()
  • roster_score()
  • roster_settings()
  • schedule_settings()
  • score_settings()
  • score_summary()
  • start_roster()
  • stat_correct()
  • team_abbrev()
  • team_roster()
  • trade_settings()
  • waiver_settings()
  • week_scores()

Add `X-Fantasy-Filter` arguments to `all_players()`, etc

Would allow the user to supply the filter arguments used in the X-Fantasy-Filter JSON body (e.g., filterRanksForRankTypes for Standard vs PPR).

`X-Fantasy-Filter` = list(
  players = list(
    filterSlotIds = list(
      value = c(0:19L, 23L, 24L)
    ),
    filterRanksForScoringPeriodIds = list(
      value = 1L
    ),
    filterStatus = list(
      value = c("FREEAGENT", "WAIVERS")
    ),
    limit = 50L,
    offset = 0L,
    sortPercOwned = list(
      sortAsc = FALSE,
      sortPriority = 1L
    ),
    sortDraftRanks = list(
      sortPriority = 100L,
      sortAsc = TRUE,
      value = "STANDARD"
    ),
    filterRanksForRankTypes = list(
      value = "STANDARD"
    ),
    filterRanksForSlotIds = list(
      value = c(0L, 2L, 4L, 6L, 17L, 16L)
    ),
    filterStatsForTopScoringPeriodIds = list(
      value = 2L,
      additionalValue = c("002021", "102021", "002020", "1120211", "022021")
    )
  )
)

Finalzie function names

Consider using single word functions (e.g., rosters(), members())? Or maybe an ff_ prefix (e.g., ff_teams())?

Current function names:

fun good suggest
all_players()
best_roster()
draft_picks()
draft_settings()
espn_games()
fee_settings()
ffl_api()
ffl_info()
ffl_seasons()
ffl_week()
ffl_year()
league_info()
league_members()
league_messages()
league_name()
league_size()
league_standings()
league_status()
league_teams()
league_transactions()
live_scoring()
match_schedule()
match_scores()
opponent_ranks()
player_news()
player_outlook()
pro_schedule()
roster_moves()
roster_score()
roster_settings()
schedule_settings()
scoring_settings()
set_lid()
stat_correct()
team_abbrev()
team_roster()
trade_settings()
waiver_settings()
week_scores()

Skip tests if API timeout returns a null

Use testthat::skip_if() if the try_api() fails to fix a timeout issue and returns a null.

This would prevent the package tests from failing on the CRAN servers.

Running examples in ‘fflr-Ex.R’ failed
The error most likely occurred in:

> ### Name: ffl_seasons
> ### Title: List past fantasy seasons
> ### Aliases: ffl_seasons
>
> ### ** Examples
>
> ffl_seasons()
Error in open.connection(con, "rb") :
  Timeout was reached: [fantasy.espn.com] Resolving timed out after 10010 milliseconds
Calls: ffl_seasons ... parse_and_simplify -> parseJSON -> parse_con -> open -> open.connection

Although, this error came from the examples... Maybe look into those experimental conditional examples?

Use `...` to pass query arguments to `GET()` (e.g., `scoringPeriodId`)

Right now, the ... argument of ffl_api() is used to pass arguments to jsonlite::fromJSON(), but those parsing arguments should be the same every time an endpoint is called.

It would be more useful to allow the user to pass additional values to the query = list() argument of httr::GET(). These additional arguments would allow the user to define the season and week if desired.

Add basic versions of `tidy_matchups()` and `tidy_scores()`

The tidy_*() functions do a lot of post-processing to pivot the home and away tables into a single tidy-table, with two rows per matchup for both home and away. It may be useful to provide a "wide" version similar to what is provided straight from the API (i.e., separate tables or columns).

Use tryCatch in all functions to prevent timeout

Take the same method used in ffl_api() (using tryCatch() and Sys.sleep()) and use it for ffl_season(), et al.

checking examples ... [13s/139s] ERROR
Running examples in ‘fflr-Ex.R’ failed
The error most likely occurred in:

> ### Name: ffl_seasons
> ### Title: List past fantasy seasons
> ### Aliases: ffl_seasons
>
> ### ** Examples
>
> ffl_seasons()
Error in open.connection(con, "rb") :
  Timeout was reached: [fantasy.espn.com] Resolving timed out after 10010 milliseconds
Calls: ffl_seasons ... parse_and_simplify -> parseJSON -> parse_con -> open -> open.connection
Execution halted

Cover all functionality of the ESPN website

Repost of #10 for release 1.0.0 with new API method and less customized format.

The ESPN fantasy football website provides the following functionality:

My Team

League

Players

FantasyCast

Scoreboard

Standings

Opposing Teams

Add `is_predraft()` checks to every applicable function

The package was previously removed from CRAN because the examples and tests began failing when the ESPN API made the transition from 2020 to 2021 seasons. All functions need to be able to fail with an empty return value during the offseason.

`tidy_scores()` returns `TRUE` for `isWinner` in future

The tidy_scores() function returns TRUE values for isWinner column for weeks that haven't been played.

library(fflr)

ffl_id(252353)
#> Temporarily set `fflr.leagueId` option to 252353
#> [1] "252353"

x <- tidy_scores()
x$isWinner[x$totalPoints == 0 & x$abbrev == "KIER"]
#> [1]  TRUE FALSE  TRUE  TRUE FALSE  TRUE

Created on 2023-10-30 with reprex v2.0.2

Format mScoreboard for live scraping

# Sun Sep 20 14:14:17 2020 ------------------------------
x <- fflr:::ffl_api(252353, view = "mScoreboard")
w <- x$status$currentMatchupPeriod
s <- tibble::tibble(
  id = x$schedule$id,
  team = x$schedule$home$teamId,
  score = x$schedule$home$totalPointsLive,
  proj = x$schedule$home$totalProjectedPointsLive
)
tidyr::drop_na(s)
#> # A tibble: 4 x 4
#>      id  team score  proj
#>   <int> <int> <dbl> <dbl>
#> 1     5     1  36   103. 
#> 2     6    11  72.3 128. 
#> 3     7     6  30.8 118. 
#> 4     8     8   8.6  86.6

Created on 2020-09-20 by the reprex package (v0.3.0)

Unable to View A League I know is Public

I am attempting to use the ESPN Fantasy API for a school project. I am positive the league I am trying to access is public and I am also member of said league. I have tried this league along with the deafault leagues and nothing is working. I am getting the error telling me that I am not authorized to view this league:

Error: ESPN Fantasy API request failed [401]
You are not authorized to view this League.

library(fflr)
packageVersion("fflr")
ffl_id(leagueId = "415461308")
league_info()
league_teams()

Thank you

Return single data frame for `leagueHistory`

Instead of a list of data frames by season, it might be more consistent to return a single data frame.

I've already tried to add seasonId and scoringPeriodId values to every data frame where it makes sense, so you can always identify rows that way.

do.call("rbind", league_standings(leagueHistory = TRUE))

Not sure yet.

Consider implimenting roster tibble class

Creating a new roster (and player?) class would allow us to prevent regular tibbles not generated by form_roster(), etc from being passed into the functions like best_roster().

Create power wins function

Power wins are defined as the total number of wins a team would have if it faced the entire field in a given week.

Create core ESPN player info function

id <- 15847
d <- jsonlite::fromJSON(
  txt = paste0(
    "http://sports.core.api.espn.com/",
    "v2/sports/football/leagues/nfl/seasons/2020/athletes/", id
  )
)

str(d[2:18], max.level = 1)
#> List of 17
#>  $ id           : chr "15847"
#>  $ uid          : chr "s:20~l:28~a:15847"
#>  $ guid         : chr "8af09abfebb72b77eda0f0dfead48cd6"
#>  $ type         : chr "football"
#>  $ alternateIds :List of 1
#>  $ firstName    : chr "Travis"
#>  $ lastName     : chr "Kelce"
#>  $ fullName     : chr "Travis Kelce"
#>  $ displayName  : chr "Travis Kelce"
#>  $ shortName    : chr "T. Kelce"
#>  $ weight       : num 260
#>  $ displayWeight: chr "260 lbs"
#>  $ height       : num 77
#>  $ displayHeight: chr "6' 5\""
#>  $ age          : int 30
#>  $ dateOfBirth  : chr "1989-10-05T07:00Z"
#>  $ debutYear    : int 2013

Created on 2020-10-03 by the reprex package (v0.3.0)

Identify and format all scoring options

So far, we've just been using the applied total statistics. Aside from stat_correct(), the base level statistics are completely ignored.

The ESPNmythicalsports::get_player_stats() function uses tidyr::hoist() to just pull out the lower level stats and pivot them longer against the source and split. Packages for other languages might give some clue to what stat numbers mean what (see this npm package).

This is the last big component missing from #10 and might have to be pushed until after the initial CRAN milestone.

Release fflr 1.9.2

First release:

Prepare for release:

  • devtools::build_readme()
  • urlchecker::url_check()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • rhub::check_for_cran()

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • usethis::use_github_release()
  • usethis::use_dev_version()
  • Update install instructions in README

transaction_counter when leagueHistory = TRUE results in factor level [3] duplication error.

transaction_counter(leagueHistory=TRUE) results in following error:
Error in `levels<-`(`*tmp*`, value = as.character(levels)) : factor level [3] is duplicated

traceback as follows:

  1. out_trans(teams = dat$teams[[i]], y = dat$seasonId[i], w = dat$scoringPeriodId[i])
  2. data.frame(seasonId = y, scoringPeriodId = w, teamId = teams$id,
  3. abbrev = factor(teams$abbrev, levels = teams$abbrev), waiverRank = teams$waiverRank,
    teams$transactionCounter)
  4. factor(teams$abbrev, levels = teams$abbrev)

Went to debug, but out_trans has no supported rdocumentation/cannot be loaded from installation. Would gladly take a bug fix to just pull each seasonId individually.

Cover all functionality of the ESPN website

The ESPN fantasy football website provides the following functionality:

My Team

League

Players

FantasyCast

Scoreboard

Standings

Opposing Teams

league_members() incorrectly reports FALSE for isLeagueManager

The league with ID 372045 is a public league with Format:League Manager. For this type of league, the creator is the league manager (LM). source: https://support.espn.com/hc/en-us/articles/360012530592-League-Manager-Powers

For this league, the member with displayName="beaudotdu" is the creator/LM. However, the league_members() function incorrectly reports isLeagueManager='FALSE' for this record (and indeed for all records). I think isLeagueManager should return "TRUE" for the record with displayName="beaudotdu".

library("fflr")
ffl_id(leagueId = "372045")
#> Temporarily set `fflr.leagueId` option to 372045
#> [1] "372045"
league_members()
#> # A tibble: 12 × 3
#>    displayName       memberId                               isLeagueManager
#>    <chr>             <chr>                                  <lgl>          
#>  1 emawrica          {0DA013D1-4DC1-4505-B436-762D517A8EEF} FALSE          
#>  2 Brothel           {12191A2A-F88F-4305-B5FB-6562A3868C95} FALSE          
#>  3 thinroof          {275B71EB-1CDB-4773-B1D2-DDA75719FFEC} FALSE          
#>  4 beaudotdu         {39120363-0EC5-4AFA-BC61-B917B9E0B42F} FALSE          
#>  5 Hoskins 1967      {39A66B77-BD4C-431A-BFD0-2E105A7D0FDA} FALSE          
#>  6 Djreisner         {4F4ACA96-86ED-49F6-8ACA-9686EDB9F667} FALSE          
#>  7 cmdeans           {5F453EB7-92A8-45C6-8AD5-278C8128A83E} FALSE          
#>  8 danktuary         {690CD6BF-0A10-42B1-8467-827865AC5CD8} FALSE          
#>  9 maxkerney         {727174CB-06CF-4144-801C-F0B7F73A9D1A} FALSE          
#> 10 ESPNfan0310132266 {76153B6B-C633-4F03-9703-8C738749BEF8} FALSE          
#> 11 rmdean5513396     {A68B1C77-41BA-41B5-97D8-F7739A296B25} FALSE          
#> 12 eaderoui          {B9683870-B962-4E77-8033-F8E3F28CEF2E} FALSE

Created on 2023-12-28 with reprex v2.0.2

opponent_ranks() is using the wrong team

Here's the table being scraped by opponent_ranks():

library(fflr)
library(tidyverse)
opponent_ranks() %>% 
  filter(pos == "QB") %>% 
  arrange(desc(avg))
#> # A tibble: 32 x 4
#>    pro   pos    rank   avg
#>    <fct> <fct> <int> <dbl>
#>  1 FA    QB       32  33.5
#>  2 SF    QB       31  28.7
#>  3 Cle   QB       30  25.3
#>  4 LAR   QB       29  23.1
#>  5 NE    QB       28  22.2
#>  6 Car   QB       27  21.9
#>  7 Jax   QB       26  21.5
#>  8 Den   QB       25  21.4
#>  9 Atl   QB       24  20.9
#> 10 Dal   QB       23  20.5
#> # … with 22 more rows

Created on 2020-09-30 by the reprex package (v0.3.0)

This is the table found on the /pointsagainst page:

Untitled

The data is right but the team names are clearly wrong.

Implement functions for all view states

  • mDraftDetail
  • mLiveScoring
  • mMatchupScore
  • mPendingTransactions
  • mPositionalRatings
  • mSettings
  • mTeam
    • transactionCounter
    • record
  • modular
  • mNav
  • kona_player_info
  • mTransactions2
  • mStatus
  • mPositionalRatingsStats
  • kona_game_state
  • proTeamSchedules_wl
  • players_wl
  • kona_league_communication

Release fflr 2.0.0

Prepare for release:

  • Check current CRAN check results
  • Polish NEWS
  • devtools::build_readme()
  • urlchecker::url_check()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • rhub::check_for_cran()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md

Submit to CRAN:

  • usethis::use_version('major')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • usethis::use_github_release()
  • usethis::use_dev_version()
  • Tweet

Add `scoringPeriodId` argument with default `NULL`

Passing scoringPeriodId = NULL to the query argument in GET() doesn't affect anything and returns data as if the argument was omitted. Putting it in as a default would make it clear to users that it was an option (sometimes a necessary one).

roster_entry() returns incorrect statistics for explict periods

This problem arises from having to locate the week, score, and proj values from the
statistics section of the full API list. This section is unorganized and changes week to week.

If we try to get data from week 3, most of the data comes from week 2 and the roster itself is largely incorrect.

library(fflr)
data <- fantasy_roster(lid = 252353, scoringPeriodId = 3)
form_roster(team = data$teams[[5]])
#> # A tibble: 16 x 12
#>     year  week owner slot  first last   team pos   score  proj  start owned
#>    <int> <int> <int> <fct> <chr> <chr> <int> <fct> <dbl> <dbl>  <dbl> <dbl>
#>  1  2019     2     6 QB    Russ… Wils…    26 QB    24.2  18.0  0.795  0.980
#>  2  2019     2     6 RB    Chri… McCa…    29 RB     5.3  17.6  0.234  0.999
#>  3  2019     2     6 RB    David John…    22 RB     7.4  15.1  0.964  0.999
#>  4  2019     3     6 WR    Coop… Kupp     14 WR    22.1   8.89 0.913  0.993
#>  5  2019     2     6 WR    T.Y.  Hilt…    11 WR    10.3   9.01 0.772  0.983
#>  6  2019     2     6 TE    Trav… Kelce    12 TE    16.7  12.4  0.994  0.999
#>  7  2019     2     6 FX    Le'V… Bell     20 RB    10.9  12.6  0.911  0.997
#>  8  2019     2    10 DS    Pant… D/ST     29 DS     5.5   5.72 0.0473 0.491
#>  9  2019     2     0 KI    Jake  Elli…    21 KI     7     8.00 0.364  0.419
#> 10  2019     3     4 BE    Robe… Woods    14 WR     5.8   8.17 0.757  0.962
#> 11  2019     2     6 BE    Drew  Brees    18 QB    -0.48  0    0.0599 0.739
#> 12  2019     2     6 BE    Tyler Boyd      4 WR    12.2   7.74 0.644  0.942
#> 13  2019     2     6 BE    A.J.  Green     4 WR     0     0    0.0257 0.811
#> 14  2019     2     6 BE    Tyre… Will…    13 WR    10.6   8.17 0.0375 0.750
#> 15  2019     2     0 BE    Adri… Pete…    28 RB     9.2   7.60 0.181  0.569
#> 16  2019     2     6 BE    Frank Gore      2 RB    14.3  10.8  0.487  0.754

Created on 2019-10-21 by the reprex package (v0.2.1)

Screenshot from 2019-10-21 15-43-52

Unable to pull historical results of team_rosters via leagueHistory = TRUE

Only latest scoringPeriodID by season is provided via leagueHistory = TRUE in most cases. Specifically looking for a way to utilize these functions to loop through the API for each Season Period ID /scoringPeriod ID, but unable to select parameters/add helper functions to environment which aren't defined.

Desired outcome example:
scoring_history <- combine_history(team_roster, param such as: scoringPeriodId = ALL), provide lists of players for scoringPeriodIds 1-16, 1-17, 1-18, etc.

Fix pre-season API calls

Many functions are now failing because the 2020 season is over and the 2021 season has not begun.

The seasons/2020/segments/0/leagues/ path is used for all old = FALSE calls. That will need to be changed to 2021 when available. Will the 2020 season show up under leagueHistory/ calls?

Add features from mTeam view

a <- "https://fantasy.espn.com/apis/v3/games/ffl/"
b <- sprintf("seasons/%s/segments/0/leagues/", format(Sys.Date(), "%Y"))
mTeam <- jsonlite::fromJSON(paste0(a, b, 252353, "?view=mTeam"))
  • currentProjectedRank
  • draftDayProjectedRank
  • logo
  • logoType
  • playoffSeed
  • points
  • pointsAdjusted
  • pointsDelta
  • rankCalculatedFinal
  • rankFinal
  • record
  • tradeBlock
  • transactionCounter
  • valuesByStat
  • waiverRank

Add check that league is public

#> List of 2
#>  $ messages: chr "You are not authorized to view this League."
#>  $ details :'data.frame':	1 obs. of  5 variables:
#>   ..$ message     : chr "You are not authorized to view this League."
#>   ..$ shortMessage: chr "You are not authorized to view this League."
#>   ..$ resolution  : logi NA
#>   ..$ type        : chr "AUTH_LEAGUE_NOT_VISIBLE"
#>   ..$ metaData    : logi NA

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.