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
pub use crate::users::UserDetails;
use ruma::{api::ruma_api, UserId};
ruma_api! {
metadata: {
description: "Get information about a specific user account.",
method: GET,
name: "query_user_account_v2",
unstable_path: "/_synapse/admin/v2/users/:user_id",
rate_limited: false,
authentication: AccessToken,
}
request: {
#[ruma_api(path)]
pub user_id: &'a UserId,
}
response: {
#[ruma_api(body)]
pub details: UserDetails,
}
}
impl<'a> Request<'a> {
pub fn new(user_id: &'a UserId) -> Self {
Self { user_id }
}
}
impl Response {
pub fn new(details: UserDetails) -> Self {
Self { details }
}
}