Nylas Ruby SDK
The Nylas Communications Platform allows developers to quickly build features that connect to every inbox, calendar, and contacts book in the world. Nylas makes it easy to build an integration that can be completed in days, and provides pre-built security and compliance features, and a 99.9% guaranteed uptime. Integrations with the Nylas Communications Platform are secure, reliable, and easy to use and maintain.
This is the GitHub repository for the Nylas Ruby SDK and is primarily for anyone who wants to make contributions to the SDK or install it from source. If you are looking to use Ruby to access the Nylas Email, Calendar, or Contacts API you should refer to our official Ruby SDK Quickstart Guide.
Here are some additional resources to help you get started:
- Nylas SDK Tutorials
- Get Started with the Nylas Communications Platform
- Sign up for your Nylas developer account.
- Nylas API Reference
If you have a question that needs an answer, please reach out to firstname.lastname@example.org to get help.
- Ruby 2.3 or above.
- Ruby Frameworks:
We support Rails 4.2 and above. A more detailed compatibility list can be found in our list of Gemfiles.
Add this line to your application's Gemfile:
And then execute:
To run scripts that use the Nylas Ruby SDK, install the nylas gem.
gem install nylas
To install the SDK from source, clone this repo and install with bundle.
git clone https://github.com/nylas/nylas-ruby.git && cd nylas-ruby bundle install
Setup Ruby SDK for Development
Install RubyGems if you don't already have it:
gem install bundler gem update --system
Install the SDK from source
You can run tests locally using
MacOS 10.11 (El Capitan) Note
Apple stopped bundling OpenSSL with MacOS 10.11. However, one of the dependencies of this gem (EventMachine) requires it. If you're on El Capitan and are unable to install the gem, try running the following commands in a terminal:
sudo brew install openssl sudo brew link openssl --force gem install nylas
To use this SDK, you first need to sign up for a free Nylas developer account.
Then, follow our guide to setup your first app and get your API access keys.
All of the functionality of the Nylas Communications Platform is available through the
API object. To access data for an account that’s connected to Nylas, create a new API client object and pass the variables you gathered when you got your developer API keys. In the following example, replace
ACCESS_TOKEN with your values.
require 'nylas' nylas = Nylas::API.new( app_id: CLIENT_ID, app_secret: CLIENT_SECRET, access_token: ACCESS_TOKEN )
Now, you can use
nylas to access full email, calendar, and contacts functionality. For example, here is how you would print the subject line for the most recent email message to the console.
message = nylas.messages.first puts(message.subject)
Please refer to Contributing for information about how to make contributions to this project. We welcome questions, bug reports, and pull requests.
Taking part in Hacktoberfest 2023 (i.e. issue is tagged with
hacktoberfest)? Read our Nylas Hacktoberfest 2023 contribution guidelines.
This project is licensed under the terms of the MIT license. Please refer to LICENSE for the full terms.