ruma_appservice_api/ping/
send_ping.rs1pub mod unstable {
6 use ruma_common::{
11 OwnedTransactionId,
12 api::{request, response},
13 metadata,
14 };
15
16 use crate::HomeserverToken;
17
18 metadata! {
19 method: POST,
20 rate_limited: false,
21 authentication: HomeserverToken,
22 path: "/_matrix/app/unstable/fi.mau.msc2659/ping",
23 }
24
25 #[request]
27 #[derive(Default)]
28 pub struct Request {
29 #[serde(skip_serializing_if = "Option::is_none")]
32 pub transaction_id: Option<OwnedTransactionId>,
33 }
34
35 #[response]
37 #[derive(Default)]
38 pub struct Response {}
39
40 impl Request {
41 pub fn new() -> Self {
43 Self::default()
44 }
45 }
46
47 impl Response {
48 pub fn new() -> Self {
50 Self::default()
51 }
52 }
53}
54
55pub mod v1 {
56 use ruma_common::{
61 OwnedTransactionId,
62 api::{request, response},
63 metadata,
64 };
65
66 use crate::HomeserverToken;
67
68 metadata! {
69 method: POST,
70 rate_limited: false,
71 authentication: HomeserverToken,
72 path: "/_matrix/app/v1/ping",
73 }
74
75 #[request]
77 #[derive(Default)]
78 pub struct Request {
79 #[serde(skip_serializing_if = "Option::is_none")]
82 pub transaction_id: Option<OwnedTransactionId>,
83 }
84
85 #[response]
87 #[derive(Default)]
88 pub struct Response {}
89
90 impl Request {
91 pub fn new() -> Self {
93 Self::default()
94 }
95 }
96
97 impl Response {
98 pub fn new() -> Self {
100 Self::default()
101 }
102 }
103}