ncm_api_rs/api/
comment_mv.rs1use super::Query;
2use crate::error::Result;
3use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9 pub async fn comment_mv(&self, query: &Query) -> Result<ApiResponse> {
12 let id = query.get_or("id", "0");
13 let data = json!({
14 "rid": id,
15 "limit": query.get_or("limit", "20").parse::<i64>().unwrap_or(20),
16 "offset": query.get_or("offset", "0").parse::<i64>().unwrap_or(0),
17 "beforeTime": query.get_or("before", "0").parse::<i64>().unwrap_or(0)
18 });
19 self.request(
20 &format!("/api/v1/resource/comments/R_MV_5_{}", id),
21 data,
22 query.to_option(CryptoType::Weapi),
23 )
24 .await
25 }
26}