forked from nylas/nylas-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renaming All Nylas Constants to NylasV2
- Loading branch information
1 parent
fa7797d
commit 4879803
Showing
161 changed files
with
620 additions
and
620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# Contribute to Nylas | ||
# Contribute to NylasV2 | ||
👍 🎉 First of all, thanks for taking the time to contribute! 🎉 👍 | ||
|
||
The following is a set of guidelines for contributing to the Nylas Ruby SDK; these are guidelines, not rules, so please use your best judgement and feel free to propose changes to this document via pull request. | ||
The following is a set of guidelines for contributing to the NylasV2 Ruby SDK; these are guidelines, not rules, so please use your best judgement and feel free to propose changes to this document via pull request. | ||
|
||
# How to Ask a Question | ||
|
||
If you have a question about how to use the Ruby SDK, please [create an issue](https://github.com/nylas/nylas-ruby/issues) and label it as a question. If you have more general questions about the Nylas Communications Platform, or the Nylas Email, Calendar, and Contacts API, please reach out to [email protected] to get help. | ||
If you have a question about how to use the Ruby SDK, please [create an issue](https://github.com/nylas/nylas-ruby/issues) and label it as a question. If you have more general questions about the NylasV2 Communications Platform, or the NylasV2 Email, Calendar, and Contacts API, please reach out to [email protected] to get help. | ||
|
||
# How To Contribute | ||
## Report a Bug or Request a Feature | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
<a href="https://www.nylas.com/"> | ||
<img src="https://brand.nylas.com/assets/downloads/logo_horizontal_png/Nylas-Logo-Horizontal-Blue_.png" alt="Aimeos logo" title="Aimeos" align="right" height="60" /> | ||
<img src="https://brand.nylas.com/assets/downloads/logo_horizontal_png/NylasV2-Logo-Horizontal-Blue_.png" alt="Aimeos logo" title="Aimeos" align="right" height="60" /> | ||
</a> | ||
|
||
# Nylas Ruby SDK | ||
# NylasV2 Ruby SDK | ||
|
||
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/nylas/nylas-ruby/CI)](https://github.com/nylas/nylas-ruby/actions/workflows/rspec.yml) | ||
[![codecov](https://codecov.io/gh/nylas/nylas-ruby/branch/main/graph/badge.svg?token=IKH0YMH4KA)](https://codecov.io/gh/nylas/nylas-ruby) | ||
|
||
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. | ||
The NylasV2 Communications Platform allows developers to quickly build features that connect to every inbox, calendar, and contacts book in the world. NylasV2 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 NylasV2 Communications Platform are secure, reliable, and easy to use and maintain. | ||
|
||
Nylas provides REST APIs for [Email](https://docs.nylas.com/docs/quickstart-email), [Calendar](https://docs.nylas.com/docs/quickstart-calendar), and [Contacts](https://docs.nylas.com/docs/quickstart-contacts), and the Ruby SDK is the quickest way to build your first integration using Ruby. | ||
NylasV2 provides REST APIs for [Email](https://docs.nylas.com/docs/quickstart-email), [Calendar](https://docs.nylas.com/docs/quickstart-calendar), and [Contacts](https://docs.nylas.com/docs/quickstart-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](https://docs.nylas.com/docs/quickstart-ruby) [SDK Quickstart Guide](https://docs.nylas.com/docs/quickstart-ruby). | ||
This is the GitHub repository for the NylasV2 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 NylasV2 Email, Calendar, or Contacts API you should refer to our official [Ruby](https://docs.nylas.com/docs/quickstart-ruby) [SDK Quickstart Guide](https://docs.nylas.com/docs/quickstart-ruby). | ||
|
||
Here are some additional resources to help you get started: | ||
|
||
- [Nylas SDK Tutorials](https://docs.nylas.com/docs/tutorials) | ||
- [Get Started with the Nylas Communications Platform](https://docs.nylas.com/docs/getting-started) | ||
- [Sign up for your Nylas developer account.](https://nylas.com/register) | ||
- [Nylas API Reference](https://docs.nylas.com/reference) | ||
- [NylasV2 SDK Tutorials](https://docs.nylas.com/docs/tutorials) | ||
- [Get Started with the NylasV2 Communications Platform](https://docs.nylas.com/docs/getting-started) | ||
- [Sign up for your NylasV2 developer account.](https://nylas.com/register) | ||
- [NylasV2 API Reference](https://docs.nylas.com/reference) | ||
|
||
If you have a question that needs an answer, please reach out to [email protected] to get help. | ||
|
||
|
@@ -43,7 +43,7 @@ And then execute: | |
bundle | ||
``` | ||
|
||
To run scripts that use the Nylas Ruby SDK, install the nylas gem. | ||
To run scripts that use the NylasV2 Ruby SDK, install the nylas gem. | ||
|
||
```bash | ||
gem install nylas | ||
|
@@ -89,17 +89,17 @@ gem install nylas | |
|
||
## ⚡️ Usage | ||
|
||
To use this SDK, you first need to [sign up for a free Nylas developer account](https://nylas.com/register). | ||
To use this SDK, you first need to [sign up for a free NylasV2 developer account](https://nylas.com/register). | ||
|
||
Then, follow our guide to [setup your first app and get your API access keys](https://docs.nylas.com/docs/get-your-developer-api-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. | ||
All of the functionality of the NylasV2 Communications Platform is available through the `API` object. To access data for an account that’s connected to NylasV2, 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. | ||
|
||
|
||
```ruby | ||
require 'nylas' | ||
|
||
nylas = Nylas::API.new( | ||
nylas = NylasV2::API.new( | ||
app_id: CLIENT_ID, | ||
app_secret: CLIENT_SECRET, | ||
access_token: ACCESS_TOKEN | ||
|
@@ -114,7 +114,7 @@ message = nylas.messages.first | |
puts(message.subject) | ||
``` | ||
|
||
To learn more about how to use the Nylas Ruby SDK, please refer to our [Ruby](https://docs.nylas.com/docs/quickstart-ruby) [SDK QuickStart Guide](https://docs.nylas.com/docs/quickstart-ruby). | ||
To learn more about how to use the NylasV2 Ruby SDK, please refer to our [Ruby](https://docs.nylas.com/docs/quickstart-ruby) [SDK QuickStart Guide](https://docs.nylas.com/docs/quickstart-ruby). | ||
|
||
## 💙 Contributing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# Authentication | ||
|
||
Nylas supports two forms of authentication: | ||
NylasV2 supports two forms of authentication: | ||
|
||
* Native Authentication, where the developer is responsible for building the user interface for retrieiving the appropriate credentials for a users contacts, mail and/or calendar provider. See the [Nylas Native Authentication Reference Documentation](https://docs.nylas.com/reference#native-authentication-1) for more details. | ||
* Native Authentication, where the developer is responsible for building the user interface for retrieiving the appropriate credentials for a users contacts, mail and/or calendar provider. See the [NylasV2 Native Authentication Reference Documentation](https://docs.nylas.com/reference#native-authentication-1) for more details. | ||
|
||
* Nylas OAuth, where Nylas acts as an OAuth Provider that abstracts away the supported providers. This allows you to get up and running quickly without having to build potentially complex user interfaces for supporting any number of providers. See the [Nylas OAuth Authentication Reference Documentation](https://docs.nylas.com/reference#oauth) for more details. | ||
* NylasV2 OAuth, where NylasV2 acts as an OAuth Provider that abstracts away the supported providers. This allows you to get up and running quickly without having to build potentially complex user interfaces for supporting any number of providers. See the [NylasV2 OAuth Authentication Reference Documentation](https://docs.nylas.com/reference#oauth) for more details. | ||
|
||
## Running the Example | ||
|
||
1. Clone the repository | ||
1. Install the dependencies by using `bundle install` | ||
1. Get a Nylas App ID and App Secret from the [Nylas Dashboard](https://dashboard.nylas.com/) | ||
1. Get a Google Cloud Platform Access Token by following the [Nylas Google Setup Guide](https://docs.nylas.com/docs/creating-a-google-project-for-dev). Make sure to set the callback to `localhost:4567/auth/google/callback`. | ||
1. Get a NylasV2 App ID and App Secret from the [NylasV2 Dashboard](https://dashboard.nylas.com/) | ||
1. Get a Google Cloud Platform Access Token by following the [NylasV2 Google Setup Guide](https://docs.nylas.com/docs/creating-a-google-project-for-dev). Make sure to set the callback to `localhost:4567/auth/google/callback`. | ||
1. Copy `.env.example` to `.env` and set the values based upon the previous steps. | ||
1. Run the app web server: `bundle exec dotenv ruby app.rb` | ||
1. Login to whichever mail, contact, and calendaring providers you want using the different authentication mechanisms. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.