From f5b9fb28de891a85ac8b51978c839a9f2db3e8ce Mon Sep 17 00:00:00 2001 From: William Noris Date: Tue, 19 Oct 2021 09:47:51 +0200 Subject: [PATCH] planet start --- .parcel-cache/lock.mdb | Bin 8192 -> 8192 bytes package.json | 2 +- planets.html | 4 ++++ scripts/planets.js | 21 +++++++++++++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.parcel-cache/lock.mdb b/.parcel-cache/lock.mdb index 7c4279a1494ac2814b86eab7d80d766edb5b9d68..3f69fc945ef62d3bb31ceac0839988c3f4c1b9e7 100644 GIT binary patch delta 60 zcmZp0XmH@Xci{a#rUZSRmWiD8e0)3%V9>x`w(ofT#6Ycy4IFSmhVP17kJoQ}C@()T Gfg1osFA{_R delta 60 zcmZp0XmH@Xci{a#rUZQ*&54}#d@Ge1z`%js&ef!TVxZQ<1`dSaw*Q(Y^&20`%TG+; F1^_P95yt=k diff --git a/package.json b/package.json index a11e926..28b0061 100644 --- a/package.json +++ b/package.json @@ -482,7 +482,7 @@ }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "start": "parcel planets.html" + "start": "parcel index.html" }, "repository": { "type": "git", diff --git a/planets.html b/planets.html index ebc7226..361cc20 100644 --- a/planets.html +++ b/planets.html @@ -20,6 +20,10 @@ +
+ +
+
diff --git a/scripts/planets.js b/scripts/planets.js index 8aefb1d..782d109 100644 --- a/scripts/planets.js +++ b/scripts/planets.js @@ -1,7 +1,28 @@ import { api_call } from "./util"; +const planetes = document.getElementById("resultats"); + console.log('planet.js loaded'); api_call("planets", console.log); +function remplissage(prout){ + console.log(prout.results[0]); + + api_call("films/1", (response) => { + console.log(response); + }); + + planetes.innerHTML = + `
+

+
+
Prout 1
+
Prout 2
+
Prout 3
+
+
`; +} + +api_call("planets", remplissage); \ No newline at end of file