pub mod v3 {
use ruma_common::{api::ruma_api, events::tag::TagInfo, RoomId, UserId};
ruma_api! {
metadata: {
description: "Add a new tag to a room.",
method: PUT,
name: "create_tag",
r0_path: "/_matrix/client/r0/user/:user_id/rooms/:room_id/tags/:tag",
stable_path: "/_matrix/client/v3/user/:user_id/rooms/:room_id/tags/:tag",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {
#[ruma_api(path)]
pub user_id: &'a UserId,
#[ruma_api(path)]
pub room_id: &'a RoomId,
#[ruma_api(path)]
pub tag: &'a str,
#[ruma_api(body)]
pub tag_info: TagInfo,
}
#[derive(Default)]
response: {}
error: crate::Error
}
impl<'a> Request<'a> {
pub fn new(
user_id: &'a UserId,
room_id: &'a RoomId,
tag: &'a str,
tag_info: TagInfo,
) -> Self {
Self { user_id, room_id, tag, tag_info }
}
}
impl Response {
pub fn new() -> Self {
Self {}
}
}
}