dont need to enter currency in .env now
This commit is contained in:
parent
78b3b954ea
commit
f22bbcdd46
@ -15,6 +15,13 @@ PROFILE=$(curl -s -b $COOKIE $BML_URL/profile | jq -r '.payload | .profile | .[]
|
||||
curl -s -b $COOKIE $BML_URL/profile --data-raw profile=$PROFILE # select Personal Profile
|
||||
}
|
||||
|
||||
getaccountdetails(){
|
||||
REQACCOUNTDETAILS=$(curl -s -b $COOKIE $BML_URL/account/$BML_ACCOUNTID | jq -r .payload)
|
||||
ACCOUNTTYPE=$(echo $REQACCOUNTDETAILS | jq -r .product)
|
||||
ACCOUNTNUMBER=$(echo $REQACCOUNTDETAILS | jq -r .accountNumber)
|
||||
CURRENCY=$(echo $REQACCOUNTDETAILS | jq -r .currency)
|
||||
}
|
||||
|
||||
send_tg(){
|
||||
TGTEXT=$(echo $DESCRIPTION%0A$FROMTOAT: $ENTITY%0A$CURRENCY: $AMOUNT | sed "s/ /%20/g") ; echo $TGTEXT # format text for telegram
|
||||
curl -s $TG_BOTAPI$TG_BOT_TOKEN/sendMessage?chat_id=$TG_CHATID'&'text=$TGTEXT #send to telegram
|
||||
@ -43,7 +50,7 @@ echo "Nothing new....Next check in $DELAY seconds"
|
||||
|
||||
init
|
||||
login
|
||||
|
||||
getaccountdetails
|
||||
loop(){
|
||||
while true; do
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
BML_USERNAME='' #Your BML Username
|
||||
BML_PASSWORD='' #Your BML Password
|
||||
BML_ACCOUNTID='' #Your BML Account ID,NOT to be confused with account number, read the README.md on how to obtain this.
|
||||
CURRENCY='MVR' #Change only if your account is USD
|
||||
|
||||
TG_BOT_TOKEN='' #Your Telegram Bot API Token, Contact @BotFather on Telegram to obtain token
|
||||
TG_CHATID='' #Your Telegram chat ID, This could be your user, group, supergroup or channel ID, add "-100" first if supergroup or channel
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user