ruma_client_api/media/
get_media_config.rs1pub mod v3 {
6 use js_int::UInt;
11 use ruma_common::{
12 api::{request, response, Metadata},
13 metadata,
14 };
15
16 const METADATA: Metadata = metadata! {
17 method: GET,
18 rate_limited: true,
19 authentication: AccessToken,
20 history: {
21 1.0 => "/_matrix/media/r0/config",
22 1.1 => "/_matrix/media/v3/config",
23 1.11 => deprecated,
24 }
25 };
26
27 #[request(error = crate::Error)]
29 #[derive(Default)]
30 #[deprecated = "\
31 Since Matrix 1.11, clients should use `authenticated_media::get_media_config::v1::Request` \
32 instead if the homeserver supports it.\
33 "]
34 pub struct Request {}
35
36 #[response(error = crate::Error)]
38 pub struct Response {
39 #[serde(rename = "m.upload.size")]
41 pub upload_size: UInt,
42 }
43
44 #[allow(deprecated)]
45 impl Request {
46 pub fn new() -> Self {
48 Self {}
49 }
50 }
51
52 impl Response {
53 pub fn new(upload_size: UInt) -> Self {
55 Self { upload_size }
56 }
57 }
58}