mirror of https://github.com/01-edu/public.git
miguel
12 months ago
committed by
MSilva95
2 changed files with 8 additions and 12 deletions
@ -1,2 +1,2 @@
|
||||
#!/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 |
||||
|
||||
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 : |
||||
|
||||
``` |
||||
curl -s https://((DOMAIN))/api/graphql-engine/v1/graphql --data '{"query":"{user(where:{login:{_eq:\"choumi\"}}){id}}"}' |
||||
``` |
||||
|
||||
### Usage |
||||
The output should be exactly like the example below: |
||||
|
||||
```console |
||||
$ bash to-git-or-not-to-git.sh |
||||
231748 |
||||
Chameleon |
||||
28 |
||||
Male |
||||
$ |
||||
``` |
||||
|
Loading…
Reference in new issue