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