18 lines
351 B
Rust
18 lines
351 B
Rust
use restson::{Error, RestPath};
|
|
use serde::Deserialize;
|
|
|
|
use super::SeriesId as Id;
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
pub struct Series {
|
|
pub id: Id,
|
|
|
|
#[serde(flatten)]
|
|
pub unknown: serde_json::Value,
|
|
}
|
|
|
|
impl RestPath<Id> for Series {
|
|
fn get_path(id: Id) -> std::result::Result<String, Error> {
|
|
Ok(format!("series/{id}"))
|
|
}
|
|
}
|