Skip to main content

ncm_api_rs/api/
artist_fans.rs

1use super::Query;
2use crate::error::Result;
3/// 歌手粉丝
4/// 对应 Node.js module/artist_fans.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9    /// 歌手粉丝
10    /// 对应 /artist/fans
11    pub async fn artist_fans(&self, query: &Query) -> Result<ApiResponse> {
12        let data = json!({
13            "id": query.get_or("id", "0"),
14            "limit": query.get_or("limit", "20"),
15            "offset": query.get_or("offset", "0")
16        });
17        self.request(
18            "/api/artist/fans/get",
19            data,
20            query.to_option(CryptoType::Weapi),
21        )
22        .await
23    }
24}