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
//! The official Rust client library for the [InternetData](https://internetdata.io)
//! API: the licensed IP intelligence databases, their metadata and their
//! checksums.
//!
//! Start with [`Client::builder`] and an API key carrying the `db.download`
//! scope. Every database published today is licensed, so a keyless client is
//! answered `401` - the key is nevertheless OPTIONAL, and a client built without
//! one sends no `Authorization` header at all. There is no per-address lookup
//! here: the whole API is the database catalog and the files behind it, reached
//! through [`Client::database`].
//!
//! ```no_run
//! # async fn run() -> Result<(), internetdata::Error> {
//! let client = internetdata::Client::builder().api_key("your-api-key").build()?;
//!
//! for database in client.database().list().await? {
//! println!("{}: {}", database.base, database.standing);
//! }
//! # Ok(())
//! # }
//! ```
//!
//! # Your catalog is not everyone's catalog
//!
//! A database commissioned for a single customer is ABSENT from
//! [`DatabaseApi::list`] for an organization that does not license it, rather
//! than present with an [`Standing::Unlicensed`] standing. The server decides what
//! you may see, so treat the listing as this key's answer: do not build a
//! catalog from any other source, and do not reuse one organization's listing
//! for another key.
//!
//! # Async only
//!
//! Everything here is `async` on tokio, and there is no blocking facade.
//! `reqwest::blocking` builds its own runtime and PANICS when constructed inside
//! one, so a facade would fail for exactly the callers most likely to reach for
//! it. A caller with no runtime writes the three lines that make the cost
//! visible:
//!
//! ```no_run
//! # fn run() -> Result<(), Box<dyn std::error::Error>> {
//! let runtime = tokio::runtime::Runtime::new()?;
//! let client = internetdata::Client::builder().api_key("your-api-key").build()?;
//! let databases = runtime.block_on(client.database().list())?;
//! # let _ = databases;
//! # Ok(())
//! # }
//! ```
pub use ;
pub use DatabaseApi;
pub use ;
use models;
// The v2 wire types, re-exported from the generated models so a consumer never
// names the module path. The spec still describes the legacy v1 endpoints and
// their schemas are generated too; they are not re-exported, because this crate
// targets v2 alone.
pub use Format;
pub use ;
pub use Formats;
pub use Outcome;
pub use ;