Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/niuhuan/pica-rust
Rust哔卡漫画API
https://github.com/niuhuan/pica-rust
acg bika cosplay pica picacg picacomic picacomic-api r-18 rust
Last synced: 17 days ago
JSON representation
Rust哔卡漫画API
- Host: GitHub
- URL: https://github.com/niuhuan/pica-rust
- Owner: niuhuan
- License: mit
- Created: 2021-11-15T03:22:03.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T14:24:58.000Z (4 months ago)
- Last Synced: 2024-10-19T04:09:25.132Z (3 months ago)
- Topics: acg, bika, cosplay, pica, picacg, picacomic, picacomic-api, r-18, rust
- Language: Rust
- Homepage:
- Size: 45.9 KB
- Stars: 30
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
PICA-RUST
===========
Rust哔卡漫画API## 实现功能
- [x] 用户
- [x] 注册 / 登录 / 获取用户信息 / 打卡
- [x] 漫画
- [x] 分类 / 随机本子 / 获取章节 / 获取图片
- [x] 收藏漫画 / 喜欢漫画
- [x] 获取漫画评论 / 对漫画发表评论及回复
- [x] 搜索漫画
- [x] 网络
- [x] 代理 / 分流## 使用方法
在Cargo.toml中增加依赖
```toml
[dependencies]
pica = { git = "https://github.com/niuhuan/pica-rust.git", branch = "master" }
```调用客户端
```rust
use pica::{Client, Sort, SwitchAddress};async fn main() {
// 创建客户端并设置分流
let client = Client::new();
client.set_proxy(None, None);
// 登录或注入token (选择其一)
client.login("username", "password").await.unwarp();
client.set_token("token").await;
// 获取漫画列表
client.comics(None, None, None, None, Sort::SORT_DEFAULT, 1);
// ...
}
```