pub mod unstable {
use std::time::Duration;
use ruma_common::{
api::{auth_scheme::NoAccessToken, request, response},
metadata,
};
metadata! {
method: GET,
rate_limited: true,
authentication: NoAccessToken,
history: {
unstable => "/_matrix/client/unstable/io.element.msc4388/rendezvous/{id}",
}
}
#[request]
pub struct Request {
#[ruma_api(path)]
pub id: String,
}
impl Request {
pub fn new(id: String) -> Self {
Self { id }
}
}
#[response]
pub struct Response {
pub sequence_token: String,
pub data: String,
#[serde(with = "ruma_common::serde::duration::ms", rename = "expires_in_ms")]
pub expires_in: Duration,
}
impl Response {
pub fn new(sequence_token: String, data: String, expires_in: Duration) -> Self {
Self { sequence_token, data, expires_in }
}
}
}