#api #client #e621 #e926 #furry

rs621

Rust crate for the E621 API (a large online archive of furry art)

8 releases (4 breaking)

✓ Uses Rust 2018 edition

new 0.5.0-alpha2 Sep 17, 2019
0.5.0-alpha1 Sep 10, 2019
0.4.1 Sep 7, 2019
0.3.0 Jul 27, 2019
0.1.1 Jul 15, 2019

#33 in #client

Download history 45/week @ 2019-07-14 14/week @ 2019-07-21 24/week @ 2019-07-28 33/week @ 2019-08-04 13/week @ 2019-08-11 11/week @ 2019-08-18 100/week @ 2019-08-25 21/week @ 2019-09-01 47/week @ 2019-09-08

104 downloads per month

MIT/Apache

570KB
1.5K SLoC

rs621

Crates.io Docs.rs Build Status codecov GitHub license

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.

Features

  • Convenient iterator based API.
  • Post listing and searching, using any of the search options from the website.
  • Pool listing and searching.
  • Unlimited result count (automatically makes more requests in sequence to go beyond the API limit of 320 posts per request).

Usage

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);
}

Requirements

rs621 uses the rust-openssl crate. It has some requirements:

On Linux:

  • OpenSSL 1.0.1, 1.0.2, or 1.1.0 with headers (see rust-openssl).

On Windows and macOS:

  • Nothing.

See reqwest on crates.io for more details.

License

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.

Dependencies

~16MB
~388K SLoC