Skip to content

Releases: nylas/nylas-ruby

v6.2.0

24 Sep 17:04
d2f07ed
Compare
Choose a tag to compare

Changelog

Added

  • Added query support for folders (#492, #488)
  • Added dependency on ostruct gem (#491, #489)
  • Enable SDK to reattach large files to messages on retry (#487)

Changed

  • Downgraded rest-client to 2.0 for better compatibility (#490)

New Contributors

v6.1.1

20 Aug 14:52
b8e0fcb
Compare
Choose a tag to compare

Changelog

Changed

  • Fixed sending attachments less than 3MB (#483, #482)

v6.1.0

25 Jul 21:33
03b5a60
Compare
Choose a tag to compare

Changelog

Added

  • Added query support for messages (#480)
  • Added support for clean messages (#476)
  • Added support for getting access token info (#475)
  • Added new webhook triggers (#473, #479)

v6.0.3

05 Mar 22:51
8490435
Compare
Choose a tag to compare

Changelog

Changed

  • Improved message sending and draft create/update performance (#470)
  • Change default timeout to match API (90 seconds) (#471)
  • Fixed error when invoking Auth.detect_provider (#469, #468)

v6.0.2

27 Feb 22:57
67a0b38
Compare
Choose a tag to compare

Changelog

Updated

  • Fixed the HTTP operation of updating grants (#464)
  • Fixed endpoint URL of rotating webhooks (#465)

v6.0.1

12 Feb 20:41
0be4370
Compare
Choose a tag to compare

The first patch release fixes a couple of issues regarding auth and list responses.

Changelog

Updated

  • Fixed a bug during OAuth URL building (#462)
  • Fixed a bug where the next_cursor field was omitted for list responses (#461)

v6.0.0

09 Feb 14:35
dc9e9ff
Compare
Choose a tag to compare

The Nylas Ruby SDK v6.0.0 is out of beta now Generally Available! This SDK sees a number of changes, including breaking changes, and more importantly brings full support of the new Nylas API v3.

Changelog

Breaking changes

  • Ruby SDK v6 supports the Nylas API v3 exclusively, dropping support for any endpoints that are not available in v3. See API v3 Features and Changes for more information.
  • Officially support minimum Ruby v3
  • Removed all models and typing from the SDK.

Added

  • Created error classes for the different API errors as well as SDK-specific errors
  • Added a configurable timeout for outgoing calls to the API.

Updated

  • Rewrote the majority of SDK to be more modular and efficient.

Removed

  • Local Webhook development support is removed due to incompatibility with the new API version.

Docs and References

Please refer to the README.md for a quick description and getting started guide with the new SDK. Furthermore, we have an UPGRADE.md for instructions on upgrading from v5.x to v6.x, as well as a reference guide for the Ruby SDK.

v5.17.0

04 Apr 19:20
Compare
Choose a tag to compare

This latest release of the Nylas Ruby SDK brings a few new additions.

Release Notes

Added

  • Added support for verifying webhook signatures (#413)
  • Added event.updated_at (#410)
  • Allow native authentication to return the full response like the exchange_code_for_token (#411)

Usage

Verifying webhook signatures

require 'sinatra'
require 'nylas'
require 'json'

set :port, 9000
NYLAS_CLIENT_SECRET = ENV['NYLAS_CLIENT_SECRET']

post '/' do
  content_type :json
  x_nylas_signature = request.env['HTTP_X_NYLAS_SIGNATURE']
  raw_body = request.body.read

  unless Nylas::Webhook::verify_webhook_signature(x_nylas_signature, raw_body, NYLAS_CLIENT_SECRET)
    status 403
    return { error: 'Invalid signature' }.to_json
  end

  body = JSON.parse(raw_body)
  puts "Webhook event received: #{JSON.pretty_generate(body)}"

  status 200
  { success: true }.to_json
end

run Sinatra::Application.run!

New Contributors πŸŽ‰

v5.16.0

14 Mar 20:30
Compare
Choose a tag to compare

This latest release of the Nylas Ruby SDK brings some additions.

Release Notes

Added

  • Added the missing provider_id attribute to Label (#404)
  • Add organizer_email and organizer_name to Event (#409)
  • Added missing job status webhook triggers (#403)

Fixed

  • Fix MESSAGE_LINK_CLICKED trigger (#403)

New Contributors πŸŽ‰

v5.15.0

02 Feb 21:37
Compare
Choose a tag to compare

This release of the Nylas Ruby SDK includes the release of local webhook development support built directly into the SDK. When implementing this feature in your app, the SDK will create a tunnel connection to a websocket server and registers it as a webhook callback to your Nylas account. See below for a usage example.

Release Notes

Added

  • Add local webhook testing support (#399)
  • Add tzinfo, faye-websocket, eventmachine as runtime dependencies (#401)

Usage

Webhook Tunnel

During the setup process you can pass in methods to override the websocket client's callback methods. The most important method is the on_message method which returns a parsed delta event from the webhook server.

nylas = Nylas::API.new(
    app_id: CLIENT_ID,
    app_secret: CLIENT_SECRET
)

# Define the callback for the on_message event
def on_message(delta)
  if delta.type == Nylas::WebhookTrigger::MESSAGE_UPDATED
    p [:delta, delta]
  end
end

# Config that sets the region, triggers, and callbacks
config = {
  "region": "us",
  "triggers": [WebhookTrigger::MESSAGE_UPDATED],
  "on_message": method(:on_message)
}

# Create, register, and open the webhook tunnel for testing
Nylas::Tunnel::open_webhook_tunnel(nylas, config)