1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
pub use crate::types::song::SongDetailResp;

use crate::{GETResult, QQMusicApi, SongId};

pub trait SongDetail {
    fn song_detail(&self, id: SongId<'_>) -> GETResult;
}

impl SongDetail for QQMusicApi {
    fn song_detail(&self, id: SongId<'_>) -> GETResult {
        let mut url = self.base_url.clone();
        url.set_path("/song");
        url.set_query(Some(&id.to_string()));

        http::Request::builder()
            .method("GET")
            .uri(url.as_str())
            .body(())
    }
}