ncm_api_rs/api/song_chorus.rs
1use super::Query;
2use crate::error::Result;
3/// 副歌时间
4/// 对应 Node.js module/song_chorus.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9 /// 副歌时间
10 /// 对应 /song/chorus
11 pub async fn song_chorus(&self, query: &Query) -> Result<ApiResponse> {
12 let id = query.get_or("id", "0");
13 let data = json!({
14 "ids": format!("[{}]", id),
15 });
16 self.request(
17 "/api/song/chorus",
18 data,
19 query.to_option(CryptoType::default()),
20 )
21 .await
22 }
23}