eversal-esi 0.1.0

Eve Online's ESI API library for Rust and Eversal projects
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
}