Skip to main content

ncm_api_rs/api/
mv_first.rs

1use super::Query;
2use crate::error::Result;
3/// 最新 MV
4/// 对应 Node.js module/mv_first.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9    /// 最新 MV
10    /// 对应 /mv/first
11    pub async fn mv_first(&self, query: &Query) -> Result<ApiResponse> {
12        let data = json!({
13            "area": query.get_or("area", ""),
14            "limit": query.get_or("limit", "30").parse::<i64>().unwrap_or(30),
15            "total": true
16        });
17        self.request(
18            "/api/mv/first",
19            data,
20            query.to_option(CryptoType::default()),
21        )
22        .await
23    }
24}