This is useful for complex buttons that require use of the HTTP API instead of the button API.
It would be nice to have a simple
fibery.command method (or
.query, etc. methods) that takes the same payload as the API—or at least make a token available in the
context for the current user.
This alleviate a current problems:
- The “modified by” or “created by” isn’t you who created the button, but had to put your token
- You don’t expose your own token in buttons for other App admins
- It is a bit more cumbersome to set up the HTTP payload with URL, content-type, authorization, etc.
For native commands it could potentially also be faster? Since it can be executed internally, so the HTTP request doesn’t have to even go out to the internet, through DNS, SSL, other internal routing, only to go back in to Fibery and the current workspace.
As far as I can tell you would only really need two parameters in a single new method:
fibery.exec(String: command, Object?: args).