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
use super::GetFlag;
use super::{Gender, GetFlag::*, Results};
use serde::Deserialize;
pub const STAFF_FLAGS: [GetFlag; 5] = [Basic, Details, Aliases, Vns, Voiced];
#[derive(Deserialize, Debug, PartialEq)]
pub struct GetStaffResults {
#[serde(flatten)]
pub results: Results,
pub items: Vec<GetStaffResponse>,
}
#[derive(Deserialize, Debug, PartialEq)]
pub struct GetStaffResponse {
pub id: usize,
pub name: Option<String>,
#[serde(rename = "original")]
pub original_name: Option<String>,
pub gender: Option<Gender>,
pub language: Option<String>,
pub links: Option<Links>,
pub description: Option<String>,
pub aliases: Option<Vec<(usize, String, String)>>,
pub main_alias: Option<usize>,
pub vns: Option<Vec<Vn>>,
pub voiced: Option<Vec<CV>>,
}
#[derive(Deserialize, Debug, PartialEq)]
pub struct Links {
pub homepage: Option<String>,
pub wikipedia: Option<String>,
pub twitter: Option<String>,
#[serde(rename = "anidb")]
pub anidb_id: Option<usize>,
pub pixiv: Option<String>,
pub wikidata: Option<String>,
}
#[derive(Deserialize, Debug, PartialEq)]
pub struct Vn {
pub id: usize,
#[serde(rename = "aid")]
pub alias_id: usize,
pub role: String,
pub note: Option<String>,
}
#[derive(Deserialize, Debug, PartialEq)]
pub struct CV {
#[serde(rename = "id")]
pub vn_id: usize,
#[serde(rename = "aid")]
pub alias_id: usize,
#[serde(rename = "cid")]
pub character_id: usize,
pub note: Option<String>,
}