fdo_listFixtures: List all fixtures for a certain competition.

Description Usage Arguments Value Examples

View source: R/fdo.R

Description

Returns all fixtures for a specific competition from the football-data.org API

Usage

1
2
fdo_listFixtures(league = "", timeFrame = "", token = "",
  response = "full")

Arguments

league

(string <vector>) A vector of the league codes. Not to be confused with league ids, leagues codes can be found the fdo_leagueCodes data frame. Optional. Default is "", meaning all league codes are returned.

timeFrame

(string) The value of the timeFrame argument must start with either p(ast) or n(ext), representing a timeframe either in the past or future. It is followed by a number in the range 1-99. For example, p6 would return all fixtures in the last 6 days, whereas n23 would result in returning all fixtures in the next 23 days. Optional. Default is "n7".

token

(string) football data.org API token. Optional but it's recommended that you acquire an API token. It allows the owner to document API activity. See http://api.football-data.org/register for more details.

response

(string). Determine the structure of the response. Default is "full" and "minified" will remove some meta inforation and thus return a smaller data frame. Finally, "compressed" is only supported by the fixture resource.

Value

A data frame converted from the JSON format is returned.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# league code for La Liga is "PD"
# all La Liga fixtures in the coming 7 days
fdo_listFixtures("PD")
# league code for Ligue 1 is "FL1"
# all La Liga and Ligue 1 fixtures in the next 14 days.
fdo_listFixtures(league=c("PD","FL1"),timeFrame="n14")

## End(Not run)

dashee87/footballR documentation built on May 12, 2017, 5:40 p.m.