From a9b5295293770fc57c6d13f8314c851bce5c042d Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Thu, 21 Nov 2019 15:08:00 +0100 Subject: [PATCH] Add script to pay an ice tea to Zeus --- local/bin/icetea | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 local/bin/icetea diff --git a/local/bin/icetea b/local/bin/icetea new file mode 100755 index 0000000..5ede15e --- /dev/null +++ b/local/bin/icetea @@ -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"