twilio-async
Example Usage
An async and ergonomic wrapper around Twilio API & TwiML.
All types can run run()
or a similar function. They return a value that implements Deserialize
.
The examples/
dir has up to date working example code.
Messages:
async
Calls:
let twilio = new?;
let = twilio
.call
.run.await?;
Twiml:
use Response;
let resp = new
.say // builder pattern also supports say(Say::new("Hello World").lang("de")...)
.play
.build;
let s = "<Response><Say voice=\"man\" language=\"en\" loop=\"1\">Hello World</Say><Play loop=\"1\">https://api.twilio.com/Cowbell.mp3</Play></Response>";
assert_eq!;
Contributing
There is untested code for conferences/recordings.
The TwiML work is complete and has some test coverage.
PRs and suggestions are welcome.