Expand description
§Rust SDK for Vonage APIs
The unified Rust SDK for Vonage APIs, providing a single interface to access various Vonage services including SMS and more.
§Quick Start
§SMS API
use vonage::{Vonage, BasicAuth, SignatureAuth};
use vonage::sms::SmsRequest;
// Create a client with your API credentials using Basic Auth
let vonage = Vonage::new(BasicAuth::new("api_key", "api_secret"))?;
// Or create a client with Signature Auth (for SMS API)
let vonage_sig = Vonage::new(SignatureAuth::new("api_key", "signature_secret"))?;
// Send an SMS message
let request = SmsRequest::text("Vonage", "15551234567", "Hello from Vonage!");
let response = vonage.sms().send(&request).await?;
println!("Sent {} messages", response.message_count);§Features
- SMS: Send and receive SMS messages
- Authentication: Support for API key/secret and signature authentication
- Error Handling: Comprehensive error types and handling
- Async Support: Built with async/await from the ground up
- Regional Support: Support for different API regions
Re-exports§
pub use client::Vonage;pub use builder::VonageBuilder;pub use vonage_sms as sms;
Modules§
Structs§
- Basic
Auth - Basic Authentication using API Key and Secret
- Http
Config - Configuration for the HTTP client
- Signature
Auth - Signature Authentication using API Key and Signature Secret
Enums§
- Region
- Vonage API regions with their corresponding base URLs
- Vonage
Error - Main error type for the Vonage SDK
Traits§
- Auth
- Trait for authentication methods that can generate HTTP headers
Type Aliases§
- Result
- Result type used throughout the Vonage SDK