alfred-twitter-toolkit
alfred-twitter-toolkit copied to clipboard
Add support for `dm @username` to compose a new message
trafficstars
Ideally Alfred would offer autocomplete, but that's too advanced for me...
Since DMs require numerical user IDs, I'll have to find a way to convert a username to the corresponding user ID and then initiate a new DM URL in the form:
https://twitter.com/messages/{var:userId}-{query}?text=
And also add a non-exporting userId to the environmental variables.
This could possibly be implemented as a List Filter where the flow would be like:
- Authenticate a local Twitter client to get one's followee list; store the list containing IDs, usernames, and display names
- Load this list as a CSV into a List Filter
- Use
dmto access type-to-suggest completion using that List Filter in Alfred's UI - upon actioning, open the URL prefilled with
https://twitter.com/messages/{var:userId}-{query}(wherequeryis the user ID of the recipient) - if a space is typed after the username, use that text to prefill message text