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
//! # Accessing PeeringDB data with API calls
//!
//! `peeringdb_rs` is a utility crate to help users accessing important data
//! provided by [PeeringDB](https://www.peeringdb.com/) with their [public API](https://www.peeringdb.com/apidocs).
//!
//! This is an _**unofficial**_ crate and use it with caution.
//!
//! ## Supported Data Types
//!
//! - [`net`][api_net]: [PeeringdbIx]
//! - [`org`][api_org]: [PeeringdbOrg]
//! - [`ix`][api_ix]: [PeeringdbIx]
//! - [`netixlan`][api_netixlan]: [PeeringdbNetixlan]
//!
//! Use the public function `load_peeringdb_XXXX()` to get a Vec of the corresponding data objects above.
//! For example, [load_peeringdb_net] will return a Vec of [PeeringdbNet] if success.
//!
//! Each data type also has a `load_peeringdb_XXXX_filtered()` variant that takes
//! PeeringDB API query parameters, so you can fetch a subset instead of the whole
//! table. For example, `load_peeringdb_netixlan_filtered(&[("ix_id", "26")])`
//! fetches only the netixlan records of one exchange.
//!
//! [api_net]: https://www.peeringdb.com/apidocs/#tag/api/operation/list%20net
//! [api_org]: https://www.peeringdb.com/apidocs/#tag/api/operation/list%20org
//! [api_ix]: https://www.peeringdb.com/apidocs/#tag/api/operation/list%20ix
//! [api_netixlan]: https://www.peeringdb.com/apidocs/#tag/api/operation/list%20netixlan
//!
//! ## PeeringDB API key required
//!
//! It is strongly recommended to obtain a [PeeringDB API key][api_key_blog] and set the `PEERINGDB_API_KEY` environment variable.
//! Without it, the API call will likely to fail due to rate limiting.
//!
//! [api_key_blog]: https://docs.peeringdb.com/blog/api_keys/
pub use ;
pub use ;
pub use ;
pub use ;