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
use ;
/// Request body for banning a user
///
/// If `duration` is provided, this is a timeout (temporary ban).
/// If `duration` is `None`, this is a permanent ban.
///
/// # Example
/// ```
/// use kick_api::BanRequest;
///
/// // Permanent ban
/// let ban = BanRequest {
/// broadcaster_user_id: 12345,
/// user_id: 67890,
/// reason: Some("Spamming".to_string()),
/// duration: None,
/// };
///
/// // 10-minute timeout
/// let timeout = BanRequest {
/// broadcaster_user_id: 12345,
/// user_id: 67890,
/// reason: Some("Cool off".to_string()),
/// duration: Some(600),
/// };
/// ```
/// Request body for unbanning a user
///
/// # Example
/// ```
/// use kick_api::UnbanRequest;
///
/// let unban = UnbanRequest {
/// broadcaster_user_id: 12345,
/// user_id: 67890,
/// };
/// ```