diff options
Diffstat (limited to 'src/api/legends.rs')
-rw-r--r-- | src/api/legends.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/api/legends.rs b/src/api/legends.rs new file mode 100644 index 0000000..395d6b9 --- /dev/null +++ b/src/api/legends.rs @@ -0,0 +1,23 @@ +//! Struct definitions for the legends API endpoint. +//! +//! * [Example](https://api.guildwars2.com/v2/legends/Legend2) +//! * [Wiki](https://wiki.guildwars2.com/wiki/API:2/legends) + +use super::HasId; +use serde::{Deserialize, Serialize}; + +#[derive(Deserialize, Serialize, Debug, Clone)] +pub struct Legend { + /// The legend id. + pub id: String, + pub heal: u32, + pub elite: u32, + pub utilities: Vec<u32>, +} + +impl HasId for Legend { + type Id = String; + fn get_id(&self) -> String { + self.id.clone() + } +} |