use crate::{model::clones::CharacterClones, scope::ClonesScopes, Client, Error, ScopeBuilder};
pub struct ClonesEndpoints<'a> {
client: &'a Client,
}
impl<'a> ClonesEndpoints<'a> {
pub(super) fn new(client: &'a Client) -> Self {
Self { client }
}
define_endpoint! {
auth_get get_clones(
access_token: &str,
character_id: i64
) -> Result<CharacterClones, Error>
url = "{}/characters/{}/clones";
label = "clones";
required_scopes = ScopeBuilder::new()
.clones(ClonesScopes::new().read_clones())
.build();
}
define_endpoint! {
auth_get get_active_implants(
access_token: &str,
character_id: i64
) -> Result<Vec<i64>, Error>
url = "{}/characters/{}/implants";
label = "implants for active clone";
required_scopes = ScopeBuilder::new()
.clones(ClonesScopes::new().read_implants())
.build();
}
}