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
use ruma::api::ruma_api;
ruma_api! {
metadata: {
description: "Get the Synapse and Python version of this homeserver.",
method: GET,
name: "get_server_version_v1",
unstable_path: "/_synapse/admin/v1/server_version",
rate_limited: false,
authentication: None,
}
#[derive(Default)]
request: {}
response: {
pub server_version: String,
pub python_version: String,
}
}
impl Request {
pub fn new() -> Self {
Self {}
}
}
impl Response {
pub fn new(server_version: String, python_version: String) -> Self {
Self { server_version, python_version }
}
}