Skip to content

Commit

Permalink
Remove overdrive
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasWanke committed May 23, 2024
1 parent a8b0312 commit 1c76fb0
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 57 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/generate-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ jobs:
run: python -m pip install -U md2html-phuker

- name: Generate HTML documentation
run: |
md2html docs/s4-api-docs.md
md2html docs/s4-api-docs-od.md
run: md2html docs/s4-api-docs.md

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
46 changes: 0 additions & 46 deletions docs/s4-api-docs-od.md

This file was deleted.

31 changes: 29 additions & 2 deletions docs/s4-api-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is the API documentation for the AEC 2024 Skill 08 Session 4 API.

## Events

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

### Subscribe to an Event

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

Example Response
Example Responses

```json
{
Expand All @@ -25,3 +25,30 @@ Example Response
}
}
```

```json
{
"action": {
"type": "vote",
"question": "Which protocol is used to transfer web pages over the internet?",
"answerA": "HTTP",
"answerB": "FTP"
}
}
```

### Answer a Poll

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.

```
POST /events/:id/vote
```

Request Body

```
{
answer: "a" | "b"
}
```
4 changes: 2 additions & 2 deletions jury/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ <h1>Jury Tool</h1>
const events = [
'aeg-beneficiary-concert',
'pop-concert',
'AEC-OC',
'AEC-CC',
'aec-oc',
'aec-cc',
];

// Create html elements for each event
Expand Down
8 changes: 4 additions & 4 deletions src/events/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ export const actions = ['flashlight', 'vote'];
export const events = [
{
name: 'aeg-beneficiary-concert',
availableActions: ['flashlight'],
availableActions: ['flashlight', 'vote'],
},
{
name: 'pop-concert',
availableActions: ['flashlight'],
availableActions: ['flashlight', 'vote'],
},
{
name: 'AEC-OC',
name: 'aec-oc',
availableActions: ['flashlight', 'vote'],
},
{
name: 'AEC-CC',
name: 'aec-cc',
availableActions: ['flashlight', 'vote'],
},
];
Expand Down

0 comments on commit 1c76fb0

Please sign in to comment.