ncm_api_rs/api/artists.rs
1use super::Query;
2use crate::error::Result;
3/// 歌手信息
4/// 对应 Node.js module/artists.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9 /// 歌手信息
10 /// 对应 /artists
11 pub async fn artists(&self, query: &Query) -> Result<ApiResponse> {
12 let data = json!({});
13 self.request(
14 &format!("/api/v1/artist/{}", query.get_or("id", "0")),
15 data,
16 query.to_option(CryptoType::Weapi),
17 )
18 .await
19 }
20}