Get League Franchises
Source:R/0_generics.R
, R/espn_franchises.R
, R/flea_franchises.R
, and 2 more
ff_franchises.Rd
Return franchise-level data (including divisions, usernames, etc) - available data may vary slightly based on platform.
Usage
ff_franchises(conn)
# S3 method for espn_conn
ff_franchises(conn)
# S3 method for flea_conn
ff_franchises(conn)
# S3 method for mfl_conn
ff_franchises(conn)
# S3 method for sleeper_conn
ff_franchises(conn)
Arguments
- conn
a conn object created by
ff_connect()
Methods (by class)
ff_franchises(espn_conn)
: ESPN: returns franchise and division information.ff_franchises(flea_conn)
: Fleaflicker: returns franchise and division information.ff_franchises(mfl_conn)
: MFL: returns franchise and division information.ff_franchises(sleeper_conn)
: Sleeper: retrieves a list of franchise information, including user IDs and co-owner IDs.
Examples
# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
conn <- espn_connect(season = 2020, league_id = 1178049)
ff_franchises(conn)
}) # end try
#> # A tibble: 14 × 8
#> franchise_id franchise_name franc…¹ logo waive…² user_id user_…³ user_…⁴
#> <int> <chr> <chr> <chr> <int> <chr> <chr> <chr>
#> 1 1 Rushin' Collusion RC http… 3 {6CE35… Aaron … Jack_a…
#> 2 2 Gurleys Gone Wild GGW http… 6 {74ADB… ian ja… ianjaap
#> 3 3 The Name's Mage Mage http… 12 {141C9… Colin … tksdev…
#> 4 4 dlp:: thoriyan thor http… 5 {1E6BB… H Tan tanho63
#> 5 5 No Ultrasmurfs Al… ALH http… 9 {E88F5… Alex Tu No Ult…
#> 6 6 Dak Street Boys DSB http… 11 {441A5… I Guess Americ…
#> 7 7 Kung-Fu Kenny KDOT http… 10 {C6050… Raheel… PolarR…
#> 8 8 Sticky Simians LEL http… 4 {599F7… Taylor… Monkey…
#> 9 9 The Wright Stuff TWS NA 8 {F831B… Adam K… Klaelm…
#> 10 10 Too Many Cooks COOK http… 7 {C9AE3… K R eidolo…
#> 11 11 Team Typhon TYPH http… 14 {070C0… Kade W… Typhon…
#> 12 12 Homicidal Hicks HH http… 1 {CBF26… Travis… Kai Sh…
#> 13 13 Baby You Can Driv… POKE http… 13 {A5DC8… D R phishc…
#> 14 14 Boralus Booty BB http… 2 {1778D… Willia… Cephir…
#> # … with abbreviated variable names ¹franchise_abbrev, ²waiver_order,
#> # ³user_name, ⁴user_nickname
# }
# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
conn <- fleaflicker_connect(season = 2020, league_id = 206154)
ff_franchises(conn)
}) # end try
#> # A tibble: 12 × 10
#> division_id divisio…¹ franc…² franc…³ franc…⁴ franc…⁵ user_id user_…⁶ user_…⁷
#> <int> <chr> <int> <chr> <chr> <chr> <int> <chr> <chr>
#> 1 606681 JDL North 1373501 Midgar… https:… MG 1031700 Darry NA
#> 2 606681 JDL North 1371776 Winter… https:… WH 894210 Mitchw… NA
#> 3 606681 JDL North 1373973 Red Ri… https:… RR 1148208 Ldub32 NA
#> 4 606681 JDL North 1373991 Top Ci… https:… TC 1032237 Sirhur… NA
#> 5 606682 JDL East 1373475 Winter… https:… WD 749239 syd12n… NA
#> 6 606682 JDL East 1373480 Golden… https:… GC 752341 DieNas… NA
#> 7 606682 JDL East 1374252 Centra… https:… CC 751687 noelbo… https:…
#> 8 606682 JDL East 1374255 Mushro… https:… MC 749720 Diabet… NA
#> 9 606683 JDL South 1373970 Bamend… https:… BH 1032089 greate… NA
#> 10 606683 JDL South 1373993 Boomto… https:… BS 1142313 Foxtro… https:…
#> 11 606683 JDL South 1374315 Shangh… NA SC 1032619 Commie… NA
#> 12 606684 JDL West 1373883 Manito… NA MM 1000915 Fonduc… NA
#> # … with 1 more variable: user_lastlogin <dttm>, and abbreviated variable names
#> # ¹division_name, ²franchise_id, ³franchise_name, ⁴franchise_logo,
#> # ⁵franchise_abbrev, ⁶user_name, ⁷user_avatar
# }
# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
ssb_conn <- ff_connect(platform = "mfl", league_id = 54040, season = 2020)
ff_franchises(ssb_conn)
}) # end try
#> # A tibble: 14 × 7
#> franchise_id franchise_name bbidAvailableBal…¹ waive…² icon logo abbrev
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 0001 Team Pikachu 159.00 1 http… http… PIKA
#> 2 0002 Team Simon Belmont 99.00 7 http… http… SIMN
#> 3 0003 Team Donkey Kong 50.00 6 http… http… DK
#> 4 0004 Team Ice Climbers 0.00 5 http… http… ICE
#> 5 0005 Team Dr. Mario 84.00 4 http… http… DRM
#> 6 0006 Team King Dedede 87.00 10 http… http… KDDD
#> 7 0007 Team Kirby 40.00 8 http… http… KRBY
#> 8 0008 Team Bowser 0.00 9 http… http… BWSR
#> 9 0009 Team Link 81.00 13 http… http… LINK
#> 10 0010 Team Yoshi 0.00 12 http… http… YSHI
#> 11 0011 Team Diddy Kong 173.00 11 http… http… DDY
#> 12 0012 Team Mewtwo 0.00 3 http… http… MEW2
#> 13 0013 Team Ness 0.00 2 http… http… NESS
#> 14 0014 Team Luigi 0.00 14 http… http… LUIG
#> # … with abbreviated variable names ¹bbidAvailableBalance, ²waiverSortOrder
# }
# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
jml_conn <- ff_connect(platform = "sleeper", league_id = "522458773317046272", season = 2020)
ff_franchises(jml_conn)
}) # end try
#> # A tibble: 12 × 5
#> franchise_id franchise_name user_name user_id co_owners
#> <int> <chr> <chr> <chr> <list>
#> 1 1 Fake News Jcurtis44 70729037081100288 <NULL>
#> 2 2 KingGabe KingGabe 76686532077305856 <NULL>
#> 3 3 solarpool solarpool 202892038360801280 <NULL>
#> 4 4 The FANTom Menace weeknee 202882046337490944 <NULL>
#> 5 5 Barbarians ABitterHomer 386383436639973376 <NULL>
#> 6 6 sox05syd sox05syd 409797051455393792 <NULL>
#> 7 7 Flipadelphia05 Flipadelphia05 386950378371207168 <NULL>
#> 8 8 Hocka Flocka TwoFrames 386976568364306432 <NULL>
#> 9 9 ZPMiller97 ZPMiller97 386571720443764736 <NULL>
#> 10 10 JMLarkin JMLarkin 387070108625039360 <NULL>
#> 11 11 Permian Panthers theoracleETS 198540145396289536 <list [1]>
#> 12 12 jaydk jaydk 401485903224193024 <NULL>
# }