appservice-api: Use new path metadata fields

This commit is contained in:
Jonas Platte 2022-02-13 11:16:32 +01:00
parent 457726017b
commit 7b7e6206bd
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
8 changed files with 17 additions and 9 deletions

View File

@ -10,9 +10,10 @@ ruma_api! {
description: "This API is called by the homeserver when it wants to push an event (or batch of events) to the application service.",
method: PUT,
name: "push_events",
path: "/_matrix/app/v1/transactions/:txn_id",
stable_path: "/_matrix/app/v1/transactions/:txn_id",
rate_limited: false,
authentication: QueryOnlyAccessToken,
added: 1.0,
}
request: {
@ -173,7 +174,7 @@ mod tests {
.try_into_http_request::<Vec<u8>>(
"https://homeserver.tld",
SendAccessToken::IfRequired("auth_tok"),
&[ruma_api::MatrixVersion::V1_0],
&[ruma_api::MatrixVersion::V1_1],
)
.unwrap();
let json_body: serde_json::Value = serde_json::from_slice(req.body()).unwrap();

View File

@ -8,9 +8,10 @@ ruma_api! {
description: "This endpoint is invoked by the homeserver on an application service to query the existence of a given room alias.",
method: GET,
name: "query_room_alias",
path: "/_matrix/app/v1/rooms/:room_alias",
stable_path: "/_matrix/app/v1/rooms/:room_alias",
rate_limited: false,
authentication: QueryOnlyAccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,10 @@ ruma_api! {
description: "This endpoint is invoked by the homeserver on an application service to query the existence of a given user ID.",
method: GET,
name: "query_user_id",
path: "/_matrix/app/v1/users/:user_id",
stable_path: "/_matrix/app/v1/users/:user_id",
rate_limited: false,
authentication: QueryOnlyAccessToken,
added: 1.0,
}
request: {

View File

@ -10,9 +10,10 @@ ruma_api! {
description: "Fetches third party locations for a protocol.",
method: GET,
name: "get_location_for_protocol",
path: "/_matrix/app/v1/thirdparty/location/:protocol",
stable_path: "/_matrix/app/v1/thirdparty/location/:protocol",
rate_limited: false,
authentication: QueryOnlyAccessToken,
added: 1.0,
}
request: {

View File

@ -9,9 +9,10 @@ ruma_api! {
description: "Retrieve an array of third party network locations from a Matrix room alias.",
method: GET,
name: "get_location_for_room_alias",
path: "/_matrix/app/v1/thirdparty/location",
stable_path: "/_matrix/app/v1/thirdparty/location",
rate_limited: false,
authentication: QueryOnlyAccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,10 @@ ruma_api! {
description: "Fetches the metadata from the homeserver about a particular third party protocol.",
method: GET,
name: "get_protocol",
path: "/_matrix/app/v1/thirdparty/protocol/:protocol",
stable_path: "/_matrix/app/v1/thirdparty/protocol/:protocol",
rate_limited: false,
authentication: QueryOnlyAccessToken,
added: 1.0,
}
request: {

View File

@ -10,9 +10,10 @@ ruma_api! {
description: "Fetches third party users for a protocol.",
method: GET,
name: "get_user_for_protocol",
path: "/_matrix/app/v1/thirdparty/user/:protocol",
stable_path: "/_matrix/app/v1/thirdparty/user/:protocol",
rate_limited: false,
authentication: QueryOnlyAccessToken,
added: 1.0,
}
request: {

View File

@ -9,9 +9,10 @@ ruma_api! {
description: "Retrieve an array of third party users from a Matrix User ID.",
method: GET,
name: "get_user_for_user_id",
path: "/_matrix/app/v1/thirdparty/user",
stable_path: "/_matrix/app/v1/thirdparty/user",
rate_limited: false,
authentication: QueryOnlyAccessToken,
added: 1.0,
}
request: {