gw2lib_model/home_instance/
cats.rs1use serde::{Deserialize, Serialize};
2
3use crate::{BulkEndpoint, Endpoint, EndpointWithId};
4
5pub type CatId = u32;
6
7#[derive(Clone, Debug, Serialize, Deserialize)]
8#[cfg_attr(test, serde(deny_unknown_fields))]
9pub struct Cat {
10 pub id: CatId,
11 pub hint: String,
12}
13
14impl EndpointWithId for Cat {
15 type IdType = CatId;
16}
17impl Endpoint for Cat {
18 const AUTHENTICATED: bool = false;
19 const LOCALE: bool = false;
20 const URL: &'static str = "v2/home/cats";
21 const VERSION: &'static str = "2023-08-14T00:00:00.000Z";
22}
23
24impl BulkEndpoint for Cat {
25 const ALL: bool = true;
26
27 fn id(&self) -> &Self::IdType {
28 &self.id
29 }
30}