I’m currently developing a small Chrome Extension (Sneek Peek). The basic functionality is that you can highlight text on a website and then send all the highlights over to Dynalist.
I currently implemented it this way. In short, I add the link to the website to the inbox, wait for the node_id to come back and then insert all the highlights into the node by mapping over them.
Is this the right approach?
For me, it would feel more natural to send over a JSON object with all the nodes in one request instead of adding one node at a time.
That sounds like a reasonable addition to the API. We’ll consider how to implement this a bit later, meanwhile I’ll have this tracked on our todo list.
I don’t know that (Sadly). I just query all the files and per default set the first file in the list as the Inbox. Therefore the highlighter inbox in my settings is disconnected from the inbox settings in Dynalist.
Old topic, but I happen to know the answer: The “send ot inbox” API call actually returns the document ID and the new node ID. From the API docs:
{
"_code": "OK", // succeeded, an error code will be returned otherwise
"_msg": "",
"file_id": "<inbox document ID>",
"node_id": "<new node ID>",
"index": 0 // where the new item was placed in the inbox
}