synapse_admin_api/users/list_joined_rooms/
v1.rs1use ruma::{
4 OwnedRoomId, OwnedUserId, UInt,
5 api::{auth_scheme::AccessToken, metadata, request, response},
6};
7
8metadata! {
9 method: GET,
10 rate_limited: false,
11 authentication: AccessToken,
12 path: "/_synapse/admin/v1/users/{user_id}/joined_rooms",
13}
14
15#[request]
16pub struct Request {
17 #[ruma_api(path)]
19 pub user_id: OwnedUserId,
20}
21
22#[response]
23pub struct Response {
24 pub joined_rooms: Vec<OwnedRoomId>,
26
27 pub total: UInt,
29}
30
31impl Request {
32 pub fn new(user_id: OwnedUserId) -> Self {
34 Self { user_id }
35 }
36}
37
38impl Response {
39 pub fn new(joined_rooms: Vec<OwnedRoomId>, total: UInt) -> Self {
41 Self { joined_rooms, total }
42 }
43}