Fetch Contacts to Transfer

This commit is contained in:
Shihaam Abdul Rahman 2021-04-25 00:13:54 +05:00
parent afb1b7bd07
commit 5199e2b285
2 changed files with 16 additions and 4 deletions

View File

@ -56,7 +56,7 @@ elif [ "$MENU" = "2" ]
if [ "$CONTACS" = "1" ] if [ "$CONTACS" = "1" ]
then then
curl -s -b $COOKIE $BML_URL/contacts | jq curl -s -b $COOKIE $BML_URL/contacts | jq -r '["Alias","Name","Account Number"], (.["payload"] | .[] | [.alias, .name, .account]) | @tsv'
elif [ "$CONTACS" = "2" ] elif [ "$CONTACS" = "2" ]
then then
printf 'Account Number: ' printf 'Account Number: '

12
bml-bash/pasrjsontest.sh Executable file
View File

@ -0,0 +1,12 @@
#!/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