alanvardy / tod

An unofficial Todoist command line client written in Rust
MIT License
96 stars 9 forks source link

Add "tod project delete" to delete project within Todoist #381

Open stacksjb opened 1 year ago

stacksjb commented 1 year ago

Same workflow as "tod project remove" but would delete project from Todoist (send Project delete API call)

It should first check if project is empty, and if not, either refuse to delete (or requiring some sort of force/confirmation), as API will allow you to delete a project with tasks even if it isn't empty.

stacksjb commented 1 year ago

Expected workflow:

stacksjb commented 3 months ago

Delete API call:

$ curl -X DELETE "https://api.todoist.com/rest/v2/projects/2203306141" \
    -H "X-Request-Id: $(uuidgen)" \
    -H "Authorization: Bearer 0123456789abcdef0123456789"

Would need to delete (if present) from local config as well, would recommend prompting with a confirmation.