Documentation ¶
Index ¶
- func GetLeagueMembers(season, regionCode, leagueCode string) ([]int, error)
- type Advancement
- type AdvancementsFrom
- type AdvancementsTo
- type Alliance
- type AllianceSelection
- type AllianceSelections
- type Alliances
- type ApiIndex
- type Award
- type Awards
- type Championship
- type Championships
- type Event
- type EventSchedule
- type EventSchedules
- type Events
- type HybridSchedule
- type HybridSchedules
- type League
- type LeagueMembers
- type Leagues
- type Match
- type MatchAlliance
- type MatchScores
- type MatchTeam
- type MatchType
- type Matches
- type Ranking
- type Rankings
- type ScheduledTeam
- type Scores
- type Team
- type TeamAward
- type TeamAwards
- type Teams
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLeagueMembers ¶
GetLeagueMembers returns the list of members in the league
Types ¶
type Advancement ¶
type Advancement struct { Team int `json:"team"` DisplayTeam string `json:"displayTeam"` Slot int `json:"slot"` Criteria string `json:"criteria"` Status string `json:"status"` }
Advancement is the advancement information for a given team
func (Advancement) String ¶
func (a Advancement) String() string
type AdvancementsFrom ¶
type AdvancementsFrom struct { AdvancedFrom string `json:"advancedFrom"` AdvancedFromRegion *string `json:"advancedFromRegion"` Slots int `json:"slots"` Advancement []*Advancement `json:"advancement"` }
AdvancementsFrom is the list of teams advancing to a future tournament
func GetAdvancementsFrom ¶
func GetAdvancementsFrom(season, eventCode string) ([]*AdvancementsFrom, error)
GetAdvancementFrom returns the source events from which teams advanced from to reach the specified event.
func (AdvancementsFrom) String ¶
func (a AdvancementsFrom) String() string
type AdvancementsTo ¶
type AdvancementsTo struct { AdvancesTo string `json:"advancesTo"` Slots int `json:"slots"` Advancement []*Advancement `json:"advancement"` }
AdvancementsTo is the list of teams that advanced from or to a given tournament
func GetAdvancementsTo ¶
func GetAdvancementsTo(season, eventCode string, excludeSkipped ...bool) (*AdvancementsTo, error)
GetAdvancementTo returns the list of teams advancing from the event and to which event they are advancing.
func (AdvancementsTo) String ¶
func (a AdvancementsTo) String() string
type Alliance ¶
type Alliance struct { Number int `json:"number"` Name string `json:"name"` Captain int `json:"captain"` CaptainDisplay string `json:"captainDisplay"` Round1 int `json:"round1,omitempty"` Round1Display string `json:"round1Display,omitempty"` Round2 int `json:"round2,omitempty"` Round2Display string `json:"round2Display,omitempty"` Round3 *int `json:"round3,omitempty"` Backup *string `json:"backup,omitempty"` BackupReplaced *string `json:"backupReplaced,omitempty"` }
Alliance is the results for one alliance in a match between two alliances
func GetEventAlliances ¶
GetEventAlliances returns the alliance selectsions for the playoffs for the given event.
type AllianceSelection ¶
type AllianceSelection struct { Index int `json:"index"` Team int `json:"team"` Result string `json:"result"` }
AllianceSelection is the alliance results for a given team
func GetAllianceSelections ¶
func GetAllianceSelections(season, eventCode string) ([]*AllianceSelection, error)
GetAllianceSelections returns the teams that were selected into alliances for the given event.
func (AllianceSelection) String ¶
func (a AllianceSelection) String() string
type AllianceSelections ¶
type AllianceSelections struct { Selections []*AllianceSelection `json:"selections"` Count int `json:"count"` }
AllianceSelections is the list of alliance selections.
type ApiIndex ¶
type ApiIndex struct { Name string `json:"name,omitempty"` APIVersion string `json:"apiVersion,omitempty"` ServiceMainifestName *string `json:"serviceMainifestName,omitempty"` ServiceMainifestVersion *string `json:"serviceMainifestVersion,omitempty"` CodePackageName string `json:"codePackageName"` CodePackageVersion string `json:"codePackageVersion"` Status string `json:"status,omitempty"` CurrentSeason int `json:"currentSeason,omitempty"` MaxSeason int `json:"maxSeason,omitempty"` }
ApiIndex provives information for the FTC server API
func GetApiIndex ¶
GetApiIndex returns the information for the FTC server API
type Award ¶
type Award struct { AwardID int `json:"awardId"` Name string `json:"name"` Description string `json:"description"` ForPerson bool `json:"forPerson"` }
Award is an award that is given in a given season
func GetAwardListing ¶
GetAwardListing returns the list of awards for a given season
type Awards ¶
type Awards struct {
Awards []*Award `json:"awards"`
}
Awards is the list of awards for a given season
type Championship ¶
type Championship struct { Name string `json:"name"` StartDate string `json:"startDate"` Location string `json:"location"` }
Championship is the information about a given regional championship.
func (Championship) String ¶
func (c Championship) String() string
type Championships ¶
type Championships struct { EventCount int `json:"eventCount"` GameName string `json:"gameName"` Kickoff string `json:"kickoff"` RookieStart int `json:"rookieStart"` TeamCount int `json:"teamCount"` Championships []*Championship `json:"fRCChampionships"` }
Championships is the information about the season summary
func GetSeasonSummary ¶
func GetSeasonSummary(season string) (*Championships, error)
GetSeasonSummary returns a list of the regional championships for the given season
func (Championships) String ¶
func (c Championships) String() string
type Event ¶
type Event struct { EventID string `json:"eventId,omitempty"` Code string `json:"code,omitempty"` DivisionCode *string `json:"divisionCode,omitempty"` Name string `json:"name,omitempty"` Remote bool `json:"remote,omitempty"` Hybrid bool `json:"hybrid,omitempty"` FieldCount int `json:"fieldCount,omitempty"` Published bool `json:"published,omitempty"` Type string `json:"type,omitempty"` TypeName string `json:"typeName,omitempty"` RegionCode string `json:"regionCode,omitempty"` LeagueCode *string `json:"leagueCode,omitempty"` DistrictCode string `json:"districtCode,omitempty"` Venue string `json:"venue,omitempty"` Address string `json:"address,omitempty"` City string `json:"city,omitempty"` Stateprov string `json:"stateprov,omitempty"` Country string `json:"country,omitempty"` Website string `json:"website,omitempty"` LiveStreamURL string `json:"liveStreamUrl,omitempty"` Coordinates *string `json:"coordinates,omitempty"` Webcasts *string `json:"webcasts,omitempty"` Timezone string `json:"timezone,omitempty"` DateStart Time `json:"dateStart,omitempty"` DateEnd Time `json:"dateEnd,omitempty"` }
Event is information about a given FTC event.
type EventSchedule ¶
type EventSchedule struct { Description string `json:"description,omitempty"` Field string `json:"field,omitempty"` TournamentLevel string `json:"tournamentLevel,omitempty"` StartTime string `json:"startTime,omitempty"` Series int `json:"series,omitempty"` MatchNumber int `json:"matchNumber,omitempty"` Teams []ScheduledTeam `json:"teams"` ModifiedOn string `json:"modifiedOn,omitempty"` }
EventSchedule is the schedule at a given event
func GetEventSchedule ¶
func GetEventSchedule(season, eventCode string, tournamentLevel MatchType, teamNumber ...string) ([]*EventSchedule, error)
GetEventSchedule gets the match schedule for a given event.
func (EventSchedule) String ¶
func (s EventSchedule) String() string
type EventSchedules ¶
type EventSchedules struct {
Schedule []*EventSchedule `json:"schedule"`
}
EventSchedules is the list of event schedules
type Events ¶
type Events struct { Events []*Event `json:"events,omitempty"` EventCount int `json:"eventCount,omitempty"` }
Events is information about FTC events.
type HybridSchedule ¶
type HybridSchedule struct { Description string `json:"description"` TournamentLevel string `json:"tournamentLevel"` Series int `json:"series"` MatchNumber int `json:"matchNumber"` StartTime string `json:"startTime"` ActualStartTime string `json:"actualStartTime"` PostResultTime string `json:"postResultTime"` ScoreRedFinal int `json:"scoreRedFinal"` ScoreRedFoul int `json:"scoreRedFoul"` ScoreRedAuto int `json:"scoreRedAuto"` ScoreBlueFinal int `json:"scoreBlueFinal"` ScoreBlueFoul int `json:"scoreBlueFoul"` ScoreBlueAuto int `json:"scoreBlueAuto"` ScoreBlueDriveControlled *int `json:"scoreBlueDriveControlled,omitempty"` ScoreBlueEndgame *int `json:"scoreBlueEndgame,omitempty"` RedWins bool `json:"redWins"` BlueWins bool `json:"blueWins"` Teams []ScheduledTeam `json:"teams"` }
HybridSchedule is the result for a scheduled match at a given event
func GetHybridSchedule ¶
func GetHybridSchedule(season, eventCode string, tournamentLevel MatchType) ([]*HybridSchedule, error)
GetHybridSchedule gets the hybrid schedule information for a given event.
func (HybridSchedule) String ¶
func (s HybridSchedule) String() string
type HybridSchedules ¶
type HybridSchedules struct {
Schedule []*HybridSchedule `json:"schedule"`
}
HybridSchedules is the list of results for a schedule at a given event
type League ¶
type League struct { Region string `json:"region,omitempty"` Code string `json:"code,omitempty"` Name string `json:"name,omitempty"` Remote bool `json:"remote,omitempty"` ParentLeagueCode *string `json:"parentLeagueCode,omitempty"` ParentLeagueName *string `json:"parentLeagueName,omitempty"` Location string `json:"location,omitempty"` }
League is the data for a given FTC league
func GetLeagues ¶
GetLeagues returns the list of rankings for FTC leagues. Supported qparms are `regionCode` and `leagueCode`.
type LeagueMembers ¶
type LeagueMembers struct {
Members []int `json:"members"`
}
type Match ¶
type Match struct { ActualStartTime string `json:"actualStartTime"` Description string `json:"description"` TournamentLevel string `json:"tournamentLevel"` Series int `json:"series"` MatchNumber int `json:"matchNumber"` ScoreRedFinal int `json:"scoreRedFinal"` ScoreRedFoul int `json:"scoreRedFoul"` ScoreRedAuto int `json:"scoreRedAuto"` ScoreBlueFinal int `json:"scoreBlueFinal"` ScoreBlueFoul int `json:"scoreBlueFoul"` ScoreBlueAuto int `json:"scoreBlueAuto"` PostResultTime string `json:"postResultTime"` Teams []*MatchTeam `json:"teams"` ModifiedOn string `json:"modifiedOn"` }
Match is a match that takes place at a given event
type MatchAlliance ¶
type MatchAlliance struct { Alliance string `json:"alliance"` Team int `json:"team"` InitTeamProp1 bool `json:"initTeamProp1"` InitTeamProp2 bool `json:"initTeamProp2"` Robot1Auto bool `json:"robot1Auto"` Robot2Auto bool `json:"robot2Auto"` SpikeMarkPixel1 bool `json:"spikeMarkPixel1"` SpikeMarkPixel2 bool `json:"spikeMarkPixel2"` TargetBackdropPixel1 bool `json:"targetBackdropPixel1"` TargetBackdropPixel2 bool `json:"targetBackdropPixel2"` AutoBackdrop int `json:"autoBackdrop"` AutoBackstage int `json:"autoBackstage"` DcBackdrop int `json:"dcBackdrop"` DcBackstage int `json:"dcBackstage"` Mosaics int `json:"mosaics"` MaxSetLine int `json:"maxSetLine"` EgRobot1 string `json:"egRobot1"` EgRobot2 string `json:"egRobot2"` Drone1 int `json:"drone1"` Drone2 int `json:"drone2"` MinorPenalties int `json:"minorPenalties"` MajorPenalties int `json:"majorPenalties"` AutoRandomizationPoints int `json:"autoRandomizationPoints"` AutoBackstagePoints int `json:"autoBackstagePoints"` AutoBackdropPoints int `json:"autoBackdropPoints"` DcBackdropPoints int `json:"dcBackdropPoints"` DcBackstagePoints int `json:"dcBackstagePoints"` MosaicPoints int `json:"mosaicPoints"` SetBonusPoints int `json:"setBonusPoints"` EgLocationPoints int `json:"egLocationPoints"` EgDronePoints int `json:"egDronePoints"` AutoPoints int `json:"autoPoints"` DcPoints int `json:"dcPoints"` EndgamePoints int `json:"endgamePoints"` PenaltyPointsCommitted int `json:"penaltyPointsCommitted"` PrePenaltyTotal int `json:"prePenaltyTotal"` TotalPoints int `json:"totalPoints"` }
MatchAlliance is the detailed results for a given team in a match at a given event.
func (MatchAlliance) String ¶
func (ma MatchAlliance) String() string
type MatchScores ¶
type MatchScores struct { MatchLevel string `json:"matchLevel"` MatchSeries int `json:"matchSeries"` MatchNumber int `json:"matchNumber"` Randomization int `json:"randomization"` Alliances []*MatchAlliance `json:"alliances"` }
MatchScores is the results of a match at a given event.
func GetEventScores ¶
func GetEventScores(season, eventCode string, tournamentLevel MatchType, teamNumber ...string) ([]*MatchScores, error)
GetEventScores returns the results for a given event
func (MatchScores) String ¶
func (ms MatchScores) String() string
type MatchTeam ¶
type Matches ¶
type Matches struct {
Matches []*Match `json:"matches"`
}
Matches is the list of matches
type Ranking ¶
type Ranking struct { Rank int `json:"rank"` TeamNumber int `json:"teamNumber"` DisplayTeamNumber string `json:"displayTeamNumber"` TeamName *string `json:"teamName,omitempty"` SortOrder1 float64 `json:"sortOrder1"` SortOrder2 float64 `json:"sortOrder2"` SortOrder3 float64 `json:"sortOrder3"` SortOrder4 float64 `json:"sortOrder4"` SortOrder5 float64 `json:"sortOrder5"` SortOrder6 float64 `json:"sortOrder6"` Wins int `json:"wins"` Losses int `json:"losses"` Ties int `json:"ties"` QualAverage int `json:"qualAverage"` DQ int `json:"dq"` MatchesPlayed int `json:"matchesPlayed"` MatchesCounted int `json:"matchesCounted"` }
Ranking is the ranking for a given event.
func GetRankings ¶
GetRankings returns the team rankings in a given league.
type Rankings ¶
type Rankings struct {
Rankings []*Ranking `json:"rankings"`
}
Rankings is the list of rankings for a given event.
type ScheduledTeam ¶
type ScheduledTeam struct { TeamNumber int `json:"teamNumber,omitempty"` DisplayTeamNumber string `json:"displayTeamNumber,omitempty"` Station string `json:"station,omitempty"` Team string `json:"team,omitempty"` TeamName string `json:"teamName,omitempty"` Surrogate bool `json:"surrogate,omitempty"` NoShow bool `json:"noShow,omitempty"` DQ *bool `json:"dq,omitempty"` OnField *bool `json:"onField,omitempty"` }
ScheduledTeam is the team that is scheduled at a given tournament
type Scores ¶
type Scores struct {
MatchScores []*MatchScores `json:"matchScores"`
}
Scores is the list of match scores at a given event.
type Team ¶
type Team struct { TeamNumber int `json:"teamNumber,omitempty"` DisplayTeamNumber string `json:"displayTeamNumber,omitempty"` NameFull string `json:"nameFull,omitempty"` NameShort string `json:"nameShort,omitempty"` SchoolName *string `json:"schoolName,omitempty"` City string `json:"city,omitempty"` StateProv string `json:"stateProv,omitempty"` Country string `json:"country,omitempty"` Website *string `json:"website,omitempty"` RookieYear int `json:"rookieYear,omitempty"` RobotName *string `json:"robotName,omitempty"` DistrictCode *string `json:"districtCode,omitempty"` HomeCMP *string `json:"homeCMP,omitempty"` HomeRegion *string `json:"homeRegion,omitempty"` }
Team is information for a given FTC team.
type TeamAward ¶
type TeamAward struct { AwardID int `json:"awardId"` EventCode string `json:"eventCode"` Name string `json:"name"` Series int `json:"series"` TeamNumber int `json:"teamNumber"` SchoolName *string `json:"schoolName,omitempty"` FullTeamName string `json:"fullTeamName"` Person *string `json:"person,omitempty"` }
TeamAward is an award that is received by a given team
func GetEventAwards ¶
GetEventAwards gets the list of awards given at an event
func GetTeamAwards ¶
GetTeamAwards gets the list of awards for a given team
type TeamAwards ¶
type TeamAwards struct {
Awards []*TeamAward `json:"awards"`
}
TeamAwards is the list of awards received by a team
type Teams ¶
type Teams struct { Teams []*Team `json:"teams"` TeamCountTotal int `json:"teamCountTotal"` TeamCountPage int `json:"teamCountPage"` PageCurrent int `json:"pageCurrent"` PageTotal int `json:"pageTotal"` }
Teams returns a list of FTC teams. The information is returned in `pages`, so multiple requests may be required to get all FTC teams.
type Time ¶
func (Time) MarshalJSON ¶
MarshalJSON returns a JSON encoding of the time
func (*Time) UnmarshalJSON ¶
UnmarshalJSON parses the json time into a time value