ticktick-api
ticktick-api copied to clipboard
add: getStatus() and postTask() methods
Hey nice start to this cli!
I added methods for getStatus() which will return you, among other things, the projectId for your inbox. I also added a basic postTask() method for adding tasks. I added the jsdoc notation for both so hopefully it should be self explanatory.
Some notes though:
- projects that have an emoji selected as their icon, get this emoji prepended to the name which is returned, which makes it impossible to lookup projects by their name
- I only exposed a few options for adding tasks in the methods arguments, not sure what people would want to set so maybe we can adjust these. I set defaults for everything but
titleandprojectId, those are the only required fields. - TickTick seems to send an Email alerting of a new signin from an "unknown device" on every run of the cli, which is super annoying. Have you found a way to get around that? I tried setting the referer of the webapp, a browser user-agent, their "x-device" object, nothign worked :(
- Also I made the demo script executable as a script directly on the cli, so you can just run
./ticktick-demo.js, for example. I also added it as an npm script asdemo, i.e.npm run demo
Otherwise, great stuff! Keep up the good work!