Skip to content

Repository files navigation

node-create-read-update-delete-events

This sample repo will show you how to easily to get started with the Nylas Node.js SDK to manage calendars and events using the Nylas API v3.

Setup

System dependencies

  • Node.js v16.x

Gather environment variables

You'll need the following values:

GRANT_ID = ""
SERVER_URL = ""
API_KEY = ""

Add the above values to a .env file. All values can be retrieved from the Nylas Dashboard.

Install dependencies

$ npm i

Usage

Run the script using following commands:

$ npm run build
$ node build/index.js

Comment out the specific functions to test out:

// List out all calendars
listCalendars()

// Create a new calendar
// createCalendar()

// Create a new calendar event
// createEvent()

// Update calendar event
// updateEvent()

// Destroy calendar event
// destroyEvent()

Be sure to provide the .env and specific variables required for each function.

When you run the script, you'll get all calendar information output in your terminal:

{
  calendars: {
    requestId: 'requestId',
    data: [
      # ...Calendar Data...
    ],
    next: [Function: bound ]
  }
}

Learn more

Visit our Nylas Node.js SDK documentation to learn more.

About

Create, Read, Update, Delete Calendar Events with the Nylas Node.js v3 SDK!

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages