Closed 17prime closed 1 year ago
Hi, I've assigned a member of the team to review this. Please let us know if you have any further questions!
Good point, there is no example. I've reviewed this and the expected response is simply:
{
item: {
uuid: '',
content_type: '',
content: '',
created_at: '',
updated_at: '',
}
}
So the payload inside the item
key is the same payload structure you would see if you downloaded an encrypted backup file from the Account menu and inspected the txt file.
Alas, running a simple ruby/sinatra server, I am able to populate the action menu, run a post action, but a get action (after confirming) results in: "An issue occurred while processing this action. Please try again.", even trying to return the same object/item copied from a newly created decrypted backup txt file. (running the Desktop app on linux)
The item needs to be in encrypted format it appears. Which I can see how it wouldn't make sense for all flows. Essentially the way it's currently designed is heavily geared towards the Note History service, which deals with encrypted items. We would need to modify the client code to also accept decrypted items.
OK, thanks for the clarification --- you'll probably want to update the "action" docs on the SN site, in particular, this section:
https://docs.standardnotes.org/extensions/actions#action-potential
since the possibilities don't seem nearly as endless as suggested :)
Hi @17prime, please take a look here, as @TheodoreChu has updated the page 🥳, and let us know what you think!
Hi @17prime, please take a look here, as @TheodoreChu has updated the page 🥳, and let us know what you think!
That's a start, however, a little lower on the page is the "Action Potential" section which really makes no sense --- I mean, the first "simple use case" example isn't actually possible (at least not in any manner similar to what is suggested), and the second example is really just a variation of the first, and then it ends with " The possibilities are almost endless."
I wonder if we could get a bit of documentation/specs on what a "get" action should be returning in order to replace the current note. There is no example on the docs page for actions:
https://docs.standardnotes.org/extensions/actions
nor in any of the open-source repos (Note History might provide an example, but I don't see a repo for it or CloudLink).