{"id":19321308,"url":"https://github.com/leshow/twilio-async","last_synced_at":"2025-04-22T19:30:48.490Z","repository":{"id":47031776,"uuid":"137623184","full_name":"leshow/twilio-async","owner":"leshow","description":"Async Hyper wrapper for Twilio API","archived":false,"fork":false,"pushed_at":"2021-11-14T01:42:27.000Z","size":126,"stargazers_count":17,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T02:23:36.867Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leshow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-17T02:20:24.000Z","updated_at":"2024-08-30T07:43:09.000Z","dependencies_parsed_at":"2022-09-08T13:12:46.219Z","dependency_job_id":null,"html_url":"https://github.com/leshow/twilio-async","commit_stats":null,"previous_names":["leshow/twilio"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leshow%2Ftwilio-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leshow%2Ftwilio-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leshow%2Ftwilio-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leshow%2Ftwilio-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leshow","download_url":"https://codeload.github.com/leshow/twilio-async/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250308206,"owners_count":21409224,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T01:36:42.375Z","updated_at":"2025-04-22T19:30:48.171Z","avatar_url":"https://github.com/leshow.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# twilio-async\n\n## Example Usage\n\nAn async and ergonomic wrapper around Twilio API \u0026 TwiML.\n\nAll types can run `run()` or a similar function. They return a value that implements `Deserialize`.\n\nThe `examples/` dir has up to date working example code.\n\nMessages:\n\n```rust\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let twilio = Twilio::new(account_sid, token)?;\n    // sending a message\n    twilio.send_msg(\"from\", \"to\", \"Hello World\").run().await?;\n    // sending a body-less message with media\n    twilio\n        .send_msg(\"from\", \"to\", \"body\")\n        .media(\"http://i0.kym-cdn.com/photos/images/newsfeed/000/377/946/0b9.jpg\")\n        .run().await?;\n    // get details about a message\n    twilio.msg(\"messagesid\").run().await?;\n    // redact a message\n    twilio.msg(\"messagesid\").redact().await?;\n    // get a msg media url\n    twilio.msg(\"messagesid\").media().await?;\n    // delete a msg\n    twilio.msg(\"messagesid\").delete().await?;\n    // get all messages\n    twilio.msgs().run().await?;\n    // get all messages between some time\n    twilio.msgs().between(\"start date\", \"end date\").run().await?;\n    // get all messages on a specific date\n    twilio.msgs().on(\"date\").run().await?;\n}\n```\n\nCalls:\n\n```rust\nlet twilio = Twilio::new(env::var(\"TWILIO_SID\")?, env::var(\"TWILIO_TOKEN\")?)?;\nlet (status, resp) = twilio\n    .call(\"from\", \"to\", \"http://demo.twilio.com/docs/voice.xml\")\n    .run().await?;\n```\n\nTwiml:\n\n```rust\nuse twilio_async::twiml::Response;\n\nlet resp = Response::new()\n    .say(\"Hello World\") // builder pattern also supports say(Say::new(\"Hello World\").lang(\"de\")...)\n    .play(\"https://api.twilio.com/Cowbell.mp3\")\n    .build();\nlet s = \"\u003cResponse\u003e\u003cSay voice=\\\"man\\\" language=\\\"en\\\" loop=\\\"1\\\"\u003eHello World\u003c/Say\u003e\u003cPlay loop=\\\"1\\\"\u003ehttps://api.twilio.com/Cowbell.mp3\u003c/Play\u003e\u003c/Response\u003e\";\nassert_eq!(resp.unwrap(), s.to_string());\n```\n\n## Contributing\n\nThere is untested code for conferences/recordings.\n\nThe TwiML work is complete and has some test coverage.\n\nPRs and suggestions are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleshow%2Ftwilio-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleshow%2Ftwilio-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleshow%2Ftwilio-async/lists"}