Crate twilly_cli

Source
Expand description

Twilly_cli is a CLI tool for interacting the Twilio API.

Coverage is partial yet offers a user-friendly way to interact with Twilio via the terminal. The CLI currently covers:

  • Accounts
  • Conversations

This crate has been developed alongside the twilly crate which backs the functionality of the crate.

§Features

  • Local profile memory to avoid repeatedly providing Twilio credentials.
  • Intuitive account & conversation related controls.
  • Additional helpers not found in the default Twilio CLI.

Structs§

DateRange

Enums§

ActionChoice
The possible actions a user may make.
FilterChoice
The options available to filter search results.

Traits§

InquireControl
A wrapper around the Inquire crates various input controls. This is used to abstract the prompting and handling errors or cancellations.

Functions§

get_action_choice_from_user
Gets the choice of an action from options provided as arguments. Back and Exit options will be presented also allowing the user to navigate backwards in a menu or exit.
get_date_from_user
get_filter_choice_from_user
Gets the choice of a filter from options provided as an argument. An Any option will be presented also suggesting that no specific filter is required.
prompt_user
Prompts the user for some sort of input. Takes any function that implements the InquireControl trait and returns the output from the user. If None is returned it is assumed the user un-forcefully cancelled the action, e.g. pressed ESC.
prompt_user_multi_selection
prompt_user_selection
Prompts the user a selection from the provided options. Takes any form of Inquires Select and returns the output from the user. If None is returned it is assumed the user un-forcefully cancelled the action, e.g. pressed ESC.
request_credentials
Requests Twilio Account SID and auth token pair from the user and returns it as a TwilioConfig struct.