/ticktick-api-lvt

📅 a ticktick api wrapper package to be used in node based projects.

Primary LanguageTypeScriptMIT LicenseMIT

TICKTICK API WRAPPER


maintance contributions

FeaturesRequirementsUsageDevelopmentAboutCommunity

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