Crates.io | e621-rs |
lib.rs | e621-rs |
version | 0.1.3 |
source | src |
created_at | 2020-07-26 22:55:54.337228 |
updated_at | 2021-05-22 00:48:08.494149 |
description | A library which can be used to access the e621/e926 API |
homepage | |
repository | |
max_upload_size | |
id | 269893 |
size | 9,062 |
Add latest the library to your Cargo.tml
Cargo.toml:
...
[dependencies]
e621-rs = "0.1.2"
tokio = { version = "1.0", features = ["full"] }
main.rs
use e621_rs::e621_client::Client;
use e621_rs::requests::PostsListOptions;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new(
String::from("https://e621.net"),
String::from("MyProject/1.0 (by username on e621)"),
String::from("username"),
String::from("apikey")
).unwrap();
let res = client.post_list(
PostsListOptions {
limit: Some(32),
tags: Some(String::from("lucario")),
page: None
}
).await;
println!("{:?}", res);
Ok(())
}