Skip to content

v1.18.0

Choose a tag to compare

@mrashed-dev mrashed-dev released this 06 Oct 17:34

This release of the Nylas Java SDK comes with new features and a bug fix.

Release Notes

Added

  • Added hide participants field for the Event class (#103)
  • Added support for provider detection (#100)
  • Added an enum for all known providers for native authentication (#100)
  • Improved webhook notification support with the addition of more notification attributes and event metadata fields (#102)

Changed

  • NylasAccount.revokeAccessToken() returns a boolean value now (#97)

Fixed

  • Fix error when updating occurrence of a recurring event (#93)

Using New Features

Provider Detection

// Set up your client
NylasClient client = new NylasClient();
NativeAuthentication nativeAuthentication = client.application("CLIENT_ID", "CLIENT_SECRET").nativeAuthentication();

// Detect the provider for an email address
NativeAuthentication.DetectedProvider detectedProvider = nativeAuthentication.detectProvider("test@gmail.com");
// The following fields are made available
detectedProvider.isDetected();
detectedProvider.getProviderName();
detectedProvider.getAuthName();
detectedProvider.getEmailAddress();
detectedProvider.isImap();

// You can use the result from above to get the correct provider settings
ProviderSettings detectedSettings = ProviderSettings.getProviderSettingsByProvider(provider.getAuthName());

// The enum is provided for consistency and equality
if(detectedProvider.getAuthName() == NativeAuthentication.Provider.GMAIL.getName()) {
  // do something here for a Gmail case
}