ncm_api_rs/api/mlog_to_video.rs
1use super::Query;
2use crate::error::Result;
3/// 将mlog id转为video id
4/// 对应 Node.js module/mlog_to_video.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9 /// 将mlog id转为video id
10 /// 对应 /mlog/to/video
11 pub async fn mlog_to_video(&self, query: &Query) -> Result<ApiResponse> {
12 let data = json!({
13 "mlogId": query.get_or("id", "")
14 });
15 self.request(
16 "/api/mlog/video/convert/id",
17 data,
18 query.to_option(CryptoType::Weapi),
19 )
20 .await
21 }
22}