Crates.io | ncmapi2 |
lib.rs | ncmapi2 |
version | 0.1.13 |
source | src |
created_at | 2024-04-21 15:30:54.551125 |
updated_at | 2024-04-21 15:30:54.551125 |
description | NetEase Cloud Music API for Rust. |
homepage | https://github.com/two-mountains/ncmapi-rs |
repository | https://github.com/two-mountains/ncmapi-rs |
max_upload_size | |
id | 1215470 |
size | 134,440 |
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(())
}
Most of the functions are self documented. If there is some confusion about the params of a funtion requires, figure out here
// failures:
// 专辑订阅
api::tests::test_album_sub,
api::tests::test_album_sublist, types::tests::test_de_artist_sublist,
// 艺术家订阅
api::tests::test_artist_sub,
api::tests::test_artist_sublist,
// 发布评论
api::tests::test_comment_create,
// 每日签到
api::tests::test_daily_signin,
// FM 垃圾
api::tests::test_fm_trash,
// 收藏/收藏列表
api::tests::test_like,
api::tests::test_likelist,
// 手机号登录,刷新登录
api::tests::test_login_phone,
api::tests::test_login_refresh,
// 推荐播放列表,推荐歌曲
api::tests::test_recommend_resource, types::tests::test_de_recommended_playlists,
api::tests::test_recommend_songs, types::tests::test_de_recommended_songs,
// 用户相关
api::tests::test_user_cloud, types::tests::test_de_user_cloud,
api::tests::test_user_level,
api::tests::test_user_record,
api::tests::test_user_subcount,
If you think this package useful, please do make pull requests.