Open internot169 opened 2 years ago
Akash stopped by to talk about this. The schedules endpoint now returns events as well as the schedule for the day. https://four11.eastsideprep.org/epsnet/schedule_for_date?date=2022-09-29
Note that athletic events shift around so it would be worth re-caching daily. I'm also open to building a separate API endpoint if that is preferred.
{ "date": "2022-09-29", "schedule_day": "H-E", "color": "F58025", "activity_day": "Thursday Activities", "term_id": 1, "cohort": "", "periods": [ { "times": "07:30-08:15", "period": "O" },... ], "events": [ { "team_name": null, "opponent_name": "Lake Washington Girls School", "location_name": "Robinswood Park - West", "formatted_title": "vs. Lake Washington Girls School", "start_time": "2022-09-29T15:45:00.000-07:00" }, { "team_name": null, "opponent_name": "Overlake School", "location_name": "Redmond Ridge Park", "formatted_title": "D1 game at Overlake School", "start_time": "2022-09-29T15:45:00.000-07:00" },... ] }
Interesting. There are a lot of events though - 8 in the example above - so we'd want to think about how to display all that information.
Update, due to the delays in calling this API and where it is used elsewhere, events will only be included if the following param is set in the URL include_events=1
so https://four11.eastsideprep.org/epsnet/schedule_for_date?include_events=1&date=
Event info is cached but on first hit, it can take a few seconds to get results.
Interesting. There are a lot of events though - 8 in the example above - so we'd want to think about how to display all that information.
The range seems to be 0 - 10 on events, perhaps we could have a day with every team playing which would get up to 20 but that's unlikely.
@JonBriggs does this still work? Tried https://four11.eastsideprep.org/epsnet/schedule_for_date?date=2023-02-08&include_events=1 without luck.
Seems to work on my end. We could implement this with a box similar to that of the "Latest Github Issues" box.
We could also add a button at the top of the schedule (in the top bar somewhere). Related to #594
Sports games are now on four11, so EPSchedule can now get that data and display it.
Submitted via Form