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