Awesome!!!
New item
Hook’s current New Item script for the Drafts app is a good example of x-callback-url usage by Hook.
Hook uses Draft’s x-callback-url 's in it’s New Item script (which is used by the Hook to New > Drafts command).
The conforming app’s x-callback-url for New Item needs to take a name (title) string as input, and return the address, that’s all. Hook is not fussy about the specific API. The method can return more than is needed. (Drafts’ API is quite generous, providing information Hook need not use, and that’s fine). Hook will then create a new bookmark for the item, caching that name (updating as necessary in the future), and it will use the URL to open the bookmark going forward.
There’s also this example: Hook to New with Momenta’s Agenda app using x-callback-url – Hook
Get Address
Drafts recently added an x-callback-url Hook can use in its Get Address tab. However, Hook has not yet been updated for this. It was / is , coincidentally, the next item on our integration update list. We hope to publish an update tomorrow on the forum.
Get Name
Get Name is mostly for legacy purpose. The Get Address command can be used to return both the address and the name of the item, in Markdown format (for convenience).
Hook’s integration documentation updates
We will soon update our Integration: How Hook Works with Your Favorite Apps – Hook, improving our examples. It would make sense for us to use Craft and Drafts as examples in our Help pages.