1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use url::Url;
use crate::SongId;

pub use crate::types::song::SongDetailResp;

use crate::QQMusicApi;

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

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