ncm_api_rs/api/playlist_mylike.rs
1use super::Query;
2use crate::error::Result;
3/// 我喜欢的歌单
4/// 对应 Node.js module/playlist_mylike.js
5use crate::request::{ApiClient, ApiResponse, CryptoType};
6use serde_json::json;
7
8impl ApiClient {
9 /// 我喜欢的歌单
10 /// 对应 /playlist/mylike
11 pub async fn playlist_mylike(&self, query: &Query) -> Result<ApiResponse> {
12 let data = json!({
13 "time": query.get_or("time", "-1"),
14 "limit": query.get_or("limit", "12")
15 });
16 self.request(
17 "/api/mlog/playlist/mylike/bytime/get",
18 data,
19 query.to_option(CryptoType::Weapi),
20 )
21 .await
22 }
23}