diff options
Diffstat (limited to 'src/api/mod.rs')
-rw-r--r-- | src/api/mod.rs | 11 |
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. |