Crates.io | ncm_api |
lib.rs | ncm_api |
version | 0.1.3 |
source | src |
created_at | 2022-06-10 06:31:44.444135 |
updated_at | 2022-06-24 04:27:51.295336 |
description | 网易云音乐API |
homepage | |
repository | |
max_upload_size | |
id | 603369 |
size | 29,530 |
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(())
}