From c09d449902f529db6fe390b22307a237124410de Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sat, 7 Dec 2019 03:16:43 +0100 Subject: add chatlink + revenant legends support --- src/api/mod.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/api/mod.rs') 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, ApiError> { + self.get_multiple_cached("legends", "legends/", ids) + } + /// Loads the image from the given URL. /// /// This automatically caches and also decodes the resulting data. -- cgit v1.2.3