1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
pub mod v1 {
use ruma_common::api::ruma_api;
ruma_api! {
metadata: {
description: "Checks to see if the given registration token is valid.",
method: GET,
name: "check_registration_token_validity",
unstable_path: "/_matrix/client/unstable/org.matrix.msc3231/register/org.matrix.msc3231.login.registration_token/validity",
stable_path: "/_matrix/client/v1/register/m.login.registration_token/validity",
rate_limited: true,
authentication: None,
added: 1.2,
}
request: {
#[ruma_api(query)]
pub registration_token: &'a str,
}
response: {
pub valid: bool,
}
error: crate::Error
}
impl<'a> Request<'a> {
pub fn new(registration_token: &'a str) -> Self {
Self { registration_token }
}
}
impl Response {
pub fn new(valid: bool) -> Self {
Self { valid }
}
}
}