use super::Query;
use crate::error::Result;
use crate::request::{ApiClient, ApiResponse, CryptoType};
use serde_json::json;
impl ApiClient {
pub async fn mlog_music_rcmd(&self, query: &Query) -> Result<ApiResponse> {
let data = json!({
"id": query.get_or("mvid", "0").parse::<i64>().unwrap_or(0),
"type": 2,
"rcmdType": 20,
"limit": query.get_or("limit", "10").parse::<i64>().unwrap_or(10),
"extInfo": serde_json::to_string(&json!({
"songId": query.get_or("songid", "")
})).unwrap_or_default()
});
self.request(
"/api/mlog/rcmd/feed/list",
data,
query.to_option(CryptoType::default()),
)
.await
}
}