sleeper_connect: Connect to Sleeper League

Description Usage Arguments Value

View source: R/sleeper_connect.R

Description

This function creates a connection object which stores parameters and a user ID if available.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
sleeper_connect(
  season = NULL,
  league_id = NULL,
  user_name = NULL,
  user_agent = NULL,
  rate_limit = TRUE,
  rate_limit_number = NULL,
  rate_limit_seconds = NULL,
  ...
)

Arguments

season

Season to access on Sleeper - if missing, will guess based on system date (current year if March or later, otherwise previous year)

league_id

League ID (currently assuming one league at a time)

user_name

Sleeper user_name - optional - attempts to get user's user ID

user_agent

User agent to self-identify (optional)

rate_limit

TRUE by default - turn off rate limiting with FALSE

rate_limit_number

number of calls per rate_limit_seconds, suggested is under 1000 calls per 60 seconds

rate_limit_seconds

number of seconds as denominator for rate_limit

...

other arguments (for other methods)

Value

a list that stores Sleeper connection objects


ffscrapr documentation built on June 12, 2021, 5:07 p.m.