pub mod v3 {
use std::collections::BTreeMap;
use ruma_common::{
api::{request, response, Metadata},
metadata,
thirdparty::Protocol,
};
const METADATA: Metadata = metadata! {
method: GET,
rate_limited: false,
authentication: AccessToken,
history: {
1.0 => "/_matrix/client/r0/thirdparty/protocols",
1.1 => "/_matrix/client/v3/thirdparty/protocols",
}
};
#[request(error = crate::Error)]
#[derive(Default)]
pub struct Request {}
#[response(error = crate::Error)]
pub struct Response {
#[ruma_api(body)]
pub protocols: BTreeMap<String, Protocol>,
}
impl Request {
pub fn new() -> Self {
Self {}
}
}
impl Response {
pub fn new(protocols: BTreeMap<String, Protocol>) -> Self {
Self { protocols }
}
}
}