Skip to content

Commit 1c76fb0

Browse files
committed
Remove overdrive
1 parent a8b0312 commit 1c76fb0

File tree

5 files changed

+36
-57
lines changed

5 files changed

+36
-57
lines changed

.github/workflows/generate-docs.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ jobs:
2121
run: python -m pip install -U md2html-phuker
2222

2323
- name: Generate HTML documentation
24-
run: |
25-
md2html docs/s4-api-docs.md
26-
md2html docs/s4-api-docs-od.md
24+
run: md2html docs/s4-api-docs.md
2725

2826
- name: Upload artifact
2927
uses: actions/upload-artifact@v4

docs/s4-api-docs-od.md

-46
This file was deleted.

docs/s4-api-docs.md

+29-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is the API documentation for the AEC 2024 Skill 08 Session 4 API.
44

55
## Events
66

7-
The API provides an endpoint to subscribe to the actions of an event.
7+
The API provides endpoints to subscribe to the actions of an event and to send an answer to a voting poll.
88

99
### Subscribe to an Event
1010

@@ -16,7 +16,7 @@ For the initial request, it is possible to pass the query parameter `wait=false`
1616
GET /events/:id/subscribe
1717
```
1818

19-
Example Response
19+
Example Responses
2020

2121
```json
2222
{
@@ -25,3 +25,30 @@ Example Response
2525
}
2626
}
2727
```
28+
29+
```json
30+
{
31+
"action": {
32+
"type": "vote",
33+
"question": "Which protocol is used to transfer web pages over the internet?",
34+
"answerA": "HTTP",
35+
"answerB": "FTP"
36+
}
37+
}
38+
```
39+
40+
### Answer a Poll
41+
42+
This endpoint allows clients to answer a poll. The client should make a POST request to this endpoint with the answer in the request body.
43+
44+
```
45+
POST /events/:id/vote
46+
```
47+
48+
Request Body
49+
50+
```
51+
{
52+
answer: "a" | "b"
53+
}
54+
```

jury/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ <h1>Jury Tool</h1>
4848
const events = [
4949
'aeg-beneficiary-concert',
5050
'pop-concert',
51-
'AEC-OC',
52-
'AEC-CC',
51+
'aec-oc',
52+
'aec-cc',
5353
];
5454

5555
// Create html elements for each event

src/events/constants.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ export const actions = ['flashlight', 'vote'];
33
export const events = [
44
{
55
name: 'aeg-beneficiary-concert',
6-
availableActions: ['flashlight'],
6+
availableActions: ['flashlight', 'vote'],
77
},
88
{
99
name: 'pop-concert',
10-
availableActions: ['flashlight'],
10+
availableActions: ['flashlight', 'vote'],
1111
},
1212
{
13-
name: 'AEC-OC',
13+
name: 'aec-oc',
1414
availableActions: ['flashlight', 'vote'],
1515
},
1616
{
17-
name: 'AEC-CC',
17+
name: 'aec-cc',
1818
availableActions: ['flashlight', 'vote'],
1919
},
2020
];

0 commit comments

Comments
 (0)