Add script to pay an ice tea to Zeus

This commit is contained in:
Felix Van der Jeugt 2019-11-21 15:08:00 +01:00
parent a0eda91673
commit a9b5295293
No known key found for this signature in database
GPG Key ID: 58B209295023754D
1 changed files with 11 additions and 0 deletions

11
local/bin/icetea Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
base='https://tap.zeus.gent'
user='felixvdj'
token="$(pass show ugent/zeus/tap)"
curl --header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "Authorization: Token token=$token" \
--data '{"order":{"order_items_attributes":[{"count":1,"product_id":1}]}}' \
--location \
"$base/users/$user/orders.json"