1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
use warframe_macros::model;
use super::{
faction::Faction,
mission_type::MissionType,
};
/// Represents Relic tiers
#[model]
pub enum Tier {
/// Lith
Lith = 1,
/// Meso
Meso = 2,
/// Neo
Neo = 3,
/// Axi
Axi = 4,
/// Requiem
Requiem = 5,
/// Omnia
Omnia = 6,
}
/// A Fissure Mission in which you can crack Void Relics
#[model(endpoint = "/fissures", return_style = Array, timed)]
pub struct Fissure {
/// The id of the fissure
pub id: String,
/// The i18n of the mission
pub mission_type: String,
/// The type of the mission
pub mission_type_key: MissionType,
/// The i18n of the node
pub node: String,
/// The name of the node
pub node_key: String,
/// The tier i18n of the relic
#[serde(rename = "tier")]
pub tier_name: String,
/// The Tier of the relic
#[serde(rename = "tierNum")]
pub tier: Tier,
/// The i18n name of the enemy
pub enemy: String,
/// The type of the enemy
#[serde(rename = "enemyKey")]
pub faction: Faction,
/// Whether the fissure is a storm
pub is_storm: bool,
/// Whether the the fissure is hard (Steel Path)
pub is_hard: bool,
}
#[cfg(test)]
mod test_fissure {
use rstest::rstest;
use serde_json::from_str;
use super::Fissure;
use crate::worldstate::Queryable;
type R = <Fissure as Queryable>::Return;
#[rstest]
fn test(
#[files("src/worldstate/models/fixtures/fissure.json")]
#[mode = str]
fissure_en: &str,
) {
from_str::<R>(fissure_en).unwrap();
}
}