bml-cli/parser_json_test.sh
Shihaam Abdul Rahman 3908b5dde9 added adding contacts
2021-04-28 01:24:02 +05:00

19 lines
709 B
Bash

#!/bin/bash
source .env
BML_URL='https://www.bankofmaldives.com.mv/internetbanking/api'
COOKIE=/tmp/bmlcookie
curl -s -c $COOKIE $BML_URL/login \
--data-raw username=$BML_USERNAME \
--data-raw password=$BML_PASSWORD \
--compressed > /dev/null
curl -s -b $COOKIE $BML_URL/profile > /dev/null
#curl -s -b $COOKIE $BML_URL/contacts | jq -r '["Account Number","Currency","Account Name","Contact Name"], ["==================================================================="], (.["payload"] | .[] | [.account, .currency, .name, .alias]) | @tsv'
#get this to render nicely in a table, similar to contacts
#curl -s -b $COOKIE $BML_URL/dashboard
curl -s -b $COOKIE $BML_URL/api/validate/account/7701134192101