-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# API adapter | ||
|
||
The adapter is a small shim that sits between applications and the [official schedule API](https://developer.emfcamp.org/schedule). | ||
|
||
It adds a few nice features on top of the official API: | ||
|
||
- RFC 3339 timestamps (not some RFC 3339-like but actually not nonsense) | ||
- Filtering by multiple venues | ||
- Filtering by timestamps | ||
- A now and next API that is not dependant on being part way through the event to develop for | ||
- Listing venues | ||
|
||
## Examples | ||
|
||
It is likely useful to stuff the output of these into your JSON visualiser of choice (e.g. pipe to `| jq | less`). | ||
|
||
- List the entire schedule: `curl "localhost:8000/schedule"` | ||
- List events for a specific venue: `curl "localhost:8000/schedule?venue=Stage+A"` | ||
- List events for a set of venues: `curl "localhost:8000/schedule?venue=Stage+A&venue=Stage+B"` | ||
- List events starting after a certain time (i.e. events that are in progress and in the future as of the given time): `curl "localhost:8000/schedule?starting_after=2022-06-05T12:00:00%2b01:00"` | ||
- List events ending after a certain time (i.e. events that are in the future/yet to start as of the given time): `curl "localhost:8000/schedule?ending_after=2022-06-05T12:00:00%2b01:00"` | ||
- List the entire schedule, using a fake start time for the first event and offsetting the rest of the schedule accordingly (useful for development): `curl "localhost:8000/schedule?fake_epoch=2024-04-01T17:00:00%2b01:00"` | ||
- Now and next, for all venues, at the time of the request: `curl "localhost:8000/now-and-next"` | ||
- Now and next, for "Stage A" and "Blacksmiths" venues, for a specific point in time, with a fake epoch: `curl "localrost:8000/now-and-next?fake_epoch=2024-04-01T17:00:00%2b01:00&now=2024-04-02T17:15:00%2b01:00&venue=Stage+A&venue=Blacksmiths"` | ||
- List all venues: `curl "localhost:8000/venues"` |
This file contains 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