descriptionELECTRONIC VOTE REST API (school project)
owneras2023.mta5x@slmail.me
last changeWed, 27 Sep 2023 16:50:03 +0000 (27 13:50 -0300)
content tags
add:
README.md

VOTAR REST API

POST   /candidates {"name":string} -> {"id":number,"name":string}
DELETE /candidates/id
GET    /candidates -> [{"id":number,"name":string}]
DELETE /candidates
POST   /vote {"id":number}
GET    /report -> [{"id":number,"name":string,"votes":number}]

SQLite

Primero hay que instalar sqlite.

En mi caso (termux), el comando para instalar SQLite es:

$ pkg install sqlite

Controlar que SQLite esté habilitado en PHP.

$ php -i | grep -i 'sqlite' | grep -i 'ena'
PDO Driver for SQLite 3.x => enabled
SQLite3 support => enabled

Crear la base de datos con el siguiente comando:

$ sqlite3 database.sqlite < votar.sql

En la siguiente página se puede aprender un poco más sobre SQLite: SQLite PHP.


Grupos

shortlog
2023-09-27 Andreaerror de ramamaster
2023-09-27 Andreacodigo diagramas
2023-09-24 Juan ManuelUpdate "README" file (groups section)
2023-09-21 Juan ManuelCreate `.gitignore` file
2023-09-21 Juan ManuelUpdate README file
2023-09-21 Juan ManuelSQL script file for "votar" database
2023-09-21 Juan ManuelMain logic for the REST API server
2023-09-21 Juan ManuelTests battery for candidates REST API
2023-09-20 Juan ManuelTest the report of votes
2023-09-20 Juan ManuelTest to vote a candidate
2023-09-20 Juan ManuelTest to delete all candidates
2023-09-20 Juan ManuelTest to delete a candidate
2023-09-20 Juan ManuelTest to get the list of candidates
2023-09-20 Juan ManuelTest to create a candidate
2023-09-20 Juan ManuelRemove old `echo` line
2023-09-20 Juan ManuelLinks to REST API testing frameworks
...
heads
6 months ago grupo4
6 months ago grupo1
6 months ago grupo3
6 months ago grupo5
6 months ago grupo6
6 months ago grupo2
6 months ago grupo_1
6 months ago grupo5ac
6 months ago master
7 months ago juan_00_diagramas
7 months ago juan_06_get_report
7 months ago juan_05_post_vote
7 months ago juan_04_delete_candidates
7 months ago juan_03_get_candidates
7 months ago juan_01_post_candidates
7 months ago juan_02_delete_candidates_id