Add room::aliases endpoint
This commit is contained in:
parent
c2cf8682e6
commit
478385f0f2
@ -6,6 +6,10 @@ Breaking changes:
|
|||||||
`Option<UInt>` to `UInt`
|
`Option<UInt>` to `UInt`
|
||||||
* Update strum dependency to 0.19
|
* Update strum dependency to 0.19
|
||||||
|
|
||||||
|
Improvements:
|
||||||
|
|
||||||
|
* Add `r0::room::aliases` (introduced in r0.6.1)
|
||||||
|
|
||||||
# 0.10.0
|
# 0.10.0
|
||||||
|
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
|
27
ruma-client-api/src/r0/room/aliases.rs
Normal file
27
ruma-client-api/src/r0/room/aliases.rs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
//! [PUT /_matrix/client/r0/directory/room/{roomAlias}](https://matrix.org/docs/spec/client_server/r0.6.0#put-matrix-client-r0-directory-room-roomalias)
|
||||||
|
|
||||||
|
use ruma_api::ruma_api;
|
||||||
|
use ruma_identifiers::{RoomAliasId, RoomId};
|
||||||
|
|
||||||
|
ruma_api! {
|
||||||
|
metadata: {
|
||||||
|
description: "Get a list of local aliases on a given room.",
|
||||||
|
method: PUT,
|
||||||
|
name: "create_alias",
|
||||||
|
path: "/_matrix/client/r0/directory/room/:room_id",
|
||||||
|
rate_limited: false,
|
||||||
|
requires_authentication: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
request: {
|
||||||
|
/// The room ID to get aliases of.
|
||||||
|
#[ruma_api(path)]
|
||||||
|
pub room_id: &'a RoomId,
|
||||||
|
}
|
||||||
|
|
||||||
|
response: {
|
||||||
|
aliases: &'a [RoomAliasId],
|
||||||
|
}
|
||||||
|
|
||||||
|
error: crate::Error
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user