quanru / ticktick-api-lvt

πŸ“… a ticktick api wrapper package to be used in node based projects.

Home Page:https://www.npmjs.com/package/ticktick-api-lvt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TICKTICK API WRAPPER


maintance contributions

Features β€’ Requirements β€’ Usage β€’ Development β€’ About β€’ Community

see table of content

🎺 Overview

This is a notifications microservice that implements hyped technologies, such as kafka and nestjs.

The main goal of this project was to understand key concepts of kafka and nestjs.

🎯 Features

   βœ”️ Login into ticktick;
   βœ”️ Add tasks;
   βœ”️ Get user tasks;
   βœ”️ Get user projects;
   βœ”️ Get user project groups
   βœ”️ Get user tags
   βœ”️ Get user filters
   βœ”️ Get user habits

⚠️ Requirements

In order to use this project in your computer, you need to have the following items:

  • npm: To install the package. Npm is installed alongside nodejs;
  • nodejs: To actually run the package.

If you want to make changes to the source code, it is recommended to also install the following items:

  • git: To work with version controlling;
  • vscode: Useful for editing the code. You can choose a similar editor as you wish.

πŸ’‘ Usage

To use it from the registry, first install the npm package:

# Install the package
npm install ticktick-api-lvt

And you can normally use it in your code as it follows:

import { Tick } from 'ticktick-api-lvt';

async function main() {
  const USERNAME = 'username';
  const PASSWORD = 'password';

  const tickSession = new Tick({ username: USERNAME, password: PASSWORD });
  const hasLoggedIn = await tickSession.login();
  if (!hasLoggedIn) {
    throw new Error('Coudnt login with this username/password.');
  }

  // const userPreferences = await tickSession.getUserSettings()
  // console.log(Object.keys(userPreferences))

  // const allAllTasks = await tickSession.getAllTasks();
  // console.log(allAllTasks.map((item) => item.title));

  // const tasks = await tickSession.getTasks();
  // console.log(tasks.map((item) => item.title));

  // const filters = await tickSession.getFilters();
  // console.log(filters.map((item) => item.name));

  // const projectGroups = await tickSession.getProjectGroups();
  // console.log(projectGroups.map((item) => item.name));

  // const projects = await tickSession.getProjects();
  // console.log(projects.map((item) => item.name));

  // const habits = await tickSession.getHabits();
  // console.log(habits.map((item) => item.name));

  // const tags = await tickSession.getTags();
  // console.log(tags);

  // uncomment the methods you want to see ;)
}

main();

To see further examples, check out the examples folder.

πŸ”§ Development

Development setup

To setup this project in your computer, download it in this link or run the following commands:

# Clone this repository
$ git clone https://github.com/lucasvtiradentes/ticktick-api-lvt

# Go into the repository
$ cd ticktick-api-lvt

After download it, go to the project folder and run these commands:

# Install dependencies
$ npm install

# Run the typescript code in development mode
$ npm run dev

If you want to contribute to the project, after you make the necessary changes, run these commands to check if everything is working fine:

# Compile the code into javascript
$ npm run build

# Run the compiled code in production mode
$ npm run start

Used technologies

This project uses the following thechnologies:

Scope Subject Technologies
Project Main
Setup Code linting
Commit linting
Other

Commit messages style

This project uses the best of two main conventions to commit messages validation:

So a typically valid commit message has this pattern:

πŸ”§ config: add lint-staged to the project (#2)

Also, in order to have this integration working correctly, I buld a script that we can specify only allowed types and it take care to update both commitizen and commitlint settings.

πŸ“š About

License

Boilermanager is distributed under the terms of the MIT License Version 2.0. A complete version of the license is available in the LICENSE file in this repository. Any contribution made to this project will be licensed under the MIT License Version 2.0.

πŸ‘ͺ Community

Contributing

if you want to positivily impact this project, consider:

  • ⭐ Star this repository: my goal is to impact the maximum number of developers around the world;
  • ✍️ Fix english mistakes I might have made in this project, may it be in the DOCS or even in the code (I'm a portuguese natural speaker);
  • ❀️ Say thanks: kind words have a huge impact in anyone's life;
  • πŸ’° Donate: if you want to support my work even more, consider make a small donation. I would be really happy!

Feedback

Any questions or suggestions? You are welcome to discuss it on:

LinkedIn Gmail Discord Github

Made with ❀️ by Lucas Vieira.

πŸ‘‰ See also all my projects

πŸ‘‰ See also all my articles

About

πŸ“… a ticktick api wrapper package to be used in node based projects.

https://www.npmjs.com/package/ticktick-api-lvt

License:MIT License


Languages

Language:TypeScript 99.6%Language:Shell 0.4%