PHP Classes

File: img/restsimples.txt

Recommend this page to a friend!
  Classes of Rodrigo Faustino   Back FaceX   img/restsimples.txt   Download  
File: img/restsimples.txt
Role: Documentation
Content type: text/plain
Description: Documentation
Class: Back FaceX
Recognize students using their face pictures
Author: By
Last change: Update of img/restsimples.txt
Date: 5 months ago
Size: 1,835 bytes
 

Contents

Class file image Download
@startuml actor Cliente entity "API REST" as API database "Banco de Dados" as BD note over Cliente, API POST /usuarios espera receber um JSON com: { "acao": "cadastrar", "nome": "Nome do Usuário", "registro": "Registro", "rosto": ["dados", "do", "rosto"] } end note Cliente -> API : POST /usuarios API -> BD : INSERT INTO users BD -> API : SUCCESS (201 Created) API -> Cliente : 201 Created (JSON Response) note over Cliente, API GET /usuarios pode receber um parâmetro de query: ?relatorio=1 para gerar um relatório de usuários end note Cliente -> API : GET /usuarios API -> BD : SELECT * FROM users BD -> API : RETURN users API -> Cliente : 200 OK (JSON de usuários) note over Cliente, API DELETE /usuarios/{id} não espera dados no corpo da requisição. end note Cliente -> API : DELETE /usuarios/{id} API -> BD : DELETE FROM users WHERE id={id} BD -> API : SUCCESS (200 OK) API -> Cliente : 200 OK note over Cliente, API POST /presencas espera receber um JSON com: { "tipo": "E", "id_usuario": "ID do Usuário" } end note Cliente -> API : POST /presencas API -> BD : INSERT INTO presencas BD -> API : SUCCESS (201 Created) API -> Cliente : 201 Created (JSON Response) note over Cliente, API GET /presencas pode receber parâmetros de query para filtro: ?registro=Registro&data=Data end note Cliente -> API : GET /presencas API -> BD : SELECT * FROM presencas WHERE ... BD -> API : RETURN presencas API -> Cliente : 200 OK (JSON de presenças) note over Cliente, API PUT /presencas espera receber um JSON com: { "id": "ID da Presença", "novaDataHora": "Nova Data e Hora" } end note Cliente -> API : PUT /presencas/{id} API -> BD : UPDATE presencas SET data_hora={novaDataHora} WHERE id={id} BD -> API : SUCCESS (200 OK) API -> Cliente : 200 OK @enduml