14 个版本
0.1.13 | 2022 年 8 月 18 日 |
---|---|
0.1.12 | 2022 年 6 月 30 日 |
0.1.11 | 2022 年 5 月 22 日 |
0.1.8 | 2021 年 9 月 14 日 |
0.1.1 | 2021 年 7 月 6 日 |
#458 in #api-client
每月 72 下载
130KB
3K SLoC
ncmapi-rs
NetEase Cloud Music API for Rust.
用法
[dependencies]
ncmapi = "0.1"
tokio = { version = "1", features = ["full"] }
use ncmapi::NcmApi;
#[tokio::main]
async fn main() -> std::result::Result<(), Box<dyn std::error:Error>> {
let api = NcmApi::default();
let resp = api.cloud_search("mota", None).await;
let res = resp.unwrap().deserialize_to_implict();
println!("{:#?}", res);
Ok(())
}
文档
大多数函数都有自文档。如果对函数所需的参数有疑问,请在此处查看 此处
工作原理
- api: 导出 API 函数。
- client
- 接收一个 ApiRequst,通过添加头信息和加密有效负载等处理它,然后向服务器发送请求,接收响应然后返回 ApiResponse。
- cache
贡献
如果您认为此软件包有用,请提交拉取请求。
许可协议
依赖项
~11–24MB
~389K SLoC