diff --git a/Formation Web.postman_collection.json b/Formation Web.postman_collection.json new file mode 100644 index 0000000000000000000000000000000000000000..e80b229c865c04a8b69d8d03e1787ac0d269bf40 --- /dev/null +++ b/Formation Web.postman_collection.json @@ -0,0 +1,396 @@ +{ + "info": { + "_postman_id": "84d1dfa1-6839-43bd-9cdd-b4e5278e1b36", + "name": "Formation Web", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "24294458" + }, + "item": [ + { + "name": "Découverte de HTTP", + "item": [ + { + "name": "Site \"statique\" clubelek", + "item": [ + { + "name": "Acceuil", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://clubelek.fr", + "protocol": "https", + "host": [ + "clubelek", + "fr" + ] + } + }, + "response": [] + }, + { + "name": "Acceuil bis", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://clubelek.fr/index.html", + "protocol": "https", + "host": [ + "clubelek", + "fr" + ], + "path": [ + "index.html" + ] + } + }, + "response": [] + }, + { + "name": "Sponsors", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://clubelek.fr/sponsors/", + "protocol": "https", + "host": [ + "clubelek", + "fr" + ], + "path": [ + "sponsors", + "" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "1ère API : Velo'v", + "item": [ + { + "name": "Récupérer les contrats", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://api.jcdecaux.com/vls/v3/contracts", + "protocol": "https", + "host": [ + "api", + "jcdecaux", + "com" + ], + "path": [ + "vls", + "v3", + "contracts" + ] + } + }, + "response": [] + }, + { + "name": "Récupérer les stations", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://api.jcdecaux.com/vls/v1/stations?contract=lyon", + "protocol": "https", + "host": [ + "api", + "jcdecaux", + "com" + ], + "path": [ + "vls", + "v1", + "stations" + ], + "query": [ + { + "key": "contract", + "value": "lyon" + } + ] + } + }, + "response": [] + }, + { + "name": "Récupérer les détails de INSA Einstein", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://api.jcdecaux.com/vls/v3/stations/10002?contract=lyon", + "protocol": "https", + "host": [ + "api", + "jcdecaux", + "com" + ], + "path": [ + "vls", + "v3", + "stations", + "10002" + ], + "query": [ + { + "key": "contract", + "value": "lyon" + } + ] + } + }, + "response": [] + } + ], + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "in", + "value": "query", + "type": "string" + }, + { + "key": "value", + "value": "379e2a646e8f0bc2331b8d853efd016c4cfd4f8b", + "type": "string" + }, + { + "key": "key", + "value": "apiKey", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Intranet Clubelek", + "item": [ + { + "name": "Un site....", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://intranet.clubelek.fr", + "protocol": "https", + "host": [ + "intranet", + "clubelek", + "fr" + ] + } + }, + "response": [] + }, + { + "name": "...dynamique avec framework frontend", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://intranet.clubelek.fr/js/app.cce50a22.js", + "protocol": "https", + "host": [ + "intranet", + "clubelek", + "fr" + ], + "path": [ + "js", + "app.cce50a22.js" + ] + } + }, + "response": [] + }, + { + "name": "ET... une API", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer undefined", + "type": "default" + } + ], + "url": { + "raw": "https://intranet.clubelek.fr/api/calendar/get-events", + "protocol": "https", + "host": [ + "intranet", + "clubelek", + "fr" + ], + "path": [ + "api", + "calendar", + "get-events" + ] + } + }, + "response": [] + }, + { + "name": "Mais pas accessible à tous !", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer undefined", + "type": "default" + } + ], + "url": { + "raw": "https://intranet.clubelek.fr/api/finances/budget-data/2022-2023", + "protocol": "https", + "host": [ + "intranet", + "clubelek", + "fr" + ], + "path": [ + "api", + "finances", + "budget-data", + "2022-2023" + ] + } + }, + "response": [] + }, + { + "name": "Faisons un emprunt...", + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer undefined", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"borrower\": {\r\n \"name\": \"Antoine Rochebois\",\r\n \"email\": \"antoine.rochebois@insa-lyon.fr\",\r\n \"phone\": \"010203040506\"\r\n },\r\n \"allowerName\": \"antoine.rochebois\",\r\n \"endDatetime\": \"2022-11-08T15:00:00.000Z\",\r\n \"items\": [\r\n \"61cca8aad5acc4cd001e9105\"\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://intranet.clubelek.fr/api/borrowing/borrow", + "protocol": "https", + "host": [ + "intranet", + "clubelek", + "fr" + ], + "path": [ + "api", + "borrowing", + "borrow" + ] + } + }, + "response": [] + }, + { + "name": "... et rendons le.", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer undefined", + "type": "default" + } + ], + "url": { + "raw": "https://intranet.clubelek.fr/api/borrowing/return?returnCode=275479", + "protocol": "https", + "host": [ + "intranet", + "clubelek", + "fr" + ], + "path": [ + "api", + "borrowing", + "return" + ], + "query": [ + { + "key": "returnCode", + "value": "275479" + } + ] + } + }, + "response": [] + } + ] + } + ] + }, + { + "name": "Découverte de WebSocket", + "item": [ + { + "name": "Ding dong !", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://intranet.clubelek.fr/api/doorbell", + "protocol": "https", + "host": [ + "intranet", + "clubelek", + "fr" + ], + "path": [ + "api", + "doorbell" + ] + } + }, + "response": [] + } + ] + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 774bfee3d0088b94958c3cffef1be59a39362c05..7e5e3fbd3fcf1cba1c9365f1ca7e598fb4f29c13 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,39 @@ # Formation Web -Introduction au Web destinée aux membres du Clubelek \ No newline at end of file +Introduction au Web destinée aux membres du Clubelek + +## Premier atelier - Découverte du Web, des API et des protocoles HTTP et WebSocket + +### Introduction au Web + +Cf les slides et la présentation. + +### Le protocole HTTP, les API et le JSON + +Premier TP, pour les explications ça se passe sur les slides et à l'oral :) + +- Cloner ce repo : ```git clone https://gitlab.clubelek.fr/formations/formation-web``` +- [https://www.postman.com/downloads/](Télécharger Postman) +- Importer le fichier "Formation Web.postman_collection.json" dans Postman +- Amusons nous avec HTTP via Postman +- Découvrons le devtool de Google Chrome/Firefox + +### Le protocoles WebSocket : faisons sonner la sonette du Club + +Second TP, pour les explications ça se passe sur les slides et à l'oral :) + +- Aller sur : https://websocketking.com/ +- Rentrer wss://intranet.clubelek.fr/api/doorbell/ws comme adresse et s'y connecter +- Via Postman, faire la requête HTTP pour faire sonner la sonnette et regarder ce qu'il se passe + +## Second atelier - Notre premier serveur HTTP en Python + +Soon + +## Troisième atelier - Un "Arduino" qui fait du Web ? o: Bienvenue sur l'ESP8266/ESP32 + +Soon + +## Quatrième atelier - Faisons un site en Vue.js + +Soon \ No newline at end of file