GetAwards: Get the awards that were presented at an event

Description Usage Arguments Details Value Columns See Also Examples

View source: R/firstapiR_main.R

Description

See the Event Awards section of the FIRST API documentation at http://docs.frcevents2.apiary.io/# for more details.

Usage

1
2
3
4
5
6
7
GetAwards(
  session,
  event = NULL,
  team = NULL,
  mod_since = NULL,
  only_mod_since = NULL
)

Arguments

session

A Session object created with GetSession().

event

A character vector containing a FIRST API event code (see GetEvents). Must specify the event argument, the team argument, or both.

team

An integer vector containing a team number. Optional. Must specify the event argument, the team argument, or both.

mod_since

A character vector containing an HTTP formatted date and time. Returns NA if no changes have been made to the requested data since the date and time provided. Optional.

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.

Details

The FIRST API URL format is: https://frc-api.firstinspires.org/v2.0/season/awards/event/team

Value

Depending on the session$format value, returns JSON text, an XML::XMLDocument object or a data.frame with class set to c("data.frame, "Awards"). 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.

Columns

  1. awardId: integer

  2. teamId: integer

  3. eventId: integer

  4. eventDivisionId: logical

  5. eventCode: character

  6. name: character

  7. series: integer

  8. team: integer

  9. fullTeamName: character

  10. person: character

See Also

Refer to Standard_attributes for data attributes returned by this function.

Examples

1
2
3
4
sn <- GetSession("username", "key", season = 2016)
GetAwards(sn, "PNCMP")
GetAwards(sn, team = 360)
GetAwards(sn, "PNCMP", 360)

irwinsnet/FIRST_api_R documentation built on Dec. 22, 2020, 5:12 p.m.