Todoist API Deno

This is a port from the official TypeScript API client for the Todoist REST API.

Installation

import { TodoistApi } from "https://deno.land/x/todoist/mod.ts";

Usage

An example of initializing the API client and fetching a user's tasks:

import { TodoistApi } from "https://deno.land/x/todoist/mod.ts";

const api = new TodoistApi("YOURTOKEN");

api.getTasks()
  .then((tasks) => console.log(tasks))
  .catch((error) => console.log(error));

Documentation

For more detailed reference documentation, have a look at the API documentation with TypeScript examples.

Development and Testing

Instead of having an example app in the repository to assist development and testing, you can create a scratch.ts file. This allows us to have a file locally that can import and utilize the API while developing or reviewing pull requests without having to manage a separate app project.

  • Add a file named scratch.ts in the root folder.
  • Import and call the relevant modules and run the scratch file.

Example scratch.ts file:

import { TodoistApi } from "./mod.ts";

const token = "YOURTOKEN";
const api = new TodoistApi(token);

api.getProjects()
  .then((projects) => {
    console.log(projects);
  })
  .catch((error) => console.error(error));

Releases

A new version is published to the Deno Third Party Registry whenever a new release on GitHub is created.

Feedback

Any feedback, such as bugs, questions, comments, etc. can be reported as Issues in this repository.

Contributions

We would also love contributions in the form of Pull requests in this repository.