-
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
1 parent
535ee63
commit 2d0c0e2
Showing
2 changed files
with
29 additions
and
3 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 |
---|---|---|
@@ -1,3 +1,29 @@ | ||
# Session 4 API Documentation | ||
|
||
This is the API documentation for the AEC 2024 Skill 08 Session 4 API. | ||
|
||
## Events | ||
|
||
The API provides an endpoint to subscribe to events. | ||
|
||
### Subscribe to an Event | ||
|
||
This endpoint uses HTTP Long Polling, meaning the connection will remain open until an event is available. Clients should make a request to this endpoint and wait for a response. Once a response is received, the client should immediately make another request to continue receiving events. | ||
|
||
!!! note | ||
|
||
For the initial request, it is possible to pass the query parameter `wait=false` to get the current event immediately. | ||
|
||
``` | ||
GET /events/:id/subscribe | ||
``` | ||
|
||
Example Response | ||
|
||
```json | ||
{ | ||
"action": { | ||
"type": "flashlight" | ||
} | ||
} | ||
``` |
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