use ruma::{
OwnedRoomId, OwnedUserId, UInt,
api::{auth_scheme::AccessToken, metadata, request, response},
};
metadata! {
method: GET,
rate_limited: false,
authentication: AccessToken,
path: "/_synapse/admin/v1/users/{user_id}/joined_rooms",
}
#[request]
pub struct Request {
#[ruma_api(path)]
pub user_id: OwnedUserId,
}
#[response]
pub struct Response {
pub joined_rooms: Vec<OwnedRoomId>,
pub total: UInt,
}
impl Request {
pub fn new(user_id: OwnedUserId) -> Self {
Self { user_id }
}
}
impl Response {
pub fn new(joined_rooms: Vec<OwnedRoomId>, total: UInt) -> Self {
Self { joined_rooms, total }
}
}