java-sdk

Java SDK to use the IBM Watson services.

APACHE-2.0 License

Stars
590
Committers
89

Bot releases are hidden (Show)

java-sdk - java-sdk-8.0.0-rc1

Published by lpatino10 about 5 years ago

Breaking changes

There are some small breaking changes present, like some methods dropping a parameter or two or some parameters being renamed, but below are the big changes throughout the SDK.

Authentication methods

Authentication methods have changed to make things more extensible for the future. There are 5 authentication variants supplied in the SDK (shown below), and it's possible now to create your own authentication implementation if you need something specific by implementing the Authenticator implementation.

Basic

You can authenticate with basic auth using the BasicAuthenticator. This allows you to pass in a username and password.

Authenticator authenticator = new BasicAuthenticator("<username>", "<password>");

Bearer token

Use the BearerTokenAuthenticator. This one accepts just the bearer token.

Authenticator authenticator = new BearerTokenAuthenticator("<bearer_token>");

Cloud Pak for Data

This class helps you authenticate with your services on (Cloud Pak for Data)[https://www.ibm.com/analytics/cloud-pak-for-data).

// constructor with required parameters
Authenticator authenticator = new CloudPakForDataAuthenticator(
  "<url>", 
  "<test_username>",
  "<test_password>"
);

There's also another constructor to disable SSL verification or send request headers on the token exchange.

IAM

Like the CloudPakForDataAuthenticator, there's a basic constructor

Authenticator authenticator = new IamAuthenticator("<token>");

and another one to supply additional arguments like a particular token exchange URL, a client ID and secret, and the same options to disable SSL verification and send headers.

None

Finally, there's the NoAuthAuthenticator, which is pretty self-explanatory. Pass this when you don't need any authentication to happen.

Assistant service = new Assistant("2019-02-28", new NoAuthAuthenticator());

More model builders

If you've used the SDK before, you're probably familiar with the use of the builder pattern across the board. With this release, we've tweaked the generation process to capture better which are models that are being constructed to be sent to the service. These are models we'd prefer to have builders, making it easier to put them together.

There are unfortunately a decent number of models which move to this pattern, but it's one we expect to use well into the future.

Features

Better control over HTTP logging

Logging used to be controlled with a .properties file somewhere in the namespace, but it was confusing to many people. We also didn't leave an option to shut them off!

We've added control over this to the existing HttpConfigOptions class. Information on usage can be found here.

Ability to cancel an API call

It's possible that in your code, you may want to cancel an API call you made. Some reasons for this might be requests exceeding some response time threshold or sending multiple async requests and just wanting to keep the fastest one, canceling the rest.

Regardless, this feature has been added for this release. You can see more information here.

java-sdk - 6.14.1

Published by lpatino10 over 5 years ago

This is the last release for v6.x.x of the SDK 😢 If you'd like to continue getting updates, please migrate to the latest version. You can read about changes here.

Note that as part of the latest release, you'll need to target a different package in Maven/Gradle. See the new installation instructions for more information.

java-sdk - 6.14.0

Published by germanattanasio over 5 years ago

java-sdk - 6.13.2

Published by lpatino10 over 5 years ago

java-sdk - 6.13.1

Published by lpatino10 over 5 years ago

java-sdk - 6.13.0

Published by lpatino10 over 5 years ago

java-sdk - 6.12.0

Published by lpatino10 almost 6 years ago

java-sdk - 6.11.3

Published by lpatino10 almost 6 years ago

java-sdk - 6.11.2

Published by lpatino10 almost 6 years ago

java-sdk - 6.11.1

Published by lpatino10 almost 6 years ago

java-sdk - 6.11.0

Published by lpatino10 almost 6 years ago

java-sdk - 6.10.0

Published by lpatino10 almost 6 years ago

java-sdk - 6.9.3

Published by lpatino10 almost 6 years ago

java-sdk - 6.9.2

Published by lpatino10 almost 6 years ago

java-sdk - 6.9.1

Published by lpatino10 almost 6 years ago

java-sdk - 6.9.0

Published by lpatino10 almost 6 years ago

java-sdk - 6.8.0

Published by lpatino10 about 6 years ago

java-sdk - 6.7.0

Published by lpatino10 about 6 years ago

java-sdk - 6.6.0

Published by lpatino10 about 6 years ago

java-sdk - 6.5.1

Published by lpatino10 about 6 years ago

Package Rankings
Top 7.78% on Repo1.maven.org
Badges
Extracted from project README
Build and Test Deploy and Publish Maven Central CLA assistant Build Status
Related Projects