Adding in as potentially may allow package to work over a few APIs, and this step is done over multiple functions.

football_pull(
  api = "football-data.org",
  api_endpoint = "/competitions/",
  api_token = Sys.getenv("API_FOOTBALL_DATA")
)

Arguments

api

Name of API. Currently has "football-data.org"

api_endpoint

Which API are you using.

api_token

The API token.

Value

Base url for API

Examples

# Will error as no API token FootballData:::football_api_url("football-data.org")
#> [1] "https://api.football-data.org/v2/"