https://github.com/raybb/node-ticktick-api
TickTick API module for Node.js
https://github.com/raybb/node-ticktick-api
nodejs rest-api ticktick
Last synced: 9 months ago
JSON representation
TickTick API module for Node.js
- Host: GitHub
- URL: https://github.com/raybb/node-ticktick-api
- Owner: RayBB
- License: mit
- Created: 2017-08-16T20:34:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-02T16:29:00.000Z (over 7 years ago)
- Last Synced: 2025-03-25T06:33:10.317Z (9 months ago)
- Topics: nodejs, rest-api, ticktick
- Language: JavaScript
- Size: 7.81 KB
- Stars: 33
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TickTick API
A Node.js module for using the UNOFFICIAL API for TickTick.com
There is no official API available so this uses the API based on calls their site makes. Since it's undocumented it may change at any time and this module may stop working.
## Usage
All you need is your TickTick login and you can begin adding tasks.
```javascript
let tick = require('./tick.js')
async function main() {
let t = await new tick({ username: "email@email.com", password: "supersecurestuff" });
let due = new Date("04 August 2018 14:48");
due = due.toISOString().replace("Z", "+0000"); // The api only accepts dates in this format
options = {title: "Update the API wrapper", dueDate: due}
await t.addTask(options);
}
main();
```
## Promises
Each function returns a promise. The login function returns a promise with a new object that has the cookies stored for the login session.
If an error occurs at any part of the request a request will be thrown.
## API
### tick.addTask(options);
Adds a task to the inbox of the logged in user.
```javascript
tick.addTask({title: "my great task"});
```
## Contributing
As you can see, this repo is still in it's infancy. If you're like to contribute feel free to open an issue or make a pull request.
## TODO
These are features I may add in the future
* Mark task completed
* Get list of current tasks
* Add task with due date