From c0f8d3a504b4771a779385d00ce58673e1bf6044 Mon Sep 17 00:00:00 2001 From: Hugo <hnouts.dev@gmail.com> Date: Wed, 3 Mar 2021 16:35:53 +0100 Subject: [PATCH] konnector local --- docs/ecolyo/functionalities/challenge.md | 14 ++++--- .../launch_local_application.md | 38 ------------------- .../getting_started/launch_local_konnector.md | 27 ++++++++++++- .../getting_started/setup_your_environment.md | 37 +++++++++++++++++- docs/ecolyo/project_architecture/doctypes.md | 2 - docs/proxy/description.md | 6 --- docs/proxy/use_cases/enedis.md | 5 ++- 7 files changed, 73 insertions(+), 56 deletions(-) diff --git a/docs/ecolyo/functionalities/challenge.md b/docs/ecolyo/functionalities/challenge.md index 9eef66e..d139103 100644 --- a/docs/ecolyo/functionalities/challenge.md +++ b/docs/ecolyo/functionalities/challenge.md @@ -8,16 +8,20 @@ A quiz includes 4 basic questions and one custom question. All basics Questions are created in the quizEntity.json. We have to add : -- questionLabel => Label of the question -- Answers => An array of three answers (answerLabel, isTrue) -- description => Explain the question -- source => Source of the explanation +| Field | Description | +| ------- | --------- | +| questionLabel | Label of the question | +| answers | Array of 3 answers (answerLabel, isTrue) | +| description | Explains the question | +| source | Source of the explanation | This questions and answers are in random order. In the question page the user have to select an answer and click validate. + Then, he sees the right answer and a modal with the explanation and the source. After this modal, he goes to the next question. -Depends on the answer, the question result state is set either correct or incorrect. + +Depending on the answer, the question result state is set either to correct or incorrect. If it is a right answer, the quiz result is incremented by one. ### Custom Question diff --git a/docs/ecolyo/getting_started/launch_local_application.md b/docs/ecolyo/getting_started/launch_local_application.md index 76fe6f6..31e0edd 100644 --- a/docs/ecolyo/getting_started/launch_local_application.md +++ b/docs/ecolyo/getting_started/launch_local_application.md @@ -10,44 +10,6 @@ Use following command in your favorite terminal to clone the projet: git clone https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git ``` -### User settings - -Open the project with VSCode and add the following code into .vscode/settings.json: - -``` -{ - "workbench.colorCustomizations": { - /* Put anything you like here */ - }, - "editor.snippetSuggestions": "top", - "editor.tabSize": 2, - "editor.formatOnSave": true, - "diffEditor.ignoreTrimWhitespace": false, - "window.zoomLevel": 0, - "gitlens.advanced.messages": { - "suppressShowKeyBindingsNotice": true - }, - "breadcrumbs.enabled": true, - "workbench.settings.editor": "json", - "editor.tabSize": 2, - "editor.formatOnSave": true, - "editor.formatOnPaste": true -} -``` - -If this file is not empty, you can simply add the follwing lines to it: - -``` - "gitlens.advanced.messages": { - "suppressShowKeyBindingsNotice": true - }, - "breadcrumbs.enabled": true, - "workbench.settings.editor": "json", - "editor.formatOnSave": true, - "diffEditor.ignoreTrimWhitespace": false, - "window.zoomLevel": 0, -``` - ## Installation of the project ### Installation of node modules diff --git a/docs/ecolyo/getting_started/launch_local_konnector.md b/docs/ecolyo/getting_started/launch_local_konnector.md index 2f4f692..6ec5953 100644 --- a/docs/ecolyo/getting_started/launch_local_konnector.md +++ b/docs/ecolyo/getting_started/launch_local_konnector.md @@ -1,2 +1,25 @@ -!!! info "" - :construction: Section under Construction :construction: \ No newline at end of file +## Cozy ressources + +Please see also the [official cozy documentation](https://docs.cozy.io/en/cozy-konnector-libs/). + +## Run a konnector locally + +To develop a konnector or test it, you will need to be able to run a konnector without the constraints imposed by the cozy stack. + +To help you, cozy developped a **standalone** mode for konnectors. +Simply launch it by typing: + +`yarn standalone` + +This command will create a **konnector-dev-config.json** file if it was not in your project folder before. +This file needs to hold all the informations transmitted by the cozy stack when the konnector runs by default + +- baseUrl +- apiAuthKey +- login +- password and so on... + +Type them all in the *fields* object. + +All data recovered by the standalone konnector will be sotred in the *data* folder. + diff --git a/docs/ecolyo/getting_started/setup_your_environment.md b/docs/ecolyo/getting_started/setup_your_environment.md index 09149b7..9cee5dc 100644 --- a/docs/ecolyo/getting_started/setup_your_environment.md +++ b/docs/ecolyo/getting_started/setup_your_environment.md @@ -28,8 +28,41 @@ Optional extensions: ### User settings -User settings for Ecolyo are described in this section: **LINK TO SECTION TO ADD** - +Open the project with VSCode and add the following code into .vscode/settings.json: + +``` +{ + "workbench.colorCustomizations": { + /* Put anything you like here */ + }, + "editor.snippetSuggestions": "top", + "editor.tabSize": 2, + "editor.formatOnSave": true, + "diffEditor.ignoreTrimWhitespace": false, + "window.zoomLevel": 0, + "gitlens.advanced.messages": { + "suppressShowKeyBindingsNotice": true + }, + "breadcrumbs.enabled": true, + "workbench.settings.editor": "json", + "editor.tabSize": 2, + "editor.formatOnSave": true, + "editor.formatOnPaste": true +} +``` + +If this file is not empty, you can simply add the follwing lines to it: + +``` + "gitlens.advanced.messages": { + "suppressShowKeyBindingsNotice": true + }, + "breadcrumbs.enabled": true, + "workbench.settings.editor": "json", + "editor.formatOnSave": true, + "diffEditor.ignoreTrimWhitespace": false, + "window.zoomLevel": 0, +``` ## Git The project is using GitLab, you will need to install Git to checkout the projet. diff --git a/docs/ecolyo/project_architecture/doctypes.md b/docs/ecolyo/project_architecture/doctypes.md index 2204900..2436f0d 100644 --- a/docs/ecolyo/project_architecture/doctypes.md +++ b/docs/ecolyo/project_architecture/doctypes.md @@ -65,7 +65,6 @@ This doctype is used to store all information about the user. | quizHash | string | Hash used to verify the content of quiz | | explorationHash | string | Hash used to verify the content of exploration | | isFirstConnection | boolean | Boolean used to inform if the user connects for the first time | -| haveSeenFavoriteModal | boolean | Boolean used to inform if user has seen the favorite modal | | haveSeenLastReport | boolean | Boolean used to inform if user has seen the last report | | haveSeenOldFluidModal | Datetime or boolean | Used to inform if user has seen the modal display when his data are too old. Its value is false or a DateTime when he saw it | | sendReportNotification | boolean | Boolean used to inform if user has seen the report notification | @@ -79,7 +78,6 @@ This doctype is used to store all information about the user. "challengeHash": "4cbcafe514788757c377534f1a407e022c29e38c", "duelHash": "48371ffabb2853b0503b882f11e1fa8e730bac76", "ecogestureHash": "9798a0aaccb47cff906fc4931a2eff5f9371dd8b", - "haveSeenFavoriteModal": true, "haveSeenLastReport": true, "haveSeenOldFluidModal": false, "isFirstConnection": false, diff --git a/docs/proxy/description.md b/docs/proxy/description.md index e220101..83ef690 100644 --- a/docs/proxy/description.md +++ b/docs/proxy/description.md @@ -1,6 +1,3 @@ -!!! warning "" - :construction: Section under Construction :construction: - This section of documentation refers to the Oauth protocols working hand in hand with our custom proxy and the cozy-stack. To fully understand its whereabouts, you should also look at the [enedis konnector](../ecolyo/konnectors/enedis.md) and [grdf konnector](../ecolyo/konnectors/grdf.md) documentation. @@ -172,6 +169,3 @@ Gathering from query or parameters all params. Sends a post request to the provider /token endpoint. The stack will store the response params in a *accounts* couchdb database. - -## What Happens Next - diff --git a/docs/proxy/use_cases/enedis.md b/docs/proxy/use_cases/enedis.md index 732bc1d..8cc8f46 100644 --- a/docs/proxy/use_cases/enedis.md +++ b/docs/proxy/use_cases/enedis.md @@ -2,7 +2,10 @@ !!! info "enedis documentation" Create an account on https://datahub-enedis.fr/ to explore all the services exposed by Enedis. - > [Authorize API](https://datahub-enedis.fr/data-connect/documentation/authorize-v1/) swagger + + [Authorize API](https://datahub-enedis.fr/data-connect/documentation/authorize-v1/) swagger. + + [Api healthcheck](https://datahub-enedis.fr/data-connect/ressources/etat-des-services/). Regarding Enedis, two endpoints are exposed: -- GitLab