3 releases
0.1.3 | Jun 24, 2022 |
---|---|
0.1.2 | Jun 24, 2022 |
0.1.1 | Jun 10, 2022 |
0.1.0 |
|
#670 in Authentication
26KB
464 lines
ncm_api
Rust语言版本的网易云API.
配置
Cargo.toml添加依赖
[dependencies]
ncm_api = {version="^0.1.1"}
tokio = {version="^1"}
使用
use ncm_api::{login, user};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let email = "xxx@163.com";
let password = "password";
let data = login::login_by_email(email, password).await?;
println!("{:?}", data);
let sign_res = user::daily_sign().await?;
println!("sign res:{:?}", sign_res);
Ok(())
}
文档
lib.rs
:
网易云API库
使用
use ncm_api::{login, user};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let email = "xxx@163.com";
let password = "password";
let data = login::login_by_email(email, password).await?;
println!("{:?}", data);
let sign_res = user::daily_sign().await?;
println!("sign res:{:?}", sign_res);
Ok(())
}
Dependencies
~18–33MB
~571K SLoC