Expand description
A client for Philomena (the software that powers boorus such as Furbooru and Derpibooru) written in Rust. The APIs for Philomena instances is near identical, so this crate can work with most of them; however it is optimized for mainline Philomena. Any time new Philomena versions change the API, this crate will follow these changes.
Usage is simple:
// don't put this in your code
unsafe {
std::env::set_var("API_USERNAME", "Alicia");
std::env::set_var("API_TOKEN", "42069");
}
let user_agent = format!(
"philomena-rs bot/0.5.0 (by {})",
std::env::var("API_USERNAME").expect("API_USERNAME must be set")
);
let cli = philomena::Client::new(
String::from("https://furbooru.org/"),
user_agent,
std::env::var("API_TOKEN").expect("API_TOKEN must be set"),
).unwrap();Set the environment variables API_USERNAME and API_TOKEN to your
Furbooru/Derpibooru username and API token respectively. Adding the username
associated with your bot to each request can help the booru staff when your bot
does unwanted things like violating rate limits.
Re-exports§
pub use comment::Comment;pub use filter::Filter;pub use firehose::FirehoseAdaptor;pub use firehose::Message;pub use forum::Forum;pub use image::Image;pub use image::ImageMeta;pub use image::Intensities;pub use image::Representations;pub use post::Post;pub use profile::Award;pub use profile::Link;pub use profile::User;pub use tag::Tag;pub use topic::Topic;
Modules§
Structs§
Type Aliases§
- Result
Result<T, Error>