Skip to main content

ncm_api_rs/api/
song_singledownlist.rs

1use super::Query;
2use crate::error::Result;
3/// 已购买单曲
4/// 对应 Node.js module/song_singledownlist.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9    /// 已购买单曲
10    /// 对应 /song/singledownlist
11    pub async fn song_singledownlist(&self, query: &Query) -> Result<ApiResponse> {
12        let data = json!({
13            "limit": query.get_or("limit", "20"),
14            "offset": query.get_or("offset", "0"),
15            "total": "true",
16        });
17        self.request(
18            "/api/member/song/singledownlist",
19            data,
20            query.to_option(CryptoType::default()),
21        )
22        .await
23    }
24}