API Range
This commit is contained in:
78
README.md
78
README.md
@@ -115,14 +115,13 @@ Afficher sur l'**écran d'accueil** une liste récapitulative des plantes identi
|
||||
|
||||
Groupe | Dépôt
|
||||
--- |---
|
||||
PHILIPPON-CHAMPROUX Florentin ; RATTI Martin |https://github.com/flo0s/Cocagne-Mobile-APPs
|
||||
MATEJKA Milan ; MAURICE Simon |
|
||||
PHILIPPON-CHAMPROUX Florentin ; RATTI Martin |https://github.com/flo0s/Cocagne-Mobile-APP
|
||||
MATEJKA Milan ; MAURICE Simon | https://github.com/VoidOma/SAE6_MATEJKA_MAURICE
|
||||
ALVARIZA BILLAR Felipe ; KANY Thomas | https://github.com/tureisss/SAE6---Evolution-d-une-application-existante
|
||||
DUBREUIL Eliot ; ERRAES Mehdi ; MEHIAOUI Mohamed | https://gitlab.univ-lorraine.fr/erraes5u/sae6
|
||||
MERIMI Ayat | https://github.com/merimia/SAE6_MERIMI
|
||||
HERRY Elwyn ; HERRY Matteo |
|
||||
GAILLIEGUE Ewan | https://github.com/EwanGailliegue/SAE6-mobile-app
|
||||
VINCENT Teo |
|
||||
GAILLIEGUE Ewan ; VINCENT Teo | https://github.com/EwanGailliegue/SAE6-mobile-app
|
||||
MEHRAZ Chayimaa ; RIFI ZAYNAB | https://github.com/Zineb-rf/jardins-cocagne-MEHRAZ-RIFI-sae6
|
||||
ALGUL Sefer ; GRANDGIRARD Louis | https://gitlab.univ-lorraine.fr/algul12u/sae-6
|
||||
COGNET Mattheo ; BECERRA BARBA Erik | https://github.com/MattheoCo/ApplicationJardinCocagne
|
||||
@@ -133,7 +132,7 @@ Groupe | Dépôt
|
||||
--- |---
|
||||
COLIN Gabin ; DE RYCKE Leanne | https://gitlab.univ-lorraine.fr/derycke4u/sae6-colin-derycke
|
||||
DESERT Romain ; NIRRENGARTEN Tom | https://github.com/Rom444d/SAE-6
|
||||
GIL Jérémie ; PETRAZOLLER Johan |
|
||||
GIL Jérémie ; PETRAZOLLER Johan | https://github.com/LeviLout/Jardin_Cocagne_GIL_PETRAZOLLER
|
||||
NGUYEN Quang-Liem ; RALLI Clément | https://github.com/JustL0ading/NGUYEN-RALLI-SAE6
|
||||
DUFOUR Louise ; MARTIN Mathis |
|
||||
ROBAIL Alexandre |
|
||||
@@ -141,7 +140,7 @@ ROBAIL Alexandre |
|
||||
|
||||
## Web Service
|
||||
|
||||
Exemple de web service que vous pouvez (ou pas) utiliser.
|
||||
Pour les groupes dont le web service de la SAÉ 5 est non fonctionnel ou incomplet vous pouvez utilisez ce web service. L'inconvénient est qu'il est en lecture seul car partagé et ouvert au public.
|
||||
|
||||
Liste des distributions de la semaine 6.
|
||||
|
||||
@@ -155,25 +154,84 @@ Pour voir la documentation OpenAPI : https://rest.wiki/?https://api.neotech.fr#
|
||||
Dépôts
|
||||
|
||||
```
|
||||
GET api.neotech.fr/depot
|
||||
GET https://api.neotech.fr/depot
|
||||
```
|
||||
|
||||
|
||||
Préparation
|
||||
|
||||
```
|
||||
GET api.neotech.fr/preparation
|
||||
GET https://api.neotech.fr/preparation
|
||||
```
|
||||
|
||||
|
||||
Tournées
|
||||
|
||||
```
|
||||
GET api.neotech.fr/tournee
|
||||
GET https://api.neotech.fr/tournee
|
||||
```
|
||||
|
||||
Itineraires
|
||||
|
||||
```
|
||||
GET api.neotech.fr/itineraire
|
||||
GET https://api.neotech.fr/itineraire
|
||||
```
|
||||
|
||||
Cette API a été réalisé à l'aide de postgREST une solution qui permet d'exposer une base de données postgreSQL directement en API.
|
||||
|
||||
https://docs.postgrest.org/en/v14/index.html
|
||||
|
||||
### Pagination
|
||||
|
||||
```
|
||||
GET https://api.neotech.fr/planning HTTP/1.1
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Alt-Svc: h3=":443"; ma=2592000
|
||||
Content-Length: 5090
|
||||
Content-Location: /planning
|
||||
Content-Range: 0-99/*
|
||||
Content-Type: application/json; charset=utf-8
|
||||
Date: Tue, 17 Feb 2026 18:48:40 GMT
|
||||
Server: postgrest/14.3
|
||||
Via: 1.1 Caddy
|
||||
Connection: close
|
||||
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"calendrier_id": 1,
|
||||
"jour": "2024-01-09"
|
||||
},
|
||||
```
|
||||
|
||||
Seuls les 100 (0-99) premiers enregistrements sont renvoyés sur un total inconnu.
|
||||
|
||||
```
|
||||
GET https://api.neotech.fr/planning HTTP/1.1
|
||||
Prefer: count=estimated
|
||||
|
||||
...
|
||||
Content-Range: 0-99/600
|
||||
```
|
||||
|
||||
L'API renvoi le nombre total d'enregistrement (une estimation pour les nombres > 1000)
|
||||
|
||||
Cette fois ci vous avez le nombre total d'enregistrements en plus de plage 0-99
|
||||
|
||||
```
|
||||
GET https://api.neotech.fr/planning HTTP/1.1
|
||||
Prefer: count=estimated
|
||||
Range-Unit: items
|
||||
Range: 500-600
|
||||
|
||||
|
||||
Content-Range: 500-599/600
|
||||
|
||||
[
|
||||
{
|
||||
"id": 501,
|
||||
"calendrier_id": 3,
|
||||
"jour": "2026-01-08"
|
||||
},
|
||||
```
|
||||
Reference in New Issue
Block a user