Skip to main content

ncm_api_rs/api/
artist_new_mv.rs

1use super::Query;
2use crate::error::Result;
3/// 关注歌手新 MV
4/// 对应 Node.js module/artist_new_mv.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9    /// 关注歌手新 MV
10    /// 对应 /artist/new/mv
11    pub async fn artist_new_mv(&self, query: &Query) -> Result<ApiResponse> {
12        let before = query.get_or("before", &chrono::Utc::now().timestamp_millis().to_string());
13        let data = json!({
14            "limit": query.get_or("limit", "20"),
15            "startTimestamp": before
16        });
17        self.request(
18            "/api/sub/artist/new/works/mv/list",
19            data,
20            query.to_option(CryptoType::Weapi),
21        )
22        .await
23    }
24}