Bot releases are hidden (Show)
Published by lpatino10 about 5 years ago
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 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.
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>");
Use the BearerTokenAuthenticator
. This one accepts just the bearer token.
Authenticator authenticator = new BearerTokenAuthenticator("<bearer_token>");
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.
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.
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());
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.
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.
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.
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.
Published by germanattanasio over 5 years ago
Published by lpatino10 over 5 years ago
Published by lpatino10 over 5 years ago
Published by lpatino10 over 5 years ago
Published by lpatino10 almost 6 years ago
Published by lpatino10 almost 6 years ago
Published by lpatino10 almost 6 years ago
Published by lpatino10 almost 6 years ago
Published by lpatino10 almost 6 years ago
Published by lpatino10 almost 6 years ago
Published by lpatino10 almost 6 years ago
Published by lpatino10 almost 6 years ago
Published by lpatino10 almost 6 years ago
Published by lpatino10 almost 6 years ago
Published by lpatino10 about 6 years ago
Published by lpatino10 about 6 years ago
Published by lpatino10 about 6 years ago
Published by lpatino10 about 6 years ago