Learn R Programming

nhlapi (version 0.1.4)

nhl_url: Create an NHL API URL

Description

Create an NHL API URL

Usage

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

Run this code
# NOT RUN {
  nhlapi:::nhl_url("people", "8477474")

# }

Run the code above in your browser using DataLab