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
//! ### Usage
//! ```
//! use booru::{danbooru::{DanbooruClient, DanbooruRating}, Sort, Client};
//!
//! #[tokio::main]
//! async fn main() {
//! let posts = DanbooruClient::builder()
//! .default_url("https://testbooru.donmai.us")
//! .rating(DanbooruRating::General)
//! .sort(Sort::Score)
//! .build()
//! .get()
//! .await
//! .expect("There was an error. (•-•)");
//!
//! match posts.first() {
//! Some(post) => println!("{:?}", post),
//! None => panic!("Well... \"No posts found?\""),
//! }
//! }
//! ```
pub mod client;
pub mod model;
// Conveience
pub use client::{generic::Sort, Client};
pub mod safebooru {
pub use crate::client::safebooru::*;
pub use crate::model::safebooru::*;
}
pub mod gelbooru {
pub use crate::client::gelbooru::*;
pub use crate::model::gelbooru::*;
}
pub mod danbooru {
pub use crate::client::danbooru::*;
pub use crate::model::danbooru::*;
}