ruwuma/ruma-client-api/src/r0/room/report_content.rs
Jonas Platte 6329cd471e Add 'ruma-client-api/' from commit '632eb9d520028816c5fb7224bd0aca8d1e3793f1'
git-subtree-dir: ruma-client-api
git-subtree-mainline: e5233c49f610f866e3c9bf8529a0613171fc2fe4
git-subtree-split: 632eb9d520028816c5fb7224bd0aca8d1e3793f1
2020-06-05 17:11:09 +02:00

37 lines
946 B
Rust

//! [POST /_matrix/client/r0/rooms/{roomId}/report/{eventId}](https://matrix.org/docs/spec/client_server/r0.6.0#post-matrix-client-r0-rooms-roomid-report-eventid)
use js_int::Int;
use ruma_api::ruma_api;
use ruma_identifiers::{EventId, RoomId};
ruma_api! {
metadata {
description: "Report content as inappropriate.",
method: POST,
name: "report_content",
path: "/rooms/:room_id/report/:event_id",
rate_limited: false,
requires_authentication: true,
}
request {
/// Room in which the event to be reported is located.
#[ruma_api(path)]
pub room_id: RoomId,
/// Event to report.
#[ruma_api(path)]
pub event_id: EventId,
/// Integer between -100 and 0 rating offensivness.
pub score: Int,
/// Reason to report content. May be blank.
pub reason: String,
}
response {}
error: crate::Error
}