ipbase_rs/lib.rs
1//! # ipbase-rs
2//!
3//! The [Ipbase][ipbase] crate provides an easy to use wrapper over the
4//! [ipbase api][ipbase_api].
5//!
6//! * Easy to use
7//! * Async api calls with [reqwest][reqwest]
8//! * Ready deserialized structs of the ipbase responses
9//! * Manages authentication for you, just pass your api token once
10//!
11//! ## Requirements
12//! * Your own [ipbase api key][ipbase_api]
13//! * Async runtime configured e.g. [tokio][tokio]
14//!
15//!
16//!
17//! ## Examples
18//!
19//!
20//! ## Optional Features
21//!
22//!
23//! ## Troubleshooting
24//! If you get a ResponseParsingError during usage of the crate this is very likely
25//! due to an invalid input where the ipbase api will throw an error or
26//! due to some unexpected values that were returned by the api. E.g. sometimes the api
27//! will return `false` instead of a number for certain fields or other fields were missing.
28//!
29//! In this case please check if your input is valid and if so create a bug report on the
30//! crate [repository][ipbase_rs_repo] and provide some information about your input.
31//!
32//! [ipbase]: ./api/struct.Ipbase.html
33//! [ipbase_rs_repo]: https://github.com/everapihq/ipbase-rs
34//! [ipbase_api]: https://api.ipbase.com/
35//! [reqwest]: https://crates.io/crates/reqwest
36//! [tokio]: https://crates.io/crates/tokio
37
38#![warn(missing_docs)]
39#![deny(rustdoc::bare_urls)]
40#![deny(rustdoc::invalid_codeblock_attributes)]
41#![deny(rustdoc::broken_intra_doc_links)]
42
43#[macro_use]
44extern crate serde;
45extern crate reqwest;
46extern crate serde_json;
47extern crate strum;
48#[macro_use]
49extern crate thiserror;
50
51pub mod api;
52mod error;
53pub mod models;
54mod utils;
55
56pub use api::Ipbase;
57pub use error::IpbaseError as Error;