Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chingu-voyages/v24-bears-team-04-be

Voting Web App | Voyage-24 | https://chingu.io/
https://github.com/chingu-voyages/v24-bears-team-04-be

election-administration hacktoberfest voting-application

Last synced: about 2 months ago
JSON representation

Voting Web App | Voyage-24 | https://chingu.io/

Awesome Lists containing this project

README

        

# My Choice API

Heroku App: https://mychoicebe.herokuapp.com/

API Documentation: https://mychoicebe.herokuapp.com/swagger-ui/

## VOTE AND RESULTS
Endpoint: `/vote/`

### GET

**FORMAT**
```
{
"id": ,
"position_set": [
{
"id": ,
"candidate_set": [
...
{
"id": ,
"first_name": "",
"last_name": "",
"picture_self": null,
"party": "",
"gender": "",
"ethnicity": "",
"votes": 0,
"positions": [
...
,
...
]
}
...
],
"name": "",
"locality": "",
"seats": 1,
"election":
}
],
"title": "",
"start_time": "2020-11-01T00:00:00Z",
"end_time": "2020-11-04T00:00:00Z"
}
```

**EXAMPLE**
```
{
"id": 3,
"position_set": [
{
"id": 1,
"candidate_set": [
{
"id": 2,
"first_name": "Donald",
"last_name": "Trump",
"picture_self": null,
"party": "Other",
"gender": "Male",
"ethnicity": "",
"votes": 2,
"positions": [
1,
4
]
},
{
"id": 1,
"first_name": "Joe",
"last_name": "Biden",
"picture_self": null,
"party": "Other",
"gender": "Male",
"ethnicity": "",
"votes": 5,
"positions": [
1,
5
]
}
],
"name": "President",
"locality": "USA",
"seats": 1,
"election": 3
},
{
"id": 2,
"candidate_set": [
{
"id": 3,
"first_name": "Kamala",
"last_name": "Harris",
"picture_self": null,
"party": "Other",
"gender": "Female",
"ethnicity": "",
"votes": 4,
"positions": [
2
]
},
{
"id": 4,
"first_name": "Mike",
"last_name": "Pence",
"picture_self": null,
"party": "Other",
"gender": "Male",
"ethnicity": "",
"votes": 1,
"positions": [
2
]
}
],
"name": "Vice President",
"locality": "USA",
"seats": 1,
"election": 3
},
{
"id": 3,
"candidate_set": [],
"name": "Region 1 Senator",
"locality": "R1",
"seats": 2,
"election": 3
}
],
"title": "2020 General Election",
"start_time": "2020-11-01T00:00:00Z",
"end_time": "2020-11-04T00:00:00Z"
}
```

### POST

**FORMAT**
```
{
...
"": "",
...
}
```
**EXAMPLE**
```
{
...
"1": "2",
...
}
```