Skip to main content

ncm_api_rs/api/
album_list_style.rs

1use super::Query;
2use crate::error::Result;
3/// 数字专辑-语种风格馆
4/// 对应 Node.js module/album_list_style.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9    /// 数字专辑-语种风格馆
10    /// 对应 /album/list/style
11    pub async fn album_list_style(&self, query: &Query) -> Result<ApiResponse> {
12        let data = json!({
13            "limit": query.get_or("limit", "10").parse::<i64>().unwrap_or(10),
14            "offset": query.get_or("offset", "0").parse::<i64>().unwrap_or(0),
15            "total": true,
16            "area": query.get_or("area", "Z_H")
17        });
18        self.request(
19            "/api/vipmall/appalbum/album/style",
20            data,
21            query.to_option(CryptoType::Weapi),
22        )
23        .await
24    }
25}