4 个发布
0.1.3 | 2021年5月22日 |
---|---|
0.1.2 | 2021年5月22日 |
0.1.1 | 2021年5月21日 |
0.1.0 | 2020年7月26日 |
#8 in #e621
8KB
172 代码行
e621-rs
安装
将最新库添加到您的 Cargo.toml 文件中
示例
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(())
}
依赖项
~6–18MB
~273K SLoC