espn_getendpoint: GET ESPN fantasy league endpoint

View source: R/espn_api.R

espn_getendpointR Documentation

GET ESPN fantasy league endpoint

Description

This function is used to call the ESPN Fantasy API for league-based endpoints.

Usage

espn_getendpoint(conn, ..., x_fantasy_filter = NULL)

Arguments

conn

a connection object created by espn_connect or ff_connect()

...

Arguments which will be passed as "argumentname = argument" in an HTTP query parameter

x_fantasy_filter

a JSON-encoded character string that specifies a filter for the data

Details

The ESPN Fantasy API is undocumented and this should be used by advanced users familiar with the API.

It chooses the correct league endpoint based on the year (eg leagueHistory for <2018), checks the x_fantasy_filter for valid JSON input, builds a url with any optional query parameters, and executes the request with authentication and rate limiting.

HTTP query parameters (i.e. arguments to ...) are Case Sensitive.

Please see the vignette for more on usage.

Value

A list object containing the query, response, and parsed content.

See Also

vignette("espn_getendpoint")

espn_getendpoint_raw


ffscrapr documentation built on Feb. 16, 2023, 10:55 p.m.