v1.18.0
This release of the Nylas Java SDK comes with new features and a bug fix.
Release Notes
Added
- Added hide participants field for the
Eventclass (#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
}