synapse_admin_api/users/list_joined_rooms/
v1.rs1use ruma::{
4 api::{metadata, request, response, Metadata},
5 OwnedRoomId, OwnedUserId, UInt,
6};
7
8const METADATA: Metadata = metadata! {
9 method: GET,
10 rate_limited: false,
11 authentication: AccessToken,
12 history: {
13 unstable => "/_synapse/admin/v1/users/{user_id}/joined_rooms",
14 }
15};
16
17#[request]
18pub struct Request {
19 #[ruma_api(path)]
21 pub user_id: OwnedUserId,
22}
23
24#[response]
25pub struct Response {
26 pub joined_rooms: Vec<OwnedRoomId>,
28
29 pub total: UInt,
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(joined_rooms: Vec<OwnedRoomId>, total: UInt) -> Self {
43 Self { joined_rooms, total }
44 }
45}