diff --git a/apirest_yt/assets/estilo.css b/apirest_yt/assets/estilo.css new file mode 100644 index 0000000..4d2228a --- /dev/null +++ b/apirest_yt/assets/estilo.css @@ -0,0 +1,63 @@ +body{ + color:black; + } + + + + .container { + margin: 10px; + border: 1px solid #D0D0D0; + box-shadow: 0 0 8px #D0D0D0; + } + h1{ + color: #444; + background-color: transparent; + border-bottom: 1px solid #D0D0D0; + font-size: 24px; + font-weight: normal; + margin: 0 0 14px 0; + padding: 14px 15px 10px 15px; + } + + h2 { + display: block; + font-size: 1.5em; + -webkit-margin-before: 0.83em; + -webkit-margin-after: 0.83em; + -webkit-margin-start: 0px; + -webkit-margin-end: 0px; + font-weight: bold; + } + + p { + display: block; + -webkit-margin-before: 1em; + -webkit-margin-after: 1em; + -webkit-margin-start: 0px; + -webkit-margin-end: 0px; + } + + + .divbody{ + margin: 0 15px 0 15px; + } + + p.divfooter { + text-align: right; + font-size: 16px; + border-top: 1px solid #D0D0D0; + line-height: 32px; + padding: 0 10px 0 10px; + margin: 20px 0 0 0; + } + + code { + font-family: Consolas, Monaco, Courier New, Courier, monospace; + font-size: 16px; + background-color: #f9f9f9; + border: 1px solid #D0D0D0; + color: #002166; + display: block; + margin: 14px 0 14px 0; + padding: 12px 10px 12px 10px; + } \ No newline at end of file diff --git a/apirest_yt/clases/pacientes.class.php b/apirest_yt/clases/pacientes.class.php index 37bc4f7..998feb2 100644 --- a/apirest_yt/clases/pacientes.class.php +++ b/apirest_yt/clases/pacientes.class.php @@ -3,7 +3,6 @@ require_once 'conexion/conexion.php'; require_once 'clases/respuestas.class.php'; class pacientes extends conexion{ - private $table = "pacientes"; private $pacienteid = ""; private $dni = ""; @@ -74,7 +73,6 @@ class pacientes extends conexion{ return $_respuestas->error_401("Token inválido o caducado"); } } - } private function insertarPaciente(){ diff --git a/apirest_yt/index.php b/apirest_yt/index.php index e7d88d7..c38bc9f 100644 --- a/apirest_yt/index.php +++ b/apirest_yt/index.php @@ -1,20 +1,83 @@ + + +
+ + +'; print_r($conector->obtenerDatos($query)); echo ''; - -// Prueba insert -#$query = "INSERT INTO pacientes (DNI)value('0')"; -#echo '
'; print_r($conector->nonQuery($query)); echo ''; -#$query = "INSERT INTO pacientes (DNI)value('1')"; -#echo '
'; print_r($conector->nonQueryId($query)); echo ''; +// # Prueba Select +// $query = "SELECT * FROM pacientes"; +// echo '
'; print_r($conector->obtenerDatos($query)); echo ''; +// # Prueba insert +// $query = "INSERT INTO pacientes (DNI)value('0')"; +// echo '
'; print_r($conector->nonQuery($query)); echo ''; +// $query = "INSERT INTO pacientes (DNI)value('1')"; +// echo '
'; print_r($conector->nonQueryId($query)); echo ''; ?> + + +
+ POST /auth
+ {
+ "usuario" :"", -> REQUERIDO
+ "password": "" -> REQUERIDO
+ }
+
+
+ GET /pacientes?page=$numeroPagina
+ GET /pacientes?id=$idPaciente
+
+
+ POST /pacientes
+ {
+ "nombre" : "", -> REQUERIDO
+ "dni" : "", -> REQUERIDO
+ "correo":"", -> REQUERIDO
+ "codigoPostal" :"",
+ "genero" : "",
+ "telefono" : "",
+ "fechaNacimiento" : "",
+ "token" : "" -> REQUERIDO
+ }
+
+
+ PUT /pacientes
+ {
+ "nombre" : "",
+ "dni" : "",
+ "correo":"",
+ "codigoPostal" :"",
+ "genero" : "",
+ "telefono" : "",
+ "fechaNacimiento" : "",
+ "token" : "" , -> REQUERIDO
+ "pacienteId" : "" -> REQUERIDO
+ }
+
+
+ DELETE /pacientes
+ {
+ "token" : "", -> REQUERIDO
+ "pacienteId" : "" -> REQUERIDO
+ }
+
+