Skip to main content

ncm_api_rs/api/
recommend_songs.rs

1use super::Query;
2use crate::error::Result;
3/// 每日推荐歌曲
4/// 对应 Node.js module/recommend_songs.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9    /// 每日推荐歌曲(需要登录)
10    /// 对应 /recommend/songs
11    pub async fn recommend_songs(&self, query: &Query) -> Result<ApiResponse> {
12        let data = json!({});
13        self.request(
14            "/api/v3/discovery/recommend/songs",
15            data,
16            query.to_option(CryptoType::Weapi),
17        )
18        .await
19    }
20}