Description Usage Arguments Details Value Columns See Also Examples
Provides lists of FRC teams for specified events, districts, and states. With
no parameters (except for session
), GetTeams
will provide a
list of all FRC teams.
1 2 3 4 5 6 7 8 9 10 |
session |
A Session object created with |
team |
An integer vector containing a team number. Optional. |
event |
Character A FIRST API event code (see |
district |
A character vector containing a FIRST API district code
(see |
state |
A character vector containing a state name, spelled out entirely
(i.e., 'Idaho', not 'ID'). If state is specified, |
page |
An integer vector that specifyies which page of results should be returned. Optional. Use only for XML or JSON formats. |
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. |
Because the length of the GetTeams
response can be several thousand
lines long, the FIRST API server will break up its response into several
pages when the number of teams in the response exceeds 65. For the data frame
format, GetTeams
will send a request to the FIRST API server and
determine from the first response whether additional HTTP requests are
necessary to retrieve all requested data. GetTeams
will then merge all
responses into a single data frame. For XML and JSON formats, the user will
have to call GetTeams
for each page of data, specifying the page with
the page
argument.
See the Team Listings section of the FIRST API documentation at http://docs.frcevents2.apiary.io/# for more details.
The FIRST API URL format is:
https://frc-api.firstinspires.org/v2.0/season/teams&eventCode=event
?districtCode=district?state=state?page=2
Depending on the session$format
value, returns JSON text, an
XML::XMLDocument object, or a data.frame with class set to c("data.frame,
"Teams"). 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
.
team: character
nameFull: character
nameShort: character
city: character
stateProv: factor
country: factor
website: character
rookieYear: integer
robotName: character
districtCode: factor
teamCountTotal: integer
teamCountPage: integer
pageCurrent: integer
pageTotal: integer
Refer to Standard_attributes
for data
attributes returned by this function.
1 2 3 4 | sn <- GetSession("username", "key", season = 2016)
GetTeams(sn, state = "California")
GetTeams(sn, district = "FIM")
GetTeams(sn, event = "CMP-CARVER")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.