rustfm_scraper/models/
mod.rs

1//! Represents data retrieved from the Last.fm API and stored locally in files
2
3use serde::Deserialize;
4
5pub mod recent_tracks;
6pub mod saved_scrobbles;
7pub mod user;
8
9#[derive(Deserialize)]
10#[serde(untagged)]
11pub enum ApiResponse<T> {
12    Success(T),
13    Failure(ErrorResponse),
14}
15
16#[derive(Debug, Deserialize)]
17pub struct ErrorResponse {
18    pub error: i32,
19    pub message: String,
20}