Skip to content

implement 7 OpenF1 API operations#1

Merged
tamnd merged 1 commit into
mainfrom
feat/7-ops
Jun 14, 2026
Merged

implement 7 OpenF1 API operations#1
tamnd merged 1 commit into
mainfrom
feat/7-ops

Conversation

@tamnd

@tamnd tamnd commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaces scaffold stubs in openf1/openf1.go, openf1/domain.go, and test files with real OpenF1 API implementation
  • Adds openf1/models.go with typed structs for all 7 resources: Session, Meeting, Driver, Lap, Stint, PitStop, RaceControlMsg
  • Implements 7 operations: sessions, meetings, drivers, laps, stints, pit, racecontrol — all with --session-key, year/filter flags, and --limit support

Test plan

  • go test ./... passes (11 httptest-backed unit tests)
  • ./bin/openf1 sessions --year 2024 --session-name Race returns 24 race sessions
  • ./bin/openf1 drivers --session-key 9158 returns all 20 drivers
  • ./bin/openf1 laps --session-key 9158 --driver 55 returns lap data for Sainz
  • ./bin/openf1 stints --session-key 9158 --driver 55 returns stint/compound data
  • ./bin/openf1 pit --session-key 9158 --driver 55 returns pit stop data
  • ./bin/openf1 racecontrol --session-key 9158 --flag YELLOW returns yellow flag messages
  • ./bin/openf1 meetings --year 2024 returns all 2024 race weekends

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.
@tamnd tamnd merged commit de8aa33 into main Jun 14, 2026
3 of 6 checks passed
@tamnd tamnd deleted the feat/7-ops branch June 14, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant