Crate furbooru[−][src]
Expand description
A Furbooru and Derpibooru client written in Rust. The APIs for these two sites are near identical, so this crate can work with both; however it is optimized for Furbooru. Any time Furbooru diverges from Derpibooru, this crate will follow the Furbooru changes first.
Usage is simple:
// don't put this in your code
std::env::set_var("API_USERNAME", "Alicia");
std::env::set_var("API_TOKEN", "42069");
let user_agent = format!(
"{}/{} ({}, +{})",
env!("CARGO_PKG_NAME"),
env!("CARGO_PKG_VERSION"),
std::env::var("API_USERNAME").unwrap(),
env!("CARGO_PKG_REPOSITORY"),
);
let cli = furbooru::Client::new(
user_agent,
std::env::var("API_TOKEN").unwrap(),
).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 Definitions
Result<T, Error>