Crate twilly

source ·
Expand description

This crate is an synchronous 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

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 a 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);

Modules§

  • Contains Twilio account related functionality.
  • Contains Twilio conversations related functionality.

Structs§

Enums§

  • A list of possible errors from the Twilio client.
  • Available Twilio resources to access.