ruma_client_api/rendezvous/
get_rendezvous_session.rs1pub mod unstable {
6 use std::time::Duration;
11
12 use ruma_common::{
13 api::{auth_scheme::NoAuthentication, request, response},
14 metadata,
15 };
16
17 metadata! {
18 method: GET,
19 rate_limited: true,
20 authentication: NoAuthentication,
21 history: {
22 unstable("io.element.msc4388") => "/_matrix/client/unstable/io.element.msc4388/rendezvous/{id}",
23 }
24 }
25
26 #[request(error = crate::Error)]
28 pub struct Request {
29 #[ruma_api(path)]
31 pub id: String,
32 }
33
34 impl Request {
35 pub fn new(id: String) -> Self {
37 Self { id }
38 }
39 }
40
41 #[response(error = crate::Error)]
42 pub struct Response {
44 pub sequence_token: String,
46
47 pub data: String,
49
50 #[serde(with = "ruma_common::serde::duration::ms", rename = "expires_in_ms")]
52 pub expires_in: Duration,
53 }
54
55 impl Response {
56 pub fn new(sequence_token: String, data: String, expires_in: Duration) -> Self {
58 Self { sequence_token, data, expires_in }
59 }
60 }
61}