synapse_admin_api/rooms/room_members/
v1.rs1use ruma::{
3 api::{metadata, request, response, Metadata},
4 OwnedRoomId, OwnedUserId, UInt,
5};
6
7const METADATA: Metadata = metadata! {
8 method: GET,
9 rate_limited: false,
10 authentication: AccessToken,
11 history: {
12 unstable => "/_synapse/admin/v1/rooms/{room_id}/members",
13 }
14};
15
16#[request]
17pub struct Request {
18 #[ruma_api(path)]
20 pub room_id: OwnedRoomId,
21}
22
23#[response]
24pub struct Response {
25 pub members: Vec<OwnedUserId>,
27
28 pub total: UInt,
30}
31
32impl Request {
33 pub fn new(room_id: OwnedRoomId) -> Self {
35 Self { room_id }
36 }
37}
38
39impl Response {
40 pub fn new(members: Vec<OwnedUserId>, total: UInt) -> Self {
42 Self { members, total }
43 }
44}