findbrok/laravel-personality-insights

Watson API V3 Requires Version to be passed to all requests

percymamedy opened this issue · 2 comments

Using v3 api, there is a need to append query parameter: 'version' to the request, otherwise it will throw out the following error on response:

{ "code": 400, "sub_code": "S00016", "error": "No version provided" }

The version will usually be the current Date version=2016-10-20. Currently, the workaround is to use the withQuery() method to pass in the version. But we need a way to generate a version automatically and pass in for every request and with also the possibility for the User to override this version.

What if the version comes also in the configuration file. Then the developer can override this version in case something changes?

Could you make a PR with this proposed change.