raycast / extensions

Everything you need to extend Raycast.
https://developers.raycast.com
MIT License
5.24k stars 2.95k forks source link

[TickTick] Include priority when adding task #10048

Closed D-Pagey closed 6 months ago

D-Pagey commented 8 months ago

Extension

https://www.raycast.com/appest/ticktick

Description

The extension is great, however I wish I could set the priority when adding a task. I found the applescript code but when I tried to include the priority arguement, I kept getting AppleScript errors.

On a side note - why use apple script as opposed to TickTicks REST API? Using the REST API wouldn't be reliant on having the actual TickTick Mac application installed.

Who will benefit from this feature?

I assume lots of TickTick users make use of the priority system of organising their todos.

Anything else?

const result = (await runAppleScript(`
    set result to ""
    tell application "TickTick"
      set result to add task to list "${projectId}" title "${title}" description "${description}"${
      dueDate ? ` due date "${dueDate}"` : ""
    } priority ${3} from "raycast" ${isAllDay ? "with" : "without"} allday
    end tell
  `))  

This didnt work for me, I saw from the types that priority is a number.

raycastbot commented 8 months ago

Thank you for opening this issue!

🔔 @viduycheung @viduycheung @Alireza29675 you might want to have a look.

💡 Author and Contributors commands The author and contributors of `appest/ticktick` can trigger bot actions by commenting: - `@raycastbot close this issue` Closes the issue. - `@raycastbot rename this issue to "Awesome new title"` Renames the issue. - `@raycastbot reopen this issue` Reopen the issue.
viduycheung commented 8 months ago

This Apple Script doesn't support priority syntax yet.

The REST API needs user authentication, and TickTick Open API has a limit on that and it also doesn't work when the user has no internet connection.

D-Pagey commented 8 months ago

A lot of the Raycast extensions involve the user logging in and proving their own API key.

Being able to set priority seems like a pretty fundamental feature to any To Do app imo. Enough so to warrant having a go with the REST API.

Happy to have a look at integrating it if it'd be a welcome addition.

raycastbot commented 6 months ago

This issue has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 10 days to keep our backlog clean 😊

raycastbot commented 6 months ago

This issue has been automatically closed due to inactivity.

Feel free to comment in the thread when you're ready to continue working on it 🙂

You can also catch us in Slack if you want to discuss this.