Skip to content

v1.3.0 - ESPN - on CRAN!

Choose a tag to compare

@tanho63 tanho63 released this 07 Mar 16:50
· 317 commits to main since this release
3e53013

The main goal of ffscrapr 1.3.0 is to add support for the ESPN platform. It also includes several bug fixes, code quality improvements, and a major refactor of tests to reduce overall package size.

A huge thank-you goes to Tony ElHabr for his contributions to the package for the ESPN methods.

Breaking Changes

  • custom_players arguments are deprecated for MFL - it will now return them by default.

ESPN Details

ESPN is a tricky and undocumented API. Private leagues are accessible if you use the SWID/ESPN_S2 authentication arguments, which are a lot like API keys - see the ESPN authentication vignette.

Unsupported functions:

  • ff_draftpicks() - this does not apply to ESPN primarily because it does not support draft pick trades.
  • ff_userleagues() - ESPN does not support looking up user's leagues, even when authenticated
  • Username and password features - ESPN used to have a way to authenticate via username/password, but this has been recently made more difficult. It is an area that can be revisited if/when the Python package manages it, but at this time will only be accessible with the SWID/ESPN_S2 keys.

New Functions

  • dp_cleannames() is a utility function for cleaning player names that removes common suffixes, periods, and apostrophes.
  • espn_potentialpoints() calculates the optimal lineup for each week. This is

Minor patches

  • Converted GET requests to use httr::RETRY instead - this adds some robustness for server-side issues. As suggested by Maelle Salmon's blog post on not reinventing the wheel.
  • Added some type conversions and renaming for snake_case consistency to mfl_rosters and mfl_playerscores
  • Fixed bug in MFL's ff_playerscores() function so that it correctly pulls older names. (Resolves #196)
  • Refactored all tests to move test cache files to a separate/non-package location (https://github.com/dynastyprocess/ffscrapr-tests) - so that it is not included in CRAN's package sizing
  • Fixed bugs in MFL's ff_starters() function - bad default arg, bad players call. (Fixes #202)
  • Resolve MFL's playerscores to handle vectorized request (Fixes #206)
  • Resolve bugs related to .fn_choose_season for tests (Fixes #217, #219)
  • Resolved bug in MFL's ff_rosters() by adding a week parameter (Fixes #215)
  • Coerced ff_transactions() bid_amount into a numeric (Fixes #210)
  • Removed bye franchises from ff_starters() (Fixes #212)