synapse_admin_api/users/get_details/
v2.rs1use ruma::{
4 api::{metadata, request, response, Metadata},
5 OwnedUserId,
6};
7
8pub use crate::users::UserDetails;
9
10const METADATA: Metadata = metadata! {
11 method: GET,
12 rate_limited: false,
13 authentication: AccessToken,
14 history: {
15 unstable => "/_synapse/admin/v2/users/{user_id}",
16 }
17};
18
19#[request]
20pub struct Request {
21 #[ruma_api(path)]
23 pub user_id: OwnedUserId,
24}
25
26#[response]
27pub struct Response {
28 #[ruma_api(body)]
30 pub details: UserDetails,
31}
32
33impl Request {
34 pub fn new(user_id: OwnedUserId) -> Self {
36 Self { user_id }
37 }
38}
39
40impl Response {
41 pub fn new(details: UserDetails) -> Self {
43 Self { details }
44 }
45}