Skip to main content

ncm_api_rs/api/
dj_difm_subscribe_channels_get.rs

1use super::Query;
2use crate::error::Result;
3/// DIFM电台 - 收藏列表
4/// 对应 Node.js module/dj_difm_subscribe_channels_get.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9    /// DIFM电台 - 收藏列表
10    /// 对应 /dj/difm/subscribe/channels/get
11    pub async fn dj_difm_subscribe_channels_get(&self, query: &Query) -> Result<ApiResponse> {
12        let data = json!({
13            "sources": query.get_or("sources", "[0]")
14        });
15        self.request(
16            "/api/dj/difm/subscribe/channels/get/v2",
17            data,
18            query.to_option(CryptoType::Weapi),
19        )
20        .await
21    }
22}