diff --git a/ROADMAP.md b/ROADMAP.md index 6f17eeb..850fbd1 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -989,9 +989,25 @@ Asked for after the first ÖRC Winter round, where a qualifying went wrong and t Goal: in RaceCore, pick a House of RC event, fetch its entries, create the race in one click, run it, and post the results back. Drivers should only have to sign up in one place. What we know (checked 2026-11-07): -- No public API is documented. `/api`, `/api/v1/events/`, `/developers` and `/docs/api` all return 404. The only endpoint seen is the site's own `/api/stats/brands?event_id=`, which uses a per-page `api_token` and is not meant for us. -- Each event carries `"timing_id": "everlaps"` (or LiveTime) and an `external_id`. House of RC already imports results from timing systems, so the natural route is for RaceCore to become one of those sources. -- Conclusion: phase 0 needs House of RC's cooperation. Scraping the site is not an option, because it is fragile and probably against their terms. +- The API is documented at `https://api.houseofrc.com/docs`, with the spec at `/openapi.yaml`. Authentication is `Authorization: Bearer hrc_…`, the limit is 60 requests a minute, and `GET /v1/me` checks a key. +- **Every club needs its own API key**, from House of RC support. RaceCore stores it per installation. +- The published API is **read-only today** (GET only): + - `/v1/events` lists events (with `start_from`/`start_to`, `type`, `series_id`, `organization_id`, `web_url`); + - legacy `/results?event_id=&eventclass_id=` gives one row per driver (user_id, name, number, club, product/brands, ranking, points, tq); + - legacy `/timing/users?transponders=` gives the member, model and brand per transponder (up to 200 numbers); + - there is no endpoint for an event's entries per class with transponders, and none for the event's classes. + +Agreed with Conny (House of RC), 2026-11-07: +- **Split of roles:** House of RC holds entries, drivers and **final results** of an event, never every heat. Heats are the timing system's job. +- **Flow:** before the race, RaceCore fetches the entries and drivers (GET). After the race, RaceCore **POSTs** the results. +- **Result format:** send back the same structure as the entries came in, with the results added: driver ID, class and result. Extra heat data can be sent along too; House of RC stores it, as it already does from MyRCM and LiveRC. +- If entries change on the House of RC side (late entry, withdrawal), RaceCore fetches them again. Results go only one way: RaceCore → House of RC. + +Still open with Conny: +- [ ] Test the key with `GET /v1/me`. +- [ ] Which endpoint gives an event's entries per class (with House of RC driver ID, class/eventclass ID, driver number and transponder)? +- [ ] The URL and JSON body for posting results, with an example of a qualifying-plus-finals result (TQ, A/B/C finals). Can a result be posted again, overwriting the previous one, after a correction? +- [ ] A test event to post against. ### Phase 0 - agreement with House of RC (blocking) - [ ] Contact House of RC. Ask for: