peeringdb_rs/lib.rs
1//! # Accessing PeeringDB data with API calls
2//!
3//! `peeringdb_rs` is a utility crate to help users accessing important data
4//! provided by [PeeringDB](https://www.peeringdb.com/) with their [public API](https://www.peeringdb.com/apidocs).
5//!
6//! This is an _**unofficial**_ crate and use it with caution.
7//!
8//! ## Supported Data Types
9//!
10//! - [`net`][api_net]: [PeeringdbIx]
11//! - [`org`][api_org]: [PeeringdbOrg]
12//! - [`ix`][api_ix]: [PeeringdbIx]
13//! - [`netixlan`][api_netixlan]: [PeeringdbNetixlan]
14//!
15//! Use the public function `load_peeringdb_XXXX()` to get a Vec of the corresponding data objects above.
16//! For example, [load_peeringdb_net] will return a Vec of [PeeringdbNet] if success.
17//!
18//! [api_net]: https://www.peeringdb.com/apidocs/#tag/api/operation/list%20net
19//! [api_org]: https://www.peeringdb.com/apidocs/#tag/api/operation/list%20org
20//! [api_ix]: https://www.peeringdb.com/apidocs/#tag/api/operation/list%20ix
21//! [api_netixlan]: https://www.peeringdb.com/apidocs/#tag/api/operation/list%20netixlan
22//!
23//! ## PeeringDB API key required
24//!
25//! It is strongly recommended to obtain a [PeeringDB API key][api_key_blog] and set the `PEERINGDB_API_KEY` environment variable.
26//! Without it, the API call will likely to fail due to rate limiting.
27//!
28//! [api_key_blog]: https://docs.peeringdb.com/blog/api_keys/
29
30mod data;
31
32pub use data::{PeeringdbIx, load_peeringdb_ix};
33pub use data::{PeeringdbNet, load_peeringdb_net};
34pub use data::{PeeringdbNetixlan, load_peeringdb_netixlan};
35pub use data::{PeeringdbOrg, load_peeringdb_org};