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