Closed ColinEberhardt closed 6 years ago
I couldn't agree more with this, and I am disappointed that this has not been discussed more.
I think for intents to be adopted successfully, the API needs to be really simple, and const result = await agent.sendIntent("StartCall", context);
is simple and easy to understand without any ambiguities.
Stateful objects are unnecessary here, and makes for more complicated code to write.
Completely agree with removing the Intent object and replacing with the sendIntent method.
Let's make the change.
Agree with Colin!
@ColinEberhardt We can close this now after #26, I don't have the ability to.
Great, thanks
Currently intents are used as follows:
The above code snippet highlights quite a few ambiguities.
I'd propose a simpler API, that removes the
Intent
object altogether:Much simpler!