pub mod v3 {
use js_int::UInt;
use ruma_common::{
api::{request, response, Metadata},
metadata,
};
const METADATA: Metadata = metadata! {
method: GET,
rate_limited: true,
authentication: AccessToken,
history: {
1.0 => "/_matrix/media/r0/config",
1.1 => "/_matrix/media/v3/config",
}
};
#[request(error = crate::Error)]
#[derive(Default)]
pub struct Request {}
#[response(error = crate::Error)]
pub struct Response {
#[serde(rename = "m.upload.size")]
pub upload_size: UInt,
}
impl Request {
pub fn new() -> Self {
Self {}
}
}
impl Response {
pub fn new(upload_size: UInt) -> Self {
Self { upload_size }
}
}
}