joined_rooms: new API call

that was added in r0.3.0
This commit is contained in:
Florian Jacob 2018-04-26 23:34:43 +02:00 committed by Jonas Platte
parent d48fc54c96
commit 14fbaf698f
2 changed files with 25 additions and 0 deletions

View File

@ -5,6 +5,7 @@ pub mod forget_room;
pub mod invite_user;
pub mod join_room_by_id;
pub mod join_room_by_id_or_alias;
pub mod joined_rooms;
pub mod kick_user;
pub mod leave_room;
pub mod unban_user;

View File

@ -0,0 +1,24 @@
//! [GET /_matrix/client/r0/joined_rooms](https://matrix.org/docs/spec/client_server/r0.4.0.html#get-matrix-client-r0-joined-rooms)
use ruma_api_macros::ruma_api;
use ruma_identifiers::RoomId;
use serde_derive::{Deserialize, Serialize};
ruma_api! {
metadata {
description: "Get a list of the user's current rooms.",
method: GET,
name: "joined_rooms",
path: "/_matrix/client/r0/joined_rooms",
rate_limited: false,
requires_authentication: true,
}
request {}
response {
/// A list of the rooms the user is in, i.e.
/// the ID of each room in which the user has joined membership.
pub joined_rooms: Vec<RoomId>,
}
}