improve help

pull/3/head
antoine.leveugle 2014-04-17 20:13:01 +02:00
parent d44ea3e138
commit 01f8a1f689
1 changed files with 5 additions and 12 deletions

View File

@ -11,14 +11,12 @@ LIBS="libs"
API_URL="https://api.ovh.com/1.0" API_URL="https://api.ovh.com/1.0"
API_CREAT_APP_URL="https://api.ovh.com/createApp/" API_CREAT_APP_URL="https://api.ovh.com/createApp/"
GET_IP_URL="http://ipecho.net/plain"
CURRENT_PATH="$(dirname $0)" CURRENT_PATH="$(dirname $0)"
# THESE VARS WILL BE USED LATER # THESE VARS WILL BE USED LATER
METHOD="GET" METHOD="GET"
URL="/me" URL="/me"
IP=""
TIME="" TIME=""
SIGDATA="" SIGDATA=""
POST_DATA="" POST_DATA=""
@ -78,11 +76,6 @@ initApplication()
fi fi
} }
updateIp()
{
IP=$(wget -q -O - $GET_IP_URL)
}
updateTime() updateTime()
{ {
TIME=$(date '+%s') TIME=$(date '+%s')
@ -98,9 +91,9 @@ help()
{ {
echo echo
echo "Help: possible arguments are:" echo "Help: possible arguments are:"
echo " --url : the api to call, for example /domains (default is /me)" echo " --url <url> : the API URL to call, for example /domains (default is /me)"
echo " --method : the method to use, for example POST (default is GET)" echo " --method <method> : the HTTP method to use, for example POST (default is GET)"
echo " --data : the data body to send with the request" echo " --data <JSON data> : the data body to send with the request"
echo " --init : to initialize the consumer key" echo " --init : to initialize the consumer key"
echo " --initApp : to initialize the API application" echo " --initApp : to initialize the API application"
echo echo