Implement UserPlayingNowListen

This commit is contained in:
Koen Bolhuis 2021-01-10 19:31:06 +01:00
parent 14428576a8
commit ad89493233
1 changed files with 17 additions and 1 deletions

View File

@ -87,7 +87,23 @@ pub struct UserPlayingNowResponse {
pub struct UserPlayingNowPayload {
pub count: u8,
pub user_id: String,
pub listens: Vec<()>,
pub listens: Vec<UserPlayingNowListen>,
}
#[derive(Debug, Deserialize)]
pub struct UserPlayingNowListen {
pub user_name: String,
pub inserted_at: String,
pub recording_msid: String,
pub track_metadata: UserPlayingNowTrackMetadata,
}
#[derive(Debug, Deserialize)]
pub struct UserPlayingNowTrackMetadata {
pub artist_name: String,
pub track_name: String,
pub release_name: Option<String>,
pub additional_info: HashMap<String, serde_json::Value>,
}
// -------- user/{user_name}/listens