aboutsummaryrefslogtreecommitdiff
path: root/src/api/mod.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2019-12-07 03:16:43 +0100
committerDaniel Schadt <kingdread@gmx.de>2019-12-07 03:16:43 +0100
commitc09d449902f529db6fe390b22307a237124410de (patch)
tree64c04077d2795ae4f288f4fed05e1996238d122c /src/api/mod.rs
parentd35534c0795caeda46e57fc515b74eba701110a2 (diff)
downloadkondou-c09d449902f529db6fe390b22307a237124410de.tar.gz
kondou-c09d449902f529db6fe390b22307a237124410de.tar.bz2
kondou-c09d449902f529db6fe390b22307a237124410de.zip
add chatlink + revenant legends support
Diffstat (limited to 'src/api/mod.rs')
-rw-r--r--src/api/mod.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/api/mod.rs b/src/api/mod.rs
index 6e1b457..41034ec 100644
--- a/src/api/mod.rs
+++ b/src/api/mod.rs
@@ -3,13 +3,15 @@
//! It contains `Deserialize`able definitions for the required API responses, as well as a wrapper
//! around the HTTP library. Note that only the required fields are modelled here, which means this
//! does not provide a full-featured mapping for all API types.
+pub mod legends;
pub mod professions;
pub mod skills;
pub mod specializations;
pub mod traits;
pub use self::{
- professions::Profession, skills::Skill, specializations::Specialization, traits::Trait,
+ legends::Legend, professions::Profession, skills::Skill, specializations::Specialization,
+ traits::Trait,
};
use image::DynamicImage;
@@ -187,6 +189,13 @@ impl Api {
self.get_multiple_cached("traits", "traits/", ids)
}
+ /// Retrieve detailed information about the given legends.
+ ///
+ /// Traits that are found in the cache are taken from there.
+ pub fn get_legends(&mut self, ids: &[String]) -> Result<Vec<Legend>, ApiError> {
+ self.get_multiple_cached("legends", "legends/", ids)
+ }
+
/// Loads the image from the given URL.
///
/// This automatically caches and also decodes the resulting data.