IBM Watson SDK Major Releases March 2019

Erika Dsouza
IBM watsonx Assistant
3 min readApr 26, 2019

We’re excited to bring you new major releases for several of our IBM Watson SDKs, bringing new features and simplifications by removing legacy methods. All of the SDKs are auto generated and, in this release we have migrated the API docs and generator to OpenAPI 3.0.

Several of the SDKs have moved packages and libraries to ibm-watson. The older packages and libraries are still available at watson-developer-cloud, but those packages won’t be updated.We realize that moving to a major release can be laborious, so here’s a summary of the major changes.

Node SDK

Installation

The package has been renamed to ibm-watson

before:

npm install watson-developer-cloud

now:

npm install ibm-watson

Code Changes

  • The major new feature is support for Promises — every call returns a Promise if no callback is passed in. If your code had to wrap the call in a Promise, you don’t need to anymore! The call returns a Promise by default.

before

now

Python SDK

Installation

The package has been renamed to ibm-watson

before:

pip install --upgrade watson-developer-cloud

now:

pip install --upgrade ibm-watson

Code Changes

  • There have been no feature changes, but your code could have breaking changes because the parameters are reordered in some functions.. More details in release notes

Java SDK

Installation

The library has been renamed

before

now

Code changes

  • No matter which method you use to make an API request (execute(), enqueue(), or reactiveRequest()), you'll get back an object of form Response<T>, where T is the model representing the specific response model. Below is a discovery API call example:

before

now

Unity SDK

Installation

The core functions are now separated

before

now

Code Changes

The SDK has transitioned from being handwritten to completely generated bringing it in line with other Watson SDKs.

Major feature changes:

  • If the service expects a version date, set it in the constructor
  • There is no fail callback
  • There is no customData object in the callback. Every call returns a DetailedResponse rather than the raw response object

Below is an example:

before

now

Swift

Installation

The package installation remains the same, you can update to the latest version.

Code Changes

There have been no feature changes, but below are some changes to be noted

  • Version moved to first parameter of init methods for basic authentication
  • Ordering of parameters in some methods has changed due to migration of the API docs and generator to OpenAPI 3.0
  • File-type parameters are now defined as Data rather than URL
  • More information is in release notes

For any issues, feel free to open issues in the appropriate SDKs. Happy migrating and stay tuned to some cool features in the SDKs coming up every 6 months!

--

--