pub const READ_SKILLQUEUE: &str = "esi-skills.read_skillqueue.v1";
pub const READ_SKILLS: &str = "esi-skills.read_skills.v1";
pub struct SkillsScopes {
pub(super) scopes: Vec<String>,
}
impl Default for SkillsScopes {
fn default() -> Self {
Self::new()
}
}
impl SkillsScopes {
pub fn new() -> Self {
SkillsScopes { scopes: Vec::new() }
}
pub fn all() -> Self {
SkillsScopes::new().read_skillqueue().read_skills()
}
pub fn read_skillqueue(mut self) -> Self {
self.scopes.push(READ_SKILLQUEUE.to_string());
self
}
pub fn read_skills(mut self) -> Self {
self.scopes.push(READ_SKILLS.to_string());
self
}
}
#[cfg(test)]
mod skills_scopes_tests {
use crate::scope::SkillsScopes;
#[test]
fn test_skills_scopes_default() {
let skills_scopes = SkillsScopes::default();
assert_eq!(skills_scopes.scopes.len(), 0)
}
}