From bbd2cdd3b898ade175a1462f12d3f4fec9096be1 Mon Sep 17 00:00:00 2001 From: ROSPARS Benoit <benoit.rospars@inria.fr> Date: Fri, 29 Jan 2021 10:32:09 +0100 Subject: [PATCH] Add figures --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a40214..fe2166c 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,18 @@ To manually update (using javascript console): ```js const baseUrl = "https://github.com/INRIA/scikit-learn-mooc/raw/master/"; const apiUrl = "https://api.github.com/repos/INRIA/scikit-learn-mooc/contents"; -let datasets, notebooks, wrapups; +let datasets, notebooks, wrapups, figures; fetch(`${apiUrl}/datasets`) .then(function(response_datasets) { return response_datasets.json() }).then(function(data_datasets) { datasets = data_datasets.map(item => item.path) + return fetch(`${apiUrl}/figures`) +}).then(function(response_figures) { + return response_figures.json() +}).then(function(data_figures) { + figures = data_figures.map(item => item.path) return fetch(`${apiUrl}/notebooks`) }).then(function(response_notebooks) { return response_notebooks.json() -- GitLab