0.3.1 • Published 6 years ago

todoist-nodejs v0.3.1

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

todoist-nodejs

GitHub License Todoist API npm version

The unofficial Todoist Node.js API library. Use todoist SYNC API.

Installation

npm install node-todoist

or

yarn add node-todoist

Usage

To get started create new instance of todoist, pass it your API token and make sync to login.

const todoist = require('todoist-nodejs');

const api = new todoist(<TOKEN_API>);
api.sync();

After sync you can do everything you want. Some examples are below. Pay attention, that any changes first of all are placed in queue. So you should call commit method to sync it with todoist servers.

api.commit();

Examples

Performing a add item request

const todoist = require("../build/index");

const api = new todoist(process.env.TOKEN_API);
api
  .sync()
  .then(() =>
    api.items.add('task1', {
      priority: 4,
      due: {
        string: 'today'
      }
    })
  )
  .then(() => api.commit());

Development

  1. Clone repo and install dependencies.
npm install
  1. Create '.env' (.env.example is on the root of the repo) and insert your TOKEN_API.
  2. Build it:
npm run build

   Before every commit it will be rebuilded using pre-commit hook.

  1. Use examples to test your changes.

Contributing

Feel free to improve the code and implement new features.

0.3.1

6 years ago

0.3.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago