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
//! <p align="center">
//! <picture>
//! <source media="(prefers-color-scheme: dark)" srcset="./img/textbelt-rs-transparent-dark-theme.png">
//! <source media="(prefers-color-scheme: light)" srcset="./img/textbelt-rs-transparent-light-theme.png">
//! <img src="./img/textbelt-rs-transparent-dark-theme.png" alt="textbelt-rs logo" width='250' />
//! </picture>
//! </p>
//
//! <hr />
//!
//! `textbelt-rs` is a Rust library for [textbelt](https://textbelt.com/). :crab:
//!
//! Textbelt is an SMS API that is built for developers who just want to send and receive SMS. Sending an SMS is a simple thing. The goal is to provide an API that is correspondingly simple, without requiring account configuration, logins, or extra recurring billing.
//!
//! Official API documentation: <https://docs.textbelt.com/>
//!
//! Use "**TextbeltClient**" struct.
//!
//! ```
//! use textbelt::*;
//!
//! let tc = TextbeltClient::new("Your textbelt API Key", None);
//! let phone = "+33601020304";
//! let message = "Hello from textbelt-rs!";
//! tc.text(&phone, &message).await?;
//! ```
//!
use Value;
/// # How to send an text SMS?
///
/// ```
/// use textbelt::*;
///
/// let tc = TextbeltClient::new("Your textbelt API Key", None);
/// let phone = "+33601020304";
/// let message = "Hello from textbelt-rs API!\nNoodle/g0h4n";
/// tc.text(&phone, &message).await?;
/// ```
/// # How to check the delivery status?
///
/// ```rust
/// let tc = TextbeltClient::new("Your textbelt API Key", None);
/// let text_id = "text_id";
/// tc.status(&text_id).await?;
/// ```
/// # How to check the api key quota?
///
/// ```rust
/// let tc = TextbeltClient::new("Your textbelt API Key", None);
/// tc.quota().await?
/// ```
/// TextbeltClient structure
/// <https://docs.textbelt.com/>