rusty_booru/lib.rs
1//! ### Usage
2//! ```
3//! use rusty_booru::{danbooru::{client::DanbooruClient, DanbooruRating}};
4//! use rusty_booru::shared::{client::{WithClientBuilder, DispatcherTrait}, Sort};
5//!
6//! #[tokio::main]
7//! async fn main() {
8//! let posts = DanbooruClient::builder()
9//! .default_url("https://testbooru.donmai.us")
10//! .query(|q| {
11//! q.rating(DanbooruRating::General)
12//! .sort(Sort::Score)
13//! .limit(10)
14//! })
15//! .get()
16//! .await
17//! .expect("There was an error. (•-•)");
18//!
19//! match posts.first() {
20//! Some(post) => println!("{:?}", post),
21//! None => panic!("Well... \"No posts found?\""),
22//! }
23//! }
24//! ```
25
26pub mod danbooru;
27pub mod gelbooru;
28pub mod safebooru;
29pub mod shared;
30pub mod generic;