Crates.io | xe621 |
lib.rs | xe621 |
version | 0.6.3 |
source | src |
created_at | 2020-02-08 19:30:53.340059 |
updated_at | 2020-02-09 14:50:38.080035 |
description | Rust crate for the E621 API (a large online archive of furry art). |
homepage | |
repository | https://github.com/Xe-forks/rs621 |
max_upload_size | |
id | 206427 |
size | 2,654,775 |
Rust bindings for the e621.net API.
E621 is a large online archive of furry (anthropomorphic) art. rs621
provides
easy-to-use bindings to its public HTTP API. It uses the reqwest
crate to make
the requests over HTTPS.
First, create a Client
. You have to provide a descriptive User-Agent for your
project. The official API encourages you to include your E621 username so that
you may be contacted if your project causes problems.
let client = Client::new("MyProject/1.0 (by username on e621)")?;
Now it's ready to go! For example you can get post #8595 like this:
let post = client.get_post(8595)?;
assert_eq!(post.id, 8595);
Or you can make a search like on the website, using tags:
println!("A list of cool fluffy posts:");
for post in client.post_search(&["fluffy", "rating:s"][..]).take(20) {
println!("#{}", post?.id);
}
rs621
uses the rust-openssl
crate. It has some
requirements:
On Linux:
On Windows and macOS:
See reqwest on crates.io for more details.
rs621
is licensed under the terms of both the MIT license and the Apache
License (Version 2.0), at your choice.
See LICENSE-MIT and LICENSE-APACHE-2.0 files for the full texts.