Welcome to the community. @htadashi
For example, when designing a node for interacting with an API, should we make its operations as close as possible to the API requests (e.g. one API call per node operation)? I think that could be a good practice since it will avoid unexpected behavior for someone who is used to the API. On the other hand, some beginner users could find the API calls too complex, and it would be better to do many API calls in a single node operation…
If understood well, it depends on the operation. Normally we try to make it as easy as possible for the customer. For example, imagine that you need your node to create a charge. To do so, the API needs to call two different endpoints:
Endpoint 1: Create a card, which returns a Card ID.
Endpoint 2: Create the change, referencing the Card ID.
In this case, we would probably have the functionality charge:create
, asking all the parameters to create a card and all the parameters to create a charge. Later, when the node is executed, we first call the first endpoint, grab the Card ID, and then create the charge.
I hope that makes sense.