diff options
author | Daniel Schadt <kingdread@gmx.de> | 2019-12-07 03:16:43 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2019-12-07 03:16:43 +0100 |
commit | c09d449902f529db6fe390b22307a237124410de (patch) | |
tree | 64c04077d2795ae4f288f4fed05e1996238d122c /src/api/legends.rs | |
parent | d35534c0795caeda46e57fc515b74eba701110a2 (diff) | |
download | kondou-c09d449902f529db6fe390b22307a237124410de.tar.gz kondou-c09d449902f529db6fe390b22307a237124410de.tar.bz2 kondou-c09d449902f529db6fe390b22307a237124410de.zip |
add chatlink + revenant legends support
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() + } +} |