Skip to main content

ncm_api_rs/api/
dj_paygift.rs

1use super::Query;
2use crate::error::Result;
3/// 付费电台
4/// 对应 Node.js module/dj_paygift.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9    /// 付费电台
10    /// 对应 /dj/paygift
11    pub async fn dj_paygift(&self, query: &Query) -> Result<ApiResponse> {
12        let data = json!({
13            "limit": query.get_or("limit", "30").parse::<i64>().unwrap_or(30),
14            "offset": query.get_or("offset", "0").parse::<i64>().unwrap_or(0),
15            "_nmclfl": 1
16        });
17        self.request(
18            "/api/djradio/home/paygift/list",
19            data,
20            query.to_option(CryptoType::Weapi),
21        )
22        .await
23    }
24}