ruma_client_api/rendezvous/discover_rendezvous.rs
1//! `GET /_matrix/client/*/rendezvous`
2//!
3//! Discover if the rendezvous API is available.
4
5pub mod unstable {
6 //! `unstable/io.element.msc4388` ([MSC])
7 //!
8 //! [MSC]: https://github.com/matrix-org/matrix-spec-proposals/pull/4388
9
10 use ruma_common::{
11 api::{auth_scheme::AccessTokenOptional, request, response},
12 metadata,
13 };
14
15 metadata! {
16 method: GET,
17 rate_limited: true,
18 authentication: AccessTokenOptional,
19 history: {
20 unstable => "/_matrix/client/unstable/io.element.msc4388/rendezvous",
21 }
22 }
23
24 /// Request type for the `GET` `rendezvous` endpoint.
25 #[request]
26 pub struct Request {}
27
28 impl Request {
29 /// Creates a new `Request`.
30 pub fn new() -> Self {
31 Self {}
32 }
33 }
34
35 #[response]
36 /// Response type for the `GET` `rendezvous` endpoint.
37 pub struct Response {
38 /// True if the requester is able to use the create session endpoint, false otherwise.
39 pub create_available: bool,
40 }
41
42 impl Response {
43 /// Creates a new `Response`.
44 pub fn new(create_available: bool) -> Self {
45 Self { create_available }
46 }
47 }
48}