Commit Graph

17 Commits (master)

Author SHA1 Message Date
Didier BONNEFOI 920bc41873 Bash coding style review
- functions: use lower case local variables
- set some configuration variables as constant
- review some variables naming
- test command: use built-in [[ instead of [
- always keep if+then in the same line
- change shebang for portability

Enhancements
- API headers: use OVH API's timestamp instead of user's one to bypass misconfigured host.
- simplify valid target check
- use API_URL when target is set
- help output rework
- refresh README
2018-08-26 13:08:27 +02:00
Didier BONNEFOI b532476260 move profiles to user home 2018-02-20 17:12:34 +01:00
Didier BONNEFOI 8377493d0a JSON functions improvements
- 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
2017-07-14 01:09:28 +02:00
Didier BONNEFOI af4a56da66 OVH API Lib enhancements:
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
2017-07-03 00:38:10 +02:00
Didier BONNEFOI f40fc3a025 add wrapper for using ovh-api-bash-client with external scripts 2017-06-30 18:57:05 +02:00
Antoine Leveugle 377f8930c3 doc: fix readme title 2017-06-21 14:47:55 +02:00
Didier BONNEFOI 71c1d5fe6f profiles management enhancements
- 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
2017-06-21 14:31:13 +02:00
Didier BONNEFOI 485cbd833e if --profile is set to 'default', load configuration from script directory 2017-06-19 18:36:33 +02:00
Didier BONNEFOI 1a0e3f220f Allow multiple API keys management with profiles
- 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
2017-06-13 18:06:41 +02:00
antoine.leveugle 73c4e37107 update README 2014-04-29 22:37:11 +02:00
Antoine Leveugle 6a847aba20 Update README.md 2014-04-19 21:59:27 +02:00
Antoine Leveugle 1a044a7986 Update README.md 2014-04-17 22:17:44 +02:00
Antoine Leveugle ae3abbf4f3 Update README.md 2014-04-17 22:17:09 +02:00
Antoine Leveugle 0c1d719906 Update README.md 2014-04-17 21:31:01 +02:00
Antoine Leveugle 928178c732 Update README.md 2014-04-17 21:28:03 +02:00
Antoine Leveugle bff106c1fa Update README.md 2014-04-17 20:16:30 +02:00
Antoine Leveugle ca60dc6686 Create README.md 2014-04-17 20:13:09 +02:00