2020-01-02 13:28:05 +01:00
|
|
|
#!/bin/sh
|
2022-07-12 11:49:47 +02:00
|
|
|
base='https://tab.zeus.gent/api/v1'
|
2020-01-02 13:28:05 +01:00
|
|
|
user='felixvdj'
|
|
|
|
token="$(pass show ugent/zeus/tab)"
|
|
|
|
|
|
|
|
query="$base/users/$user.json"
|
|
|
|
|
|
|
|
[ "$1" = "hist" ] && query="$base/users/$user/transactions.json"
|
|
|
|
|
|
|
|
curl --header 'Accept: application/json' \
|
|
|
|
--header 'Content-Type: application/json' \
|
|
|
|
--header "Authorization: Token token=$token" \
|
|
|
|
--location \
|
|
|
|
"$query"
|