mirror of https://github.com/01-edu/public.git
fix(to-git-or-not-to-git-remake): changed the exercise so that it is doable
This commit is contained in:
parent
6b40ac65d8
commit
6fe1bcf2b2
|
@ -1,2 +1,2 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
curl -s "https://$DOMAIN/api/graphql-engine/v1/graphql" --data '{"query":"{user(where:{login:{_eq:\"'$USERNAME'\"}}){id}}"}' | jq '.data.user[0].id'
|
curl -s "https://$DOMAIN/assets/superhero/all.json" | jq -r '.[] | select(.id==170) | "\(.name)\n\(.powerstats.power)\n\(.appearance.gender)"'
|
||||||
|
|
|
@ -1,21 +1,17 @@
|
||||||
## to-git-or-not-to-git-?
|
## to-git-or-not-to-git
|
||||||
|
|
||||||
### Instructions
|
### Instructions
|
||||||
|
|
||||||
Write in a file `to-git-or-not-to-git.sh` the command that isolates your Gitea `id`.
|
Write in a file `to-git-or-not-to-git.sh` the command that will show the `name`, `power` and `gender` of the superhero with the `id: 170`.
|
||||||
|
|
||||||
Only the numbers will appear.
|
- Where to look : [superhero](<https://((DOMAIN))/assets/superhero/all.json>)
|
||||||
|
|
||||||
Here is the base command that needs to be adapted with your username and more :
|
The output should be exactly like the example below:
|
||||||
|
|
||||||
```
|
|
||||||
curl -s https://((DOMAIN))/api/graphql-engine/v1/graphql --data '{"query":"{user(where:{login:{_eq:\"choumi\"}}){id}}"}'
|
|
||||||
```
|
|
||||||
|
|
||||||
### Usage
|
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ bash to-git-or-not-to-git.sh
|
$ bash to-git-or-not-to-git.sh
|
||||||
231748
|
Chameleon
|
||||||
|
28
|
||||||
|
Male
|
||||||
$
|
$
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue