Commit Graph

31 Commits (e4f968c78ab9a74406dde8af13b91295e8ca0e79)

Author SHA1 Message Date
Antoine Leveugle e4f968c78a Merge pull request #5 from bonidier/ovhapi_lib
Ovhapi lib
2017-09-19 08:35:40 +02:00
Didier BONNEFOI ae35740057 OvhRequestApi() enhancements
- 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()
2017-07-19 11:45:54 +02: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
Antoine Leveugle 23231a9859 Merge pull request #4 from bonidier/configuration-profile
Allow multiple API keys management with profiles
2017-06-21 14:46:38 +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 143ad5114b Allow to set --profile option at any position :
- 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
2017-06-21 00:21:47 +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 5719c46b2d feat: make the execution path relative 2016-06-09 20:53:21 +02:00
Antoine Leveugle 4ca8512f56 Merge pull request #3 from denouche/bash41
fix: assure compatibility with bash 4.0 and 4.1
2016-05-25 21:46:58 +02:00
antoine.leveugle fe3697eaaa fix: assure compatibility with bash 4.0 and 4.1
closes #2
2016-05-25 21:45:28 +02:00
antoine.leveugle 73c4e37107 update README 2014-04-29 22:37:11 +02:00
antoine.leveugle c3d7245a3b some little improvments 2014-04-29 00:25:57 +02:00
antoine.leveugle fcf5e6f588 add targets support for EU and CA apis 2014-04-28 23:14:33 +02:00
antoine.leveugle 1eb3c11c18 add check during initialization and information to create a consumer key later 2014-04-28 12:19:11 +02:00
antoine.leveugle c3c5130f5d add http response status in out, at the begining of the line 2014-04-27 15:12:56 +02:00
Antoine Leveugle 6a847aba20 Update README.md 2014-04-19 21:59:27 +02:00
antoine.leveugle 2f60538889 move script 2014-04-19 21:48:07 +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 03514b89cd change base path to current path 2014-04-17 21:47:01 +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
antoine.leveugle 01f8a1f689 improve help 2014-04-17 20:13:01 +02:00
antoine.leveugle d44ea3e138 move 2014-04-17 20:03:15 +02:00
antoine.leveugle 9c19977b67 first commit 2014-04-17 19:53:28 +02:00