Skip to main content

ncm_api_rs/api/
voice_detail.rs

1use super::Query;
2use crate::error::Result;
3/// 声音详情
4/// 对应 Node.js module/voice_detail.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9    /// 声音详情
10    /// 对应 /voice/detail
11    pub async fn voice_detail(&self, query: &Query) -> Result<ApiResponse> {
12        let data = json!({
13            "id": query.get_or("id", "")
14        });
15        self.request(
16            "/api/voice/workbench/voice/detail",
17            data,
18            query.to_option(CryptoType::Eapi),
19        )
20        .await
21    }
22}