Browse Source

Use local api instead of github

content-update
Clement Denis 5 years ago committed by Xavier Petit
parent
commit
54b80de15e
  1. 2
      subjects/cl-camp4.en.md
  2. 2
      subjects/cl-camp4.fr.md
  3. 10
      subjects/introduction.en.md
  4. 10
      subjects/introduction.fr.md
  5. 10
      subjects/to-git-or-not-to-git.en.md
  6. 4
      subjects/to-git-or-not-to-git.fr.md
  7. 2
      subjects/who-are-you.en.md
  8. 2
      subjects/who-are-you.fr.md

2
subjects/cl-camp4.en.md

@ -10,7 +10,7 @@ Create a file `myfamily.sh`, which will show a subject's family (key: relatives)
- The subject will be decided depending on his ID which will be contained in the environment variable HERO_ID.
* Where to look : https://raw.githubusercontent.com/kigiri/superhero-api/master/api/all.json
* Where to look : https://01.alem.school/assets/superhero/all.json
* What to use : curl, jq and others...

2
subjects/cl-camp4.fr.md

@ -10,7 +10,7 @@ Créer un fichier `myfamily.sh`, qui affichera la famille d'un individu (clef: r
- L'individu sera choisi en fonction de son ID qui sera contenu dans la variable d'environment HERO_ID.
* Où chercher : https://raw.githubusercontent.com/kigiri/superhero-api/master/api/all.json
* Où chercher : https://01.alem.school/assets/superhero/all.json
* Quoi utiliser : `curl`, `jq` et d'autres...

10
subjects/introduction.en.md

@ -4,14 +4,14 @@
#### 1- get-ready
Create in your `github account` the repository named `piscine-go`.
Create in your `git account` the repository named `piscine-go`.
Once created, clone that repository on your desktop.
If your `github username` was `kigiri` this is the command that will need to be used :
If your `username` was `kigiri` this is the command that will need to be used :
`git clone https://github.com/kigiri/piscine-go`
`git clone https://01.alem.school/git/kigiri/piscine-go`
This command needs to be adapted with **your own github username**.
This command needs to be adapted with **your own username**.
This repository will be the folder where all the exercices must be uploaded.
@ -20,7 +20,7 @@ This repository will be the folder where all the exercices must be uploaded.
Once the repository is created, write your first shell program called `hello.sh`
When executed this program must print `Hello {username}!`
Where `{username}` is your `github username`
Where `{username}` is your `username`
##### Usage

10
subjects/introduction.fr.md

@ -4,14 +4,14 @@
#### 1- get-ready
Créer dans votre `compte github` le répository nommé `piscine-go`.
Créer dans votre `compte git` le répository nommé `piscine-go`.
Une fois créé, cloner ce répository sur votre desktop.
Si votre `github username` était `kigiri` voici la commande qui devrait être utilisé :
Si votre `git username` était `kigiri` voici la commande qui devrait être utilisé :
`git clone https://github.com/kigiri/piscine-go`
`git clone https://01.alem.school/git/kigiri/piscine-go`
Cette commande doit être adaptée avec **votre propre github username**.
Cette commande doit être adaptée avec **votre propre username**.
Ce repository sera le dossier où tous les exercises doivent être uploadés.
@ -20,7 +20,7 @@ Ce repository sera le dossier où tous les exercises doivent être uploadés.
Une fois que le répository est créé, écrire votre premier programme shell nommé `hello.sh`
Quand ce programme est éxécuté il doit afficher `Hello {username}!`
`{username}` est votre `github username`
`{username}` est votre `username`
##### Utilisation

10
subjects/to-git-or-not-to-git.en.md

@ -2,12 +2,16 @@
### Instructions
Write in a file `to-git-or-not-to-git.sh` the command that isolates your `gitHub id`.
Write in a file `to-git-or-not-to-git.sh` the command that isolates your Gitea `id`.
Only the numbers will appear.
adapt this command
> Local API documentation: https://git.01.alem.school/api/swagger
Adapt & complete this command :
```curl -s "https://01.alem.school/api/graphql-engine/v1/graphql" --data '{"query":"{user(where:{githubLogin:{_eq:\"'$USERNAME'\"}}){id}}"}'
```
curl -s https://01.alem.school/api/graphql-engine/v1/graphql --data '{"query":"{user(where:{githubLogin:{_eq:\"choumi\"}}){id}}"}'
```
### Usage

4
subjects/to-git-or-not-to-git.fr.md

@ -2,9 +2,11 @@
### Instructions
Écrire dans un fichier `to-git-or-not-to-git.sh` la commande qui isoles votre `gitHub id`.
Écrire dans un fichier `to-git-or-not-to-git.sh` la commande qui isoles votre `id git`.
Seulement les chiffres apparaitront.
> Documentation de l'API locale https://01.alem.school/git/api/swagger
### Utilisation
```console

2
subjects/who-are-you.en.md

@ -8,6 +8,6 @@ The only though that comes to your mind is a tag that says: `subject Id: 70`"
Create the file `who-are-you.sh` which will remind you who you are by showing your name only.
- Where to look : https://raw.githubusercontent.com/kigiri/superhero-api/master/api/all.json
- Where to look : https://01.alem.school/assets/superhero/all.json
- What to use : `curl` and `jq`

2
subjects/who-are-you.fr.md

@ -8,6 +8,6 @@ Tout ce qui vous vient à l'esprit est une étiquette sur laquelle est écrite:
Créer le fichier `who-are-you.sh` qui vous rappellera qui vous êtes en affichant votre Nom seulement.
- Où chercher : https://raw.githubusercontent.com/kigiri/superhero-api/master/api/all.json
- Où chercher : https://01.alem.school/assets/superhero/all.json
- Quoi utiliser : `curl` et `jq`

Loading…
Cancel
Save