Skip to main content

esi_openapi/groups/
clones.rs

1use crate::prelude::*;
2
3/// Endpoints for Clones
4pub struct ClonesGroup<'a> {
5    pub(crate) esi: &'a Esi,
6}
7
8#[derive(Debug, Deserialize)]
9#[allow(missing_docs)]
10pub struct CloneHome {
11    pub location_id: Option<i64>,
12    pub location_type: Option<String>,
13}
14
15#[derive(Debug, Deserialize)]
16#[allow(missing_docs)]
17pub struct JumpClone {
18    pub implants: Vec<i32>,
19    pub jump_clone_id: i32,
20    pub location_id: i64,
21    pub location_type: String,
22    pub name: Option<String>,
23}
24
25#[derive(Debug, Deserialize)]
26#[allow(missing_docs)]
27pub struct Clones {
28    pub home_location: Option<CloneHome>,
29    pub jump_clones: Vec<JumpClone>,
30    pub last_clone_jump_date: Option<String>,
31    pub last_station_change_date: Option<String>,
32}
33
34impl ClonesGroup<'_> {
35    api_get!(
36        /// Get a character's clones.
37        get_clones,
38        "GetCharactersCharacterIdClones",
39        RequestType::Authenticated,
40        Clones,
41        (character_id: i32) => "{character_id}"
42    );
43
44    api_get!(
45        /// Get a character's (active clone's) implants.
46        get_clone_implants,
47        "GetCharactersCharacterIdImplants",
48        RequestType::Authenticated,
49        Vec<u32>,
50        (character_id: i32) => "{character_id}"
51    );
52}