ruma_client_api/reporting/
report_user.rs1pub mod v3 {
6 use ruma_common::{
11 OwnedUserId,
12 api::{auth_scheme::AccessToken, request, response},
13 metadata,
14 };
15
16 metadata! {
17 method: POST,
18 rate_limited: true,
19 authentication: AccessToken,
20 history: {
21 unstable => "/_matrix/client/unstable/org.matrix.msc4260/users/{user_id}/report",
22 1.14 => "/_matrix/client/v3/users/{user_id}/report",
23 }
24 }
25
26 #[request(error = crate::Error)]
28 pub struct Request {
29 #[ruma_api(path)]
31 pub user_id: OwnedUserId,
32
33 pub reason: String,
35 }
36
37 #[response(error = crate::Error)]
39 #[derive(Default)]
40 pub struct Response {}
41
42 impl Request {
43 pub fn new(user_id: OwnedUserId, reason: String) -> Self {
45 Self { user_id, reason }
46 }
47 }
48
49 impl Response {
50 pub fn new() -> Self {
52 Self {}
53 }
54 }
55}