Description Usage Arguments Details Value
Translates the key-values in a named list of statsnbaR key-value pairs to
key-value pairs that the stats.nba.com API recognises for use in the
calls to httr::GET
in api_scrape
.
1 | map_filters(filters, api.endpoint)
|
filters |
The statsnbaR filter key-value pairs. |
api.endpoint |
statsnbaR specification of the stats.nba.com API endpoint |
The stats.nba.com API end-point description is given in the internal YAML which provides the translation of keys that statsnbaR specifies to keys that stats.nba.com recognises, e.g. ‘league’ in statsnbaR is translated to “LeagueID” for stats.nba.com in this example:
1 2 3 4 5 | endpoints :
PlayerCommon :
api.filters :
league : "LeagueID"
...
|
The values are mapped according to the filter mappings also specified in the internal YAML data, e.g:
1 2 3 4 5 6 7 8 |
Thus ‘NBA’ would be mapped to “00”.
#' @seealso map_filter_values
Named list of statsnbaR key-values mapped to stats.nba.com API key-value pairs.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.