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
//! An unofficial, async Rust client for the [Namecheap](https://www.namecheap.com)
//! API.
//!
//! This crate wraps the parts of the Namecheap API needed to check, register,
//! and configure domains, so you do not have to hand-roll HTTP requests and XML
//! parsing. It is **not** affiliated with or endorsed by Namecheap.
//!
//! # Supported commands
//!
//! - [`Client::domains().check()`](domains::Domains::check) -
//! `namecheap.domains.check`
//! - [`Client::domains().create()`](domains::Domains::create) -
//! `namecheap.domains.create`
//! - [`Client::domains().list()`](domains::Domains::list) -
//! `namecheap.domains.getList`
//! - [`Client::domains().set_auto_renew()`](domains::Domains::set_auto_renew) -
//! `namecheap.domains.setAutoRenew`
//! - [`Client::domains().dns().get_hosts()`](domains::Dns::get_hosts) -
//! `namecheap.domains.dns.getHosts`
//! - [`Client::domains().dns().set_hosts()`](domains::Dns::set_hosts) -
//! `namecheap.domains.dns.setHosts`
//! - [`Client::users().get_balances()`](users::Users::get_balances) -
//! `namecheap.users.getBalances`
//!
//! # Requirements
//!
//! Every request is authenticated with your API user, API key, and account
//! username, and must originate from an IP address you have whitelisted in the
//! Namecheap API settings. That same address is sent as the `ClientIp`
//! parameter, so it must match your real outbound public IPv4 address.
//!
//! # Example
//!
//! ```no_run
//! use namecheap_client::{Client, Environment};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), namecheap_client::Error> {
//! let client = Client::builder()
//! .api_user("your-api-user")
//! .api_key("your-api-key")
//! .client_ip("203.0.113.10") // your whitelisted public IPv4
//! .environment(Environment::Sandbox)
//! .build()?;
//!
//! for result in client.domains().check(["example.com", "rust-lang.org"]).await? {
//! println!("{}: available = {}", result.domain, result.available);
//! }
//!
//! Ok(())
//! }
//! ```
//!
//! # TLS backends
//!
//! By default the crate uses [`rustls`](https://github.com/rustls/rustls) so it
//! builds without a system OpenSSL installation. To use the platform-native TLS
//! stack instead, disable default features and enable `native-tls`:
//!
//! ```toml
//! namecheap-client = { version = "0.1", default-features = false, features = ["native-tls"] }
//! ```
pub use ;
pub use ;
pub use ;
pub use ;