Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucasvtiradentes/ticktick-api-lvt
📅 a ticktick api wrapper package to be used in node based projects.
https://github.com/lucasvtiradentes/ticktick-api-lvt
api-wrapper nodejs ticktick ticktick-api typescript
Last synced: 2 months ago
JSON representation
📅 a ticktick api wrapper package to be used in node based projects.
- Host: GitHub
- URL: https://github.com/lucasvtiradentes/ticktick-api-lvt
- Owner: lucasvtiradentes
- License: mit
- Created: 2022-12-02T20:15:44.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-30T16:04:09.000Z (9 months ago)
- Last Synced: 2024-10-27T23:23:36.685Z (2 months ago)
- Topics: api-wrapper, nodejs, ticktick, ticktick-api, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/ticktick-api-lvt
- Size: 720 KB
- Stars: 11
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
TICKTICK API WRAPPER
Features • Requirements • Usage • Development • About • Communitysee table of content
## :trumpet: Overview
This is a [ticktick](ticktick.com) api wrapper developed to be used on [Node.js](https://nodejs.org/en) based projects.
> :warning: **warning**: As of Jan 2024 Ticktick requires a captcha token in order to authenticate user on login. I'm working in order to implement it on this package, but have not yet succeeded. More details on [this issue](https://github.com/lucasvtiradentes/ticktick-api-lvt/issues/13).
✔️ type safe api methods by using [zod](https://github.com/colinhacks/zod) validation;
✔️ methods for common actions, find more [here](./src/routes/);
✔️ support to china [api version](https://api.dida365.com) [thanks to [@quanru](https://github.com/quanru)];
✔️ custom headers required in order to make api calls [thanks to [@thesamim](https://github.com/thesamim)].
In order to use this project in your computer, you need to have the following items:
- [npm](https://www.npmjs.com/): To install the package. Npm is installed alongside nodejs;
- [nodejs](https://nodejs.org/en/): To actually run the package.
To use it from the registry, first install the npm package:
```bash
# Install the package
npm install ticktick-api-lvt
```
And you can normally use it in your code as it follows:
```typescript
import { Tick } from 'ticktick-api-lvt';
async function main() {
const username = 'your_username';
const password = 'your_password';
const tickInstance = new Ticktick({ username, password });
// LOGIN =====================================================================
await tickInstance.auth.login();
// METHODS ===================================================================
console.log(await tickInstance.user.getUserInformation());
console.log(await tickInstance.user.getUserDailyReminder());
console.log(await tickInstance.user.getUserSettings());
console.log(await tickInstance.tags.getTags());
console.log(await tickInstance.tasks.getCompletedTasks());
}
main();
```
To see further usage, check out the provided [example](./examples/dev-example.ts).
### Development setup
To setup this project in your computer, download it in this link or run the following commands:
```bash
# 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:
```bash
# Install dependencies using npm
$ 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:
```bash
# 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:
## License
This project is distributed under the terms of the MIT License Version 2.0. A complete version of the license is available in the [LICENSE](LICENSE) file in this repository. Any contribution made to this project will be licensed under the MIT License Version 2.0.