API for Time Calculations
This site provides an API for anyone interested. It's easy to use.
Usage
Endpoint: https://rusa.jkassen.org/time/rusa-time-api.php
The above URL can be sent the following parameters via GET or POST. The data returned is JSON.
All parameters are optional. If sent without an event_distance, only the intermediate control times (if using) will be useful.
event_distance
- This is the event distance. Assumes miles, add a "k" if using kilometers.
route_distance
- The route distance. This only appears as the distanced listed for the finish control. The times for the finish control are based on the event distance.
gravel_distance
- Self explanatory. Assumes miles, add a "k" if using kilometers.
start_date
- If unset assumes next Saturday. Supports any date format that PHP's strtotime() function supports.
start_time
- If unset assumes 07:00. Supports any time format that PHP's strtotime() function supports.
- JSON Array of
controls
with the keys DISTANCE
and NAME
. DISTANCE is required, assumes miles, add "k" for metric.
Examples using GET
A 200k starting next Saturday @ 7am: Link
A 375 Mile event starting July 4th 2027 @ 8:52pm with 325k of Gravel and 4 controls: Link
Bugs? Questions?
Please contact me at me@jkassen.org!