- OVHAPI_HTTP_STATUS always return a numeric value
- raise error 500 with help message if OVHAPI_HTTP_RESPONSE has many lines
- update samples scripts with OvhRequestApi()
- single execution of JSON.sh, now read result from a cache
- JSON wrapper now use AWK for best performances, even on big JSON source
- remove JSON string argument from getJSON*() functions
- move JSON functions to a standalone file
- add JSONSHLIB_DEBUG variable
- add JSONSH_DIR to override JSON.sh path
- update samples scripts
- rework file tree
- update README
- update .gitignore
OvhRequestApi() review:
- ovh-api-bash-client.sh commandline piped to bash, for correct quotes management
- add target support with OVHAPI_TARGET variable
Wrappers for JSON.sh enhancements:
- JSON nested object managed, key displayed/set with a dot as separator.
- getJSONValues() support for object and nested object
- getJSONValue() hash support (getJSONString() removed)
- remove double quotes from field for getJSONKeys() and getJSONValue()
- getJSONArrayLength() removed, result can be calculated from getJSONValues() result
Lib debugging:
- add _ovhapilib_echo_debug() : redirect arguments to stderr
- add OVHAPILIB_DEBUG variable
- when launching --init/--initApp, create the defined profile if missing
- fix profiles listing (bad directory)
- help command : always add --profile argument if profile name is defined
- functions to create keys now launched out of parseArguments()
bugfix :
- fix empty CURRENT_PATH when launching --init/--initApp
enhancements :
- better output for --list-profile output + add 'default' profile
refactoring :
- move initApplication() into createConsumerKey() instead of calling it each time
- add --profile to override default configuration location
- add --list-profile to display available profiles
- rework messages to display command with the current profile if set
Bugfix
- ensure OVH App Key an App Secret are defined when creating consumer key
Enhancements
- when using --init, allow override default "all permissions grants" if --data is set
- add -h/--help