1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
//! # ippanel-sms
//!
//! A Rust library for interacting with the IPPanel SMS web service.
//!
//! ## Features
//! - Send single or bulk SMS messages
//! - Send pattern-based (templated) messages
//! - Fetch message statuses and details
//! - Create message patterns
//! - Retrieve account credit
//! - Fetch inbox messages
//! - Fully asynchronous
//! - Strongly typed models for all API responses
//!
//! ## Examples
//!
//! ### Get Account Credit
//! ```no_run
//! use ippanel_sms::IppanelClient;
//! # tokio_test::block_on(async {
//! let client = IppanelClient::new(Some("YOUR_API_KEY".to_string()), None);
//! let credit = client.get_credit().await.unwrap();
//! println!("Credit: {}", credit);
//! # });
//! ```
//!
//! ### Send SMS
//! ```no_run
//! use ippanel_sms::IppanelClient;
//! # tokio_test::block_on(async {
//! let client = IppanelClient::new(Some("YOUR_API_KEY".to_string()), None);
//! let message_id = client.send("5000", &["09120000000"], "Hello from Rust!", "Test").await.unwrap();
//! println!("Message ID: {}", message_id);
//! # });
//! ```
//!
//! ### Get Message Info
//! ```no_run
//! use ippanel_sms::IppanelClient;
//! # tokio_test::block_on(async {
//! let client = IppanelClient::new(Some("YOUR_API_KEY".to_string()), None);
//! let msg = client.get_message(123456).await.unwrap();
//! println!("Message: {:?}", msg);
//! # });
//! ```
//!
//! ### Fetch Statuses
//! ```no_run
//! use ippanel_sms::IppanelClient;
//! # tokio_test::block_on(async {
//! let client = IppanelClient::new(Some("YOUR_API_KEY".to_string()), None);
//! let (statuses, page) = client.fetch_statuses(123456, 0, 10).await.unwrap();
//! println!("Statuses: {:?}, Page: {:?}", statuses, page);
//! # });
//! ```
//!
//! ### Fetch Inbox
//! ```no_run
//! use ippanel_sms::IppanelClient;
//! # tokio_test::block_on(async {
//! let client = IppanelClient::new(Some("YOUR_API_KEY".to_string()), None);
//! let (inbox, page) = client.fetch_inbox(1, 10).await.unwrap();
//! println!("Inbox: {:?}, Page: {:?}", inbox, page);
//! # });
//! ```
//!
//! ### Create Pattern
//! ```no_run
//! use ippanel_sms::IppanelClient;
//! # tokio_test::block_on(async {
//! let client = IppanelClient::new(Some("YOUR_API_KEY".to_string()), None);
//! let code = client.create_pattern("Your code is %code%", "Verification", &[("code".to_string(), "string".to_string())], "%", false).await.unwrap();
//! println!("Pattern code: {}", code);
//! # });
//! ```
//!
//! ### Send Pattern
//! ```no_run
//! use ippanel_sms::IppanelClient;
//! # tokio_test::block_on(async {
//! let client = IppanelClient::new(Some("YOUR_API_KEY".to_string()), None);
//! let message_id = client.send_pattern("PATTERN_CODE", "5000", "09120000000", &[("code".to_string(), "1234".to_string())]).await.unwrap();
//! println!("Pattern message ID: {}", message_id);
//! # });
//! ```
//!
//! More documentation: [GitHub](https://github.com/rustsi/ippanel-sms)
pub use *;
pub use *;
pub use *;