Description Usage Arguments Details Value Columns See Also Examples
View source: R/firstapiR_main.R
See the Event Listings section of the FIRST API documentation at http://docs.frcevents2.apiary.io/# for more details.
1 2 3 4 5 6 7 8 9 |
session |
A Session object created with |
event |
A character vector containing a FIRST API event code. If event
is specified, |
team |
An integer vector containing a team number. Optional |
district |
A character vector containing the FIRST API district code
(see |
exclude_district |
A logical vector. If set to |
mod_since |
A character vector containing an HTTP formatted date and
time. Returns |
only_mod_since |
A character vector containing an HTTP formatted date and time. This function only returns data that has changed since the date and time provided. Optional. |
GetEvents will accept either the team or district
parameters, neither parameter, or both parameters. If neither team nor
district are specified, GetEvents returns all FRC events for
the competition season. If team is specified, the results are filtered
to only the events in which the FRC team participated. Similarly, if
district is specified, the results are filtered to only the events
that occurred within the specified district. If exclude_district is
set to TRUE, then only non-district events are returned. The district
and exclude_district events may not be specified at the same time.
Throws an error if team is specified and any other arguments are
specified, or if both the district and exclude_district
arguments are specified.
The FIRST API URL format is:
https://frc-api.firstinspires.org/v2.0/season/events?
teamNumber=team&districtCode=district&excludeDistrict=district
Depending on the session$format value, returns JSON text, an
XML::XMLDocument object, or a data.frame with class set to c("data.frame,
"Events"). Returns a logical vector of length one with value NA if
data is unchanged since date and time passed in arguments mod_since
or only_mod_since.
code: character
divisionCode: character
name: character
type: factor ('Regional', 'DistrictEvent', 'DistrictChampionship', 'ChampionshipSubdivision', 'ChampionshipDivision', 'Championship', 'Offseason')
districtCode: factor ('CHM', 'FIM', 'IN', 'MAR', 'NC', 'PCH', 'PNW')
venue: character
city: character
stateprov: factor
country: factor
timezone: factor
dateStart: character
dateEnd: character
eventCount: integer
Refer to Standard_attributes for data
attributes returned by this function.
1 2 3 4 | sn <- GetSession("username", "key", season = 2016)
team5803_events <- GetEvents(sn, team = 5803)
pacificNW_events <- GetEvents(sn, district = 'PNW')
team360_nondist_events <- GetEvents(sn, team = 360, exclude_district = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.