lib cac: curl w/-G

This commit is contained in:
tv 2015-05-20 19:18:55 +02:00
parent 56f65724e3
commit d7319a7e87

View File

@ -1,19 +1,31 @@
cac_listservers() {
if test -z "${cac_via-}"; then
curl -fsS \
"https://panel.cloudatcost.com/api/v1/listservers.php?key=$cac_key&login=$cac_login"
-G \
--data-urlencode key="$cac_key" \
--data-urlencode login="$cac_login" \
'https://panel.cloudatcost.com/api/v1/listservers.php'
else
ssh -q $cac_via -t curl -fsS \
"https://panel.cloudatcost.com/api/v1/listservers.php?key=$cac_key\\&login=$cac_login"
-G \
--data-urlencode key="$cac_key" \
--data-urlencode login="$cac_login" \
'https://panel.cloudatcost.com/api/v1/listservers.php'
fi
}
cac_listtasks() {
if test -z "${cac_via-}"; then
curl -fsS \
"https://panel.cloudatcost.com/api/v1/listtasks.php?key=$cac_key&login=$cac_login"
-G \
--data-urlencode key="$cac_key" \
--data-urlencode login="$cac_login" \
'https://panel.cloudatcost.com/api/v1/listtasks.php'
else
ssh -q $cac_via -t curl -fsS \
"https://panel.cloudatcost.com/api/v1/listtasks.php?key=$cac_key\\&login=$cac_login"
-G \
--data-urlencode key="$cac_key" \
--data-urlencode login="$cac_login" \
'https://panel.cloudatcost.com/api/v1/listtasks.php'
fi
}