implement 7 OpenF1 API operations#1
Merged
Merged
Conversation
sessions, meetings, drivers, laps, stints, pit, racecontrol — all wired through the kit domain with typed JSON models and httptest coverage. No API key required; pacing at 200ms, 3 retries, 15s timeout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openf1/openf1.go,openf1/domain.go, and test files with real OpenF1 API implementationopenf1/models.gowith typed structs for all 7 resources: Session, Meeting, Driver, Lap, Stint, PitStop, RaceControlMsgsessions,meetings,drivers,laps,stints,pit,racecontrol— all with--session-key, year/filter flags, and--limitsupportTest plan
go test ./...passes (11 httptest-backed unit tests)./bin/openf1 sessions --year 2024 --session-name Racereturns 24 race sessions./bin/openf1 drivers --session-key 9158returns all 20 drivers./bin/openf1 laps --session-key 9158 --driver 55returns lap data for Sainz./bin/openf1 stints --session-key 9158 --driver 55returns stint/compound data./bin/openf1 pit --session-key 9158 --driver 55returns pit stop data./bin/openf1 racecontrol --session-key 9158 --flag YELLOWreturns yellow flag messages./bin/openf1 meetings --year 2024returns all 2024 race weekends