nhl_url: Create an NHL API URL

Description Usage Arguments Value Examples

View source: R/nhl_url.R

Description

Create an NHL API URL

Usage

1
2
3
4
5
6
nhl_url(
  endPoint = NULL,
  suffixes = NULL,
  params = NULL,
  baseUrl = getOption("nhlapi_baseurl")
)

Arguments

endPoint

character(1), the API endpoint.

suffixes

list(), of suffixes that will be concatenated to the end of the URLs, separated by /.

params

named list() of parameters that will be concatenated to the end of the URLs after ?. Parameters can have multiple values, in which case multiple URLs are created. Multiple parameters are separated by &.

baseUrl

character(1), URL of the NHL API base location.

Value

character(), the created URLs.

Examples

1
  nhlapi:::nhl_url("people", "8477474")

nhlapi documentation built on Feb. 20, 2021, 9:06 a.m.