/pollstation

PollStation is a technical challenge that have a REST API for make decisions by voting when the endpoint is called

Primary LanguageJava

Polling Station

This project is the solution to a technical challenge. Its purpose is to expose an REST API that will manage a voting session in an assembly and for this the creation of four endpoints was requested.

project-image

🛠️ Installation Steps:

É necessário que tenha o Docker e docker-compose instalado na sua máquina;

  docker-compose up

💻 API Documentation

Create new issue

  POST /api/v1/issue
{
  "title": "string",
  "description": "string",
  "owner": "string"
}

Start a polling session

  POST /api/v1/session/{isueId}
Parâmetro Tipo Descrição
issueId Long Obrigatório. ID of the issue that the session will be opened

Vote in a polling session

  POST /api/v1/vote
{
  "sessionId": 0,
  "cpf": "string",
  "voteChoice": "YES"
}

Return the polling result of a session

  GET /api/v1/vote//{sessionId}
Parâmetro Tipo Descrição
sessionId Integer Obrigatório. ID of the session that you want the result