| Crates.io | rusty_twilio |
| lib.rs | rusty_twilio |
| version | 0.1.1 |
| created_at | 2025-04-04 23:25:41.685582+00 |
| updated_at | 2025-04-04 23:30:36.334071+00 |
| description | A Rust library for interacting with the Twilio API |
| homepage | |
| repository | https://github.com/rwxbytes/rusty_twilio |
| max_upload_size | |
| id | 1621017 |
| size | 170,476 |
Contributions are welcome.
use rusty_twilio::endpoints::voice::call::{CreateCall, CreateCallBody};
use rusty_twilio::{Result, TwilioClient};
#[tokio::main]
async fn main() -> Result<()> {
let client = TwilioClient::from_env()?;
let body = CreateCallBody::new("to", "from", "http://demo.twilio.com/docs/voice.xml");
// or to set other fields
//let body = CreateCallBody {
// to: "to",
// from: "from",
// url: Some("http://demo.twilio.com/docs/voice.xml"),
// status_callback: Some("http://example.com/callback"),
// status_callback_event_initiated: Some(true),
// status_callback_event_answered: Some(true),
// ..Default::default()
//};
let endpoint = CreateCall::new(client.account_sid(), body);
let resp = client.hit(endpoint).await?;
println!("{:?}", resp);
Ok(())
}