make_url_scores: Make a url for scores

Description Usage Arguments Details Value

Description

Make a url for scores.

Usage

1
2
3
4
5
make_url_scores(league, ..., lang = "en", region = "us",
  calendartype = "blacklist", limit = 100, year = format(Sys.Date(),
  "%Y"), dates = NULL, seasontype = NULL, week = NULL)

make_url_scores_nfl(league = "nfl", seasontype = 2, week = 1, ...)

Arguments

league

character. Name of league for which to get scores. One of 'nfl' or 'nba'. For '_[league]()' functions, set to appropriate league by default. (e.g. For '_nfl()', set to 'nfl'.) Note that only 'nfl' is currently implemented.

...

dots. Not currently used.

lang, region, calendartype

character(s). Not technically required. Defaults are provided.

limit

integer or integer-like character. Not technically required, Default is provided.

year

character or integer-like character. Equivalent to 'dates' in the actual API. Provided as an option because it is more intuitive.

dates

See 'year'.

seasontype

integer or integer-like character. For 'nfl' scores, any one of 1 (for pre-season), 2 (for regular season), or 3 (for playoffs) Alternatively, a character, such as "pre-season", "regular season", or "playoffs", and an attempt is made to correctly identify the appropriate seasontype number to use. Not required, although the '_[league]()' functions define a default.

week

integer or character-like character. Not required, although the '_[league]()' functions define a default.

Details

This function–in addition to the 'request_scores()' and 'parse_scores()' functions–is not really intended to be called directly. Instead, it is expected that 'get_scores()' will be called. Nonetheless, this function is provided for debugging purposes (not just for the developer, but for the user).

Note that although the API requires 'sport' as a predecesor to league, this package abstracts this choice away from the user because 'league' is more likely what the user wants to specify. 'sport' can be derived from 'league' internally.

Value

character represpenting a url.


tonyelhabr/espn2 documentation built on May 5, 2019, 3:55 p.m.