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