working example
This commit is contained in:
parent
aaf9781fe8
commit
e69bcfc23d
18 changed files with 1290 additions and 252 deletions
18
api/src/series.rs
Normal file
18
api/src/series.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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}"))
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue