Giter Site home page Giter Site logo

nylas-ruby's Introduction

Aimeos logo

Nylas Ruby SDK

GitHub Workflow Status codecov

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.

Nylas provides REST APIs for Email, Calendar, and Contacts, and the Ruby SDK is the quickest way to build your first integration using Ruby.

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:

If you have a question that needs an answer, please reach out to [email protected] to get help.

⚙️ Install

Prerequisites

  • Ruby 2.3 or above.
  • Ruby Frameworks: rest-client, json, yajl-ruby.

We support Rails 4.2 and above. A more detailed compatibility list can be found in our list of Gemfiles.

Install

Add this line to your application's Gemfile:

gem 'nylas'

And then execute:

bundle

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

bundle install

You can run tests locally using rspec:

rspec spec

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

⚡️ Usage

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 CLIENT_ID, CLIENT_SECRET, and 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)

To learn more about how to use the Nylas Ruby SDK, please refer to our Ruby SDK QuickStart Guide.

💙 Contributing

Please refer to Contributing for information about how to make contributions to this project. We welcome questions, bug reports, and pull requests.

📝 License

This project is licensed under the terms of the MIT license. Please refer to LICENSE for the full terms.

nylas-ruby's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.