aboutsummaryrefslogtreecommitdiff
path: root/src/api/skills.rs
diff options
context:
space:
mode:
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
+ }
+}