esi_openapi/groups/
location.rs1use crate::prelude::*;
2
3pub struct LocationGroup<'a> {
5 pub(crate) esi: &'a Esi,
6}
7
8#[derive(Debug, Deserialize)]
9#[allow(missing_docs)]
10pub struct LocationInfo {
11 pub solar_system_id: i32,
12 pub station_id: Option<i32>,
13 pub structure_id: Option<i64>,
14}
15
16#[derive(Debug, Deserialize)]
17#[allow(missing_docs)]
18pub struct OnlineStatus {
19 pub last_login: Option<String>,
20 pub last_logout: Option<String>,
21 pub logins: Option<i32>,
22 pub online: bool,
23}
24
25#[derive(Debug, Deserialize)]
26#[allow(missing_docs)]
27pub struct CurrentShip {
28 pub ship_item_id: i64,
29 pub ship_name: String,
30 pub ship_type_id: i32,
31}
32
33impl LocationGroup<'_> {
34 api_get!(
35 get_location,
37 "GetCharactersCharacterIdLocation",
38 RequestType::Authenticated,
39 LocationInfo,
40 (character_id: i32) => "{character_id}"
41 );
42
43 api_get!(
44 get_online,
46 "GetCharactersCharacterIdOnline",
47 RequestType::Authenticated,
48 OnlineStatus,
49 (character_id: i32) => "{character_id}"
50 );
51
52 api_get!(
53 get_ship,
55 "GetCharactersCharacterIdShip",
56 RequestType::Authenticated,
57 CurrentShip,
58 (character_id: i32) => "{character_id}"
59 );
60}