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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
//! AGHPB API wrapper for 🦀Rust.
//!
//! Copyright (c) 2023-present Goldy
//!
//! -------------
//!
//! # Examples
//!
//! ### How to search for an anime girl holding a programming book.
//! ```rust
//! use std::error::Error;
//!
//! use tokio::fs;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn Error>> {
//! let books = aghpb::search("tohru".into(), None, None).await?;
//!
//! let book_data = &books[0]; // I'm selecting the first book just for this example.
//!
//! println!("Name: {}", book_data.name);
//! println!("Category: {}", book_data.category);
//! println!("Commit Author: {}", book_data.commit_author);
//! println!("Commit URL: {}", book_data.commit_url);
//! println!("Date Added: {}", book_data.date_added);
//! println!("Search ID: {}", book_data.search_id);
//!
//! let book = book_data.get_book().await?;
//!
//! fs::write("./anime_girl.png", book.raw_bytes).await?;
//!
//! Ok(())
//! }
//! ```
//!
//! ### How to retrieve a random anime girl holding a programming book.
//! ```rust
//! use tokio::fs;
//! use std::error::Error;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn Error>> {
//! let book = aghpb::random(None).await?;
//!
//! let details = book.details;
//!
//! println!("Name: {}", details.name);
//! println!("Category: {}", details.category);
//! println!("Date added: {}", details.date_added);
//!
//! fs::write("./anime_girl.png", book.raw_bytes).await?;
//!
//! Ok(())
//! }
//! ```
//!
//! ### How to retrieve a list of available categories.
//! ```rust
//! use std::error::Error;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn Error>> {
//! let categories = aghpb::categories().await?;
//!
//! for category in categories {
//! println!("{}", category);
//! }
//!
//! Ok(())
//! }
//! ```
//!
pub use *;
pub use *;
use ;
static _CLIENT: = new;
/// Asynchronously grabs a random anime girl holding a programming book.
///
/// NOTE: Use aghpb::Client for multiple requests. This uses a global client!
/// If you want more customization/speed it maybe preferable to make
/// your own client.
///
/// Uses the ``/v1/random`` endpoint.
pub async
/// Asynchronously grabs list of available categories.
///
/// NOTE: Use aghpb::Client for multiple requests. This uses a global client!
/// If you want more customization/speed it maybe preferable to make
/// your own client.
///
/// Uses the ``/v1/categories`` endpoint.
pub async
/// Allows you to search for anime girls holding programming books.
///
/// NOTE: Use aghpb::Client for multiple requests. This uses a global client!
/// If you want more customization/speed it maybe preferable to make
/// your own client.
///
/// Uses the ``/v1/search`` endpoint.
pub async
/// Allows you to get a specific anime girls holding programming book by search ID.
///
/// NOTE: Use aghpb::Client for multiple requests. This uses a global client!
/// If you want more customization/speed it maybe preferable to make
/// your own client.
///
/// Uses the ``/v1/search`` endpoint.
pub async