ncm_api_rs/api/
toplist_artist.rs1use super::Query;
2use crate::error::Result;
3use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9 pub async fn toplist_artist(&self, query: &Query) -> Result<ApiResponse> {
12 let data = json!({
13 "type": query.get_or("type", "1").parse::<i64>().unwrap_or(1),
14 "limit": query.get_or("limit", "100").parse::<i64>().unwrap_or(100),
15 "offset": query.get_or("offset", "0").parse::<i64>().unwrap_or(0),
16 "total": true
17 });
18 self.request(
19 "/api/toplist/artist",
20 data,
21 query.to_option(CryptoType::Weapi),
22 )
23 .await
24 }
25}