pub const READ_CONTACTS: &str = "esi-alliances.read_contacts.v1";
pub struct AlliancesScopes {
pub(super) scopes: Vec<String>,
}
impl Default for AlliancesScopes {
fn default() -> Self {
Self::new()
}
}
impl AlliancesScopes {
pub fn new() -> Self {
AlliancesScopes { scopes: Vec::new() }
}
pub fn all() -> Self {
AlliancesScopes::new().read_contacts()
}
pub fn read_contacts(mut self) -> Self {
self.scopes.push(READ_CONTACTS.to_string());
self
}
}
#[cfg(test)]
mod alliances_scopes_tests {
use crate::scope::AlliancesScopes;
#[test]
fn test_alliances_scopes_default() {
let alliances_scopes = AlliancesScopes::default();
assert_eq!(alliances_scopes.scopes.len(), 0)
}
}