use crate::{get_authenticated, get_public};
use crate::model::corporation::{Corporation, CorporationStructure};
pub async fn get_corporation(corporation_id: i32) -> Result<Corporation, reqwest::Error> {
get_public::<Corporation>(&format!("corporations/{}", corporation_id), None).await
}
pub async fn get_corporation_structures(
corporation_id: i32,
access_token: &str,
) -> Result<Vec<CorporationStructure>, reqwest::Error> {
get_authenticated::<Vec<CorporationStructure>>(
access_token,
&format!("corporations/{}/structures", corporation_id),
None,
)
.await
}