pub mod v3 {
use ruma_common::{
api::{request, response, Metadata},
metadata, OwnedUserId,
};
const METADATA: Metadata = metadata! {
method: GET,
rate_limited: false,
authentication: AccessToken,
history: {
1.0 => "/_matrix/client/r0/keys/changes",
1.1 => "/_matrix/client/v3/keys/changes",
}
};
#[request(error = crate::Error)]
pub struct Request {
#[ruma_api(query)]
pub from: String,
#[ruma_api(query)]
pub to: String,
}
#[response(error = crate::Error)]
pub struct Response {
pub changed: Vec<OwnedUserId>,
pub left: Vec<OwnedUserId>,
}
impl Request {
pub fn new(from: String, to: String) -> Self {
Self { from, to }
}
}
impl Response {
pub fn new(changed: Vec<OwnedUserId>, left: Vec<OwnedUserId>) -> Self {
Self { changed, left }
}
}
}