8 releases
0.2.1 | Sep 19, 2024 |
---|---|
0.2.0 | Aug 26, 2024 |
0.1.1 | Aug 1, 2024 |
0.1.0 | Apr 5, 2024 |
0.0.2 | Feb 5, 2024 |
#1560 in Web programming
414 downloads per month
Used in twilly_cli
98KB
2K
SLoC
twilly
twilly
is a helper library bringing access to Twilio's API's via Rust. The library supports a client-based approach, instantiating a twilio client with credentials before sending & receiving requests.
let config = TwilioConfig {
account_sid: "AC....",
auth_token: "auth_tok",
};
let twilio = twilly::Client::new(config);
...
let account = twilio.create_account(Some(&friendly_name))
Coverage is limited and the crate has been built alongside twilly_cli
.
lib.rs
:
This crate is an implementation of the Twilio API in Rust built upon Reqwest and Serde.
Coverage is partial yet provides an idiomatic usage pattern currently covering:
- Accounts
- Conversations
- Sync (Documents, Lists, and Maps)
This crate has been developed alongside the `twilly-cli crate which provides an enhanced Twilio CLI experience.
Example
Interaction is done via a Twilio client that can be created via the constructor. The config
parameter is a TwilioConfig
struct of an account SID & auth token pair.
let twilio = twilly::Client::new(&config);
To retrieve accounts from the client:
twilio.accounts().list(Some(&friendly_name), None);
To delete a conversation:
twilio.conversations().delete(&conversation_sid);
Dependencies
~9–29MB
~404K SLoC