ticktick-node-api-oauth2
TypeScript icon, indicating that this package has built-in type declarations

0.1.14 • Public • Published

Overview

This is a Node.js wrapper for the TickTick API. It allows you to interact with your TickTick tasks programmatically. It follows OAuth2 flow based on their offical open API doc

Installation

npm install ticktick-node-api-oauth2
yarn add ticktick-node-api-oauth2

Usage

Here is an example of how to use the TickTick Node API:

import TickTick from "ticktick-node-api-oauth2";

const clientId = "your_client_id";
const clientSecret = "your_client_secret";

// AUTH ====
const authUrl = authTickTick({
  clientId,
  scopes: ["tasks:write"],
  redirectUri: "http://localhost:3000/auth/callback",
});

const tokens = await exchangeToken({
  code: "your_code",
  clientId,
  clientSecret,
  scopes: ["tasks:write"],
  redirectUri: "http://localhost:3000/auth/callback",
});

// PROJECT ====
const ticktick = new TickTickNode("your_access_token");
const project = await ticktick.fetchProjects();

License

This project is licensed under the MIT License.

Readme

Keywords

Package Sidebar

Install

npm i ticktick-node-api-oauth2

Weekly Downloads

28

Version

0.1.14

License

MIT

Unpacked Size

21.9 kB

Total Files

21

Last publish

Collaborators

  • wakki