Skip to main content

ncm_api_rs/api/
search_default.rs

1use super::Query;
2use crate::error::Result;
3/// 默认搜索关键词
4/// 对应 Node.js module/search_default.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9    /// 默认搜索关键词
10    /// 对应 /search/default
11    pub async fn search_default(&self, query: &Query) -> Result<ApiResponse> {
12        let data = json!({});
13        self.request(
14            "/api/search/defaultkeyword/get",
15            data,
16            query.to_option(CryptoType::default()),
17        )
18        .await
19    }
20}