aboutsummaryrefslogtreecommitdiff
path: root/src/api/skills.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2019-12-06 18:00:04 +0100
committerDaniel Schadt <kingdread@gmx.de>2019-12-06 18:00:04 +0100
commitd35534c0795caeda46e57fc515b74eba701110a2 (patch)
tree61036c13c2ce1b7caaf372043471bab4d0f4acd7 /src/api/skills.rs
downloadkondou-d35534c0795caeda46e57fc515b74eba701110a2.tar.gz
kondou-d35534c0795caeda46e57fc515b74eba701110a2.tar.bz2
kondou-d35534c0795caeda46e57fc515b74eba701110a2.zip
initial commit
Diffstat (limited to 'src/api/skills.rs')
-rw-r--r--src/api/skills.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/api/skills.rs b/src/api/skills.rs
new file mode 100644
index 0000000..9c692e1
--- /dev/null
+++ b/src/api/skills.rs
@@ -0,0 +1,24 @@
+//! Struct definitions for the skills API endpoint.
+//!
+//! * [Example](https://api.guildwars2.com/v2/skills/14375)
+//! * [Wiki](https://wiki.guildwars2.com/wiki/API:2/skills)
+
+use super::HasId;
+use serde::{Deserialize, Serialize};
+
+#[derive(Deserialize, Serialize, Debug, Clone)]
+pub struct Skill {
+ /// The skill id.
+ pub id: u32,
+ /// The skill name.
+ pub name: String,
+ /// A URL to an icon of the skill.
+ pub icon: String,
+}
+
+impl HasId for Skill {
+ type Id = u32;
+ fn get_id(&self) -> u32 {
+ self.id
+ }
+}