pub mod v3 {
use ruma_common::{
OwnedRoomId,
api::{auth_scheme::AccessToken, request, response},
metadata,
};
metadata! {
method: POST,
rate_limited: true,
authentication: AccessToken,
history: {
unstable => "/_matrix/client/unstable/org.matrix.msc4151/rooms/{room_id}/report",
1.13 => "/_matrix/client/v3/rooms/{room_id}/report",
}
}
#[request(error = crate::Error)]
pub struct Request {
#[ruma_api(path)]
pub room_id: OwnedRoomId,
#[serde(default)]
pub reason: String,
}
#[response(error = crate::Error)]
#[derive(Default)]
pub struct Response {}
impl Request {
pub fn new(room_id: OwnedRoomId, reason: String) -> Self {
Self { room_id, reason }
}
}
impl Response {
pub fn new() -> Self {
Self {}
}
}
}