Skip to main content

ncm_api_rs/api/
artist_mv.rs

1use super::Query;
2use crate::error::Result;
3/// 歌手 MV
4/// 对应 Node.js module/artist_mv.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9    /// 歌手 MV
10    /// 对应 /artist/mv
11    pub async fn artist_mv(&self, query: &Query) -> Result<ApiResponse> {
12        let data = json!({
13            "artistId": query.get_or("id", "0"),
14            "limit": query.get_or("limit", "30").parse::<i64>().unwrap_or(30),
15            "offset": query.get_or("offset", "0").parse::<i64>().unwrap_or(0),
16            "total": true
17        });
18        self.request("/api/artist/mvs", data, query.to_option(CryptoType::Weapi))
19            .await
20    }
21}