client-api: Use new path metadata fields

This commit is contained in:
Jonas Platte 2022-02-13 11:21:49 +01:00
parent 7b7e6206bd
commit ee99486978
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
136 changed files with 426 additions and 149 deletions

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Add contact information to a user's account",
method: POST,
name: "add_3pid",
path: "/_matrix/client/r0/account/3pid/add",
r0_path: "/_matrix/client/r0/account/3pid/add",
stable_path: "/_matrix/client/v3/account/3pid/add",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Bind a 3PID to a user's account on an identity server",
method: POST,
name: "bind_3pid",
path: "/_matrix/client/r0/account/3pid/bind",
r0_path: "/_matrix/client/r0/account/3pid/bind",
stable_path: "/_matrix/client/v3/account/3pid/bind",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -9,9 +9,11 @@ ruma_api! {
description: "Change the password of the current user's account.",
method: POST,
name: "change_password",
path: "/_matrix/client/r0/account/password",
r0_path: "/_matrix/client/r0/account/password",
stable_path: "/_matrix/client/v3/account/password",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -7,9 +7,11 @@ ruma_api! {
description: "Checks to see if the given registration token is valid.",
method: GET,
name: "check_registration_token_validity",
path: "/_matrix/client/v1/register/m.login.registration_token/validity",
unstable_path: "/_matrix/client/unstable/org.matrix.msc3231/register/org.matrix.msc3231.login.registration_token/validity",
stable_path: "/_matrix/client/v1/register/m.login.registration_token/validity",
rate_limited: true,
authentication: None,
added: 1.2,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Deactivate the current user's account.",
method: POST,
name: "deactivate",
path: "/_matrix/client/r0/account/deactivate",
r0_path: "/_matrix/client/r0/account/deactivate",
stable_path: "/_matrix/client/v3/account/deactivate",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Delete a 3PID from a user's account on an identity server.",
method: POST,
name: "delete_3pid",
path: "/_matrix/client/r0/account/3pid/delete",
r0_path: "/_matrix/client/r0/account/3pid/delete",
stable_path: "/_matrix/client/v3/account/3pid/delete",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Get a list of 3rd party contacts associated with the user's account.",
method: GET,
name: "get_3pids",
path: "/_matrix/client/r0/account/3pid",
r0_path: "/_matrix/client/r0/account/3pid",
stable_path: "/_matrix/client/v3/account/3pid",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -7,9 +7,11 @@ ruma_api! {
description: "Checks to see if a username is available, and valid, for the server.",
method: GET,
name: "get_username_availability",
path: "/_matrix/client/r0/register/available",
r0_path: "/_matrix/client/r0/register/available",
stable_path: "/_matrix/client/v3/register/available",
rate_limited: true,
authentication: None,
added: 1.0,
}
request: {

View File

@ -11,9 +11,11 @@ ruma_api! {
description: "Register an account on this homeserver.",
method: POST,
name: "register",
path: "/_matrix/client/r0/register",
r0_path: "/_matrix/client/r0/register",
stable_path: "/_matrix/client/v3/register",
rate_limited: true,
authentication: None,
added: 1.0,
}
#[derive(Default)]

View File

@ -11,9 +11,11 @@ ruma_api! {
description: "Request a 3PID management token with a 3rd party email.",
method: POST,
name: "request_3pid_management_token_via_email",
path: "/_matrix/client/r0/account/3pid/email/requestToken",
r0_path: "/_matrix/client/r0/account/3pid/email/requestToken",
stable_path: "/_matrix/client/v3/account/3pid/email/requestToken",
rate_limited: false,
authentication: None,
added: 1.0,
}
request: {

View File

@ -11,9 +11,11 @@ ruma_api! {
description: "Request a 3PID management token with a phone number.",
method: POST,
name: "request_3pid_management_token_via_msisdn",
path: "/_matrix/client/r0/account/3pid/msisdn/requestToken",
r0_path: "/_matrix/client/r0/account/3pid/msisdn/requestToken",
stable_path: "/_matrix/client/v3/account/3pid/msisdn/requestToken",
rate_limited: false,
authentication: None,
added: 1.0,
}
request: {

View File

@ -11,9 +11,11 @@ ruma_api! {
description: "Request an OpenID 1.0 token to verify identity with a third party.",
name: "request_openid_token",
method: POST,
path: "/_matrix/client/r0/user/:user_id/openid/request_token",
r0_path: "/_matrix/client/r0/user/:user_id/openid/request_token",
stable_path: "/_matrix/client/v3/user/:user_id/openid/request_token",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -11,9 +11,11 @@ ruma_api! {
description: "Request that a password change token is sent to the given email address.",
method: POST,
name: "request_password_change_token_via_email",
path: "/_matrix/client/r0/account/password/email/requestToken",
r0_path: "/_matrix/client/r0/account/password/email/requestToken",
stable_path: "/_matrix/client/v3/account/password/email/requestToken",
rate_limited: false,
authentication: None,
added: 1.0,
}
request: {

View File

@ -9,9 +9,11 @@ ruma_api! {
description: "Request that a password change token is sent to the given phone number.",
method: POST,
name: "request_password_change_token_via_msisdn",
path: "/_matrix/client/r0/account/password/msisdn/requestToken",
r0_path: "/_matrix/client/r0/account/password/msisdn/requestToken",
stable_path: "/_matrix/client/v3/account/password/msisdn/requestToken",
rate_limited: false,
authentication: None,
added: 1.0,
}
request: {

View File

@ -11,9 +11,11 @@ ruma_api! {
description: "Request a registration token with a 3rd party email.",
method: POST,
name: "request_registration_token_via_email",
path: "/_matrix/client/r0/register/email/requestToken",
r0_path: "/_matrix/client/r0/register/email/requestToken",
stable_path: "/_matrix/client/v3/register/email/requestToken",
rate_limited: false,
authentication: None,
added: 1.0,
}
request: {

View File

@ -11,9 +11,11 @@ ruma_api! {
description: "Request a registration token with a phone number.",
method: POST,
name: "request_registration_token_via_msisdn",
path: "/_matrix/client/r0/register/msisdn/requestToken",
r0_path: "/_matrix/client/r0/register/msisdn/requestToken",
stable_path: "/_matrix/client/v3/register/msisdn/requestToken",
rate_limited: false,
authentication: None,
added: 1.0,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Unbind a 3PID from a user's account on an identity server.",
method: POST,
name: "unbind_3pid",
path: "/_matrix/client/r0/account/3pid/unbind",
r0_path: "/_matrix/client/r0/account/3pid/unbind",
stable_path: "/_matrix/client/v3/account/3pid/unbind",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Get information about the owner of a given access token.",
method: GET,
name: "whoami",
path: "/_matrix/client/r0/account/whoami",
r0_path: "/_matrix/client/r0/account/whoami",
stable_path: "/_matrix/client/v3/account/whoami",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Add an alias to a room.",
method: PUT,
name: "create_alias",
path: "/_matrix/client/r0/directory/room/:room_alias",
r0_path: "/_matrix/client/r0/directory/room/:room_alias",
stable_path: "/_matrix/client/v3/directory/room/:room_alias",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Remove an alias from a room.",
method: DELETE,
name: "delete_alias",
path: "/_matrix/client/r0/directory/room/:room_alias",
r0_path: "/_matrix/client/r0/directory/room/:room_alias",
stable_path: "/_matrix/client/v3/directory/room/:room_alias",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Resolve a room alias to a room ID.",
method: GET,
name: "get_alias",
path: "/_matrix/client/r0/directory/room/:room_alias",
r0_path: "/_matrix/client/r0/directory/room/:room_alias",
stable_path: "/_matrix/client/v3/directory/room/:room_alias",
rate_limited: false,
authentication: None,
added: 1.0,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Updates the visibility of a given room on the application service's room directory.",
method: PUT,
name: "set_room_visibility",
path: "/_matrix/client/r0/directory/list/appservice/:network_id/:room_id",
r0_path: "/_matrix/client/r0/directory/list/appservice/:network_id/:room_id",
stable_path: "/_matrix/client/v3/directory/list/appservice/:network_id/:room_id",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -12,9 +12,12 @@ ruma_api! {
description: "Store several keys in the backup.",
method: PUT,
name: "add_backup_key_session",
path: "/_matrix/client/unstable/room_keys/keys/:room_id/:session_id",
unstable_path: "/_matrix/client/unstable/room_keys/keys/:room_id/:session_id",
r0_path: "/_matrix/client/r0/room_keys/keys/:room_id/:session_id",
stable_path: "/_matrix/client/v3/room_keys/keys/:room_id/:session_id",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -14,9 +14,12 @@ ruma_api! {
description: "Store several sessions in the backup.",
method: PUT,
name: "add_backup_key_sessions",
path: "/_matrix/client/unstable/room_keys/keys/:room_id",
unstable_path: "/_matrix/client/unstable/room_keys/keys/:room_id",
r0_path: "/_matrix/client/r0/room_keys/keys/:room_id",
stable_path: "/_matrix/client/v3/room_keys/keys/:room_id",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -13,9 +13,11 @@ ruma_api! {
description: "Store several keys in the backup.",
method: PUT,
name: "add_backup_keys",
path: "/_matrix/client/unstable/room_keys/keys",
unstable_path: "/_matrix/client/unstable/room_keys/keys",
stable_path: "/_matrix/client/v3/room_keys/keys",
rate_limited: true,
authentication: AccessToken,
added: 1.1,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Creates a new backup.",
method: POST,
name: "create_backup",
path: "/_matrix/client/unstable/room_keys/version",
unstable_path: "/_matrix/client/unstable/room_keys/version",
stable_path: "/_matrix/client/v3/room_keys/version",
rate_limited: true,
authentication: AccessToken,
added: 1.1,
}
request: {

View File

@ -7,9 +7,12 @@ ruma_api! {
description: "Delete an existing backup.",
method: DELETE,
name: "delete_backup",
path: "/_matrix/client/unstable/room_keys/version/:version",
unstable_path: "/_matrix/client/unstable/room_keys/version/:version",
r0_path: "/_matrix/client/r0/room_keys/version/:version",
stable_path: "/_matrix/client/v3/room_keys/version/:version",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -9,9 +9,12 @@ ruma_api! {
description: "Delete a key from the backup",
method: DELETE,
name: "delete_backup_key_session",
path: "/_matrix/client/unstable/room_keys/keys/:room_id/:session_id",
unstable_path: "/_matrix/client/unstable/room_keys/keys/:room_id/:session_id",
r0_path: "/_matrix/client/r0/room_keys/keys/:room_id/:session_id",
stable_path: "/_matrix/client/v3/room_keys/keys/:room_id/:session_id",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -9,9 +9,12 @@ ruma_api! {
description: "Delete keys from the backup for a given room.",
method: DELETE,
name: "delete_backup_key_sessions",
path: "/_matrix/client/unstable/room_keys/keys/:room_id",
unstable_path: "/_matrix/client/unstable/room_keys/keys/:room_id",
r0_path: "/_matrix/client/r0/room_keys/keys/:room_id",
stable_path: "/_matrix/client/v3/room_keys/keys/:room_id",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,12 @@ ruma_api! {
description: "Delete all keys in a backup.",
method: DELETE,
name: "delete_backup_keys",
path: "/_matrix/client/unstable/room_keys/keys",
unstable_path: "/_matrix/client/unstable/room_keys/keys",
r0_path: "/_matrix/client/r0/room_keys/keys",
stable_path: "/_matrix/client/v3/room_keys/keys",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -13,9 +13,11 @@ ruma_api! {
description: "Get information about an existing backup.",
method: GET,
name: "get_backup",
path: "/_matrix/client/unstable/room_keys/version/:version",
unstable_path: "/_matrix/client/unstable/room_keys/version/:version",
stable_path: "/_matrix/client/v3/room_keys/version/:version",
rate_limited: true,
authentication: AccessToken,
added: 1.1,
}
request: {

View File

@ -11,9 +11,12 @@ ruma_api! {
description: "Retrieve a key from the backup",
method: GET,
name: "get_backup_key_session",
path: "/_matrix/client/unstable/room_keys/keys/:room_id/:session_id",
unstable_path: "/_matrix/client/unstable/room_keys/keys/:room_id/:session_id",
r0_path: "/_matrix/client/r0/room_keys/keys/:room_id/:session_id",
stable_path: "/_matrix/client/v3/room_keys/keys/:room_id/:session_id",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -13,9 +13,12 @@ ruma_api! {
description: "Retrieve sessions from the backup for a given room.",
method: GET,
name: "get_backup_key_sessions",
path: "/_matrix/client/unstable/room_keys/keys/:room_id",
unstable_path: "/_matrix/client/unstable/room_keys/keys/:room_id",
r0_path: "/_matrix/client/r0/room_keys/keys/:room_id",
stable_path: "/_matrix/client/v3/room_keys/keys/:room_id",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -12,9 +12,12 @@ ruma_api! {
description: "Retrieve all keys from a backup.",
method: GET,
name: "get_backup_keys",
path: "/_matrix/client/unstable/room_keys/keys",
unstable_path: "/_matrix/client/unstable/room_keys/keys",
r0_path: "/_matrix/client/r0/room_keys/keys",
stable_path: "/_matrix/client/v3/room_keys/keys",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -16,9 +16,12 @@ ruma_api! {
description: "Get information about the latest backup.",
method: GET,
name: "get_latest_backup",
path: "/_matrix/client/unstable/room_keys/version",
unstable_path: "/_matrix/client/unstable/room_keys/version",
r0_path: "/_matrix/client/r0/room_keys/version",
stable_path: "/_matrix/client/v3/room_keys/version",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Update information about an existing backup.",
method: POST,
name: "update_backup",
path: "/_matrix/client/unstable/room_keys/version/:version",
unstable_path: "/_matrix/client/unstable/room_keys/version/:version",
stable_path: "/_matrix/client/v3/room_keys/version/:version",
rate_limited: true,
authentication: AccessToken,
added: 1.1,
}
request: {

View File

@ -9,9 +9,11 @@ ruma_api! {
description: "Gets information about the server's supported feature set and other relevant capabilities.",
method: GET,
name: "get_capabilities",
path: "/_matrix/client/r0/capabilities",
r0_path: "/_matrix/client/r0/capabilities",
stable_path: "/_matrix/client/v3/capabilities",
rate_limited: true,
authentication: AccessToken
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Gets global account data for a user.",
name: "get_global_account_data",
method: GET,
path: "/_matrix/client/r0/user/:user_id/account_data/:event_type",
r0_path: "/_matrix/client/r0/user/:user_id/account_data/:event_type",
stable_path: "/_matrix/client/v3/user/:user_id/account_data/:event_type",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Gets account data room for a user for a given room",
name: "get_room_account_data",
method: GET,
path: "/_matrix/client/r0/user/:user_id/rooms/:room_id/account_data/:event_type",
r0_path: "/_matrix/client/r0/user/:user_id/rooms/:room_id/account_data/:event_type",
stable_path: "/_matrix/client/v3/user/:user_id/rooms/:room_id/account_data/:event_type",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -9,9 +9,11 @@ ruma_api! {
description: "Sets global account data.",
method: PUT,
name: "set_global_account_data",
path: "/_matrix/client/r0/user/:user_id/account_data/:event_type",
r0_path: "/_matrix/client/r0/user/:user_id/account_data/:event_type",
stable_path: "/_matrix/client/v3/user/:user_id/account_data/:event_type",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -9,9 +9,11 @@ ruma_api! {
description: "Associate account data with a room.",
method: PUT,
name: "set_room_account_data",
path: "/_matrix/client/r0/user/:user_id/rooms/:room_id/account_data/:event_type",
r0_path: "/_matrix/client/r0/user/:user_id/rooms/:room_id/account_data/:event_type",
stable_path: "/_matrix/client/v3/user/:user_id/rooms/:room_id/account_data/:event_type",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -12,10 +12,12 @@ ruma_api! {
metadata: {
description: "Get the events immediately preceding and following a given event.",
method: GET,
path: "/_matrix/client/r0/rooms/:room_id/context/:event_id",
r0_path: "/_matrix/client/r0/rooms/:room_id/context/:event_id",
stable_path: "/_matrix/client/v3/rooms/:room_id/context/:event_id",
name: "get_context",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Delete a device for authenticated user.",
method: DELETE,
name: "delete_device",
path: "/_matrix/client/r0/devices/:device_id",
r0_path: "/_matrix/client/r0/devices/:device_id",
stable_path: "/_matrix/client/v3/devices/:device_id",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -9,10 +9,12 @@ ruma_api! {
metadata: {
description: "Delete specified devices.",
method: POST,
path: "/_matrix/client/r0/delete_devices",
r0_path: "/_matrix/client/r0/delete_devices",
stable_path: "/_matrix/client/v3/delete_devices",
name: "delete_devices",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Get a device for authenticated user.",
method: GET,
name: "get_device",
path: "/_matrix/client/r0/devices/:device_id",
r0_path: "/_matrix/client/r0/devices/:device_id",
stable_path: "/_matrix/client/v3/devices/:device_id",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -9,9 +9,11 @@ ruma_api! {
description: "Get registered devices for authenticated user.",
method: GET,
name: "get_devices",
path: "/_matrix/client/r0/devices",
r0_path: "/_matrix/client/r0/devices",
stable_path: "/_matrix/client/v3/devices",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Update metadata for a device.",
method: PUT,
name: "update_device",
path: "/_matrix/client/r0/devices/:device_id",
r0_path: "/_matrix/client/r0/devices/:device_id",
stable_path: "/_matrix/client/v3/devices/:device_id",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Get the list of rooms in this homeserver's public directory.",
method: GET,
name: "get_public_rooms",
path: "/_matrix/client/r0/publicRooms",
r0_path: "/_matrix/client/r0/publicRooms",
stable_path: "/_matrix/client/v3/publicRooms",
rate_limited: false,
authentication: None,
added: 1.0,
}
#[derive(Default)]
@ -87,14 +89,14 @@ mod tests {
.try_into_http_request::<Vec<u8>>(
"https://homeserver.tld",
SendAccessToken::IfRequired("auth_tok"),
&[MatrixVersion::V1_0],
&[MatrixVersion::V1_1],
)
.unwrap();
let uri = req.uri();
let query = uri.query().unwrap();
assert_eq!(uri.path(), "/_matrix/client/r0/publicRooms");
assert_eq!(uri.path(), "/_matrix/client/v3/publicRooms");
assert!(query.contains("since=hello"));
assert!(query.contains("limit=10"));
assert!(query.contains("server=test.tld"));

View File

@ -12,9 +12,11 @@ ruma_api! {
description: "Get the list of rooms in this homeserver's public directory.",
method: POST,
name: "get_public_rooms_filtered",
path: "/_matrix/client/r0/publicRooms",
r0_path: "/_matrix/client/r0/publicRooms",
stable_path: "/_matrix/client/v3/publicRooms",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Get the visibility of a public room on a directory.",
name: "get_room_visibility",
method: GET,
path: "/_matrix/client/r0/directory/list/room/:room_id",
r0_path: "/_matrix/client/r0/directory/list/room/:room_id",
stable_path: "/_matrix/client/v3/directory/list/room/:room_id",
rate_limited: false,
authentication: None,
added: 1.0,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Set the visibility of a public room on a directory.",
name: "set_room_visibility",
method: PUT,
path: "/_matrix/client/r0/directory/list/room/:room_id",
r0_path: "/_matrix/client/r0/directory/list/room/:room_id",
stable_path: "/_matrix/client/v3/directory/list/room/:room_id",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Create a new filter for event retrieval.",
method: POST,
name: "create_filter",
path: "/_matrix/client/r0/user/:user_id/filter",
r0_path: "/_matrix/client/r0/user/:user_id/filter",
stable_path: "/_matrix/client/v3/user/:user_id/filter",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {
@ -87,7 +89,7 @@ mod tests {
.try_into_http_request::<Vec<u8>>(
"https://matrix.org",
SendAccessToken::IfRequired("tok"),
&[MatrixVersion::V1_0]
&[MatrixVersion::V1_1]
),
Ok(res) if res.body() == b"{}"
);

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Retrieve a previously created filter.",
method: GET,
name: "get_filter",
path: "/_matrix/client/r0/user/:user_id/filter/:filter_id",
r0_path: "/_matrix/client/r0/user/:user_id/filter/:filter_id",
stable_path: "/_matrix/client/v3/user/:user_id/filter/:filter_id",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -13,9 +13,11 @@ ruma_api! {
description: "Claims one-time keys for use in pre-key messages.",
method: POST,
name: "claim_keys",
path: "/_matrix/client/r0/keys/claim",
r0_path: "/_matrix/client/r0/keys/claim",
stable_path: "/_matrix/client/v3/keys/claim",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Gets a list of users who have updated their device identity keys since a previous sync token.",
method: GET,
name: "get_key_changes",
path: "/_matrix/client/r0/keys/changes",
r0_path: "/_matrix/client/r0/keys/changes",
stable_path: "/_matrix/client/v3/keys/changes",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -13,9 +13,11 @@ ruma_api! {
description: "Returns the current devices and identity keys for the given users.",
method: POST,
name: "get_keys",
path: "/_matrix/client/r0/keys/query",
r0_path: "/_matrix/client/r0/keys/query",
stable_path: "/_matrix/client/v3/keys/query",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -13,9 +13,11 @@ ruma_api! {
description: "Publishes end-to-end encryption keys for the device.",
method: POST,
name: "upload_keys",
path: "/_matrix/client/r0/keys/upload",
r0_path: "/_matrix/client/r0/keys/upload",
stable_path: "/_matrix/client/v3/keys/upload",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -11,9 +11,11 @@ ruma_api! {
description: "Publishes cross-signing signatures for the user.",
method: POST,
name: "upload_signatures",
path: "/_matrix/client/unstable/keys/signatures/upload",
unstable_path: "/_matrix/client/unstable/keys/signatures/upload",
stable_path: "/_matrix/client/v3/keys/signatures/upload",
rate_limited: false,
authentication: AccessToken,
added: 1.1,
}
request: {

View File

@ -11,9 +11,11 @@ ruma_api! {
description: "Publishes cross signing keys for the user.",
method: POST,
name: "upload_signing_keys",
path: "/_matrix/client/unstable/keys/device_signing/upload",
unstable_path: "/_matrix/client/unstable/keys/device_signing/upload",
stable_path: "/_matrix/client/v3/keys/device_signing/upload",
rate_limited: false,
authentication: AccessToken,
added: 1.1,
}
#[derive(Default)]

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Knock on a room.",
method: POST,
name: "knock_room",
path: "/_matrix/client/r0/knock/:room_id_or_alias",
unstable_path: "/_matrix/client/unstable/xyz.amorgan.knock/knock/:room_id_or_alias",
stable_path: "/_matrix/client/v3/knock/:room_id_or_alias",
rate_limited: true,
authentication: AccessToken,
added: 1.1,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Upload content to the media store.",
method: POST,
name: "create_media_content",
path: "/_matrix/media/r0/upload",
r0_path: "/_matrix/media/r0/upload",
stable_path: "/_matrix/media/v3/upload",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Retrieve content from the media store.",
method: GET,
name: "get_media_content",
path: "/_matrix/media/r0/download/:server_name/:media_id",
r0_path: "/_matrix/media/r0/download/:server_name/:media_id",
stable_path: "/_matrix/media/v3/download/:server_name/:media_id",
rate_limited: false,
authentication: None,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Retrieve content from the media store, specifying a filename to return.",
method: GET,
name: "get_media_content_as_filename",
path: "/_matrix/media/r0/download/:server_name/:media_id/:filename",
r0_path: "/_matrix/media/r0/download/:server_name/:media_id/:filename",
stable_path: "/_matrix/media/v3/download/:server_name/:media_id/:filename",
rate_limited: false,
authentication: None,
added: 1.0,
}
request: {

View File

@ -12,9 +12,11 @@ ruma_api! {
description: "Get a thumbnail of content from the media store.",
method: GET,
name: "get_content_thumbnail",
path: "/_matrix/media/r0/thumbnail/:server_name/:media_id",
r0_path: "/_matrix/media/r0/thumbnail/:server_name/:media_id",
stable_path: "/_matrix/media/v3/thumbnail/:server_name/:media_id",
rate_limited: true,
authentication: None,
added: 1.0,
}
request: {

View File

@ -7,10 +7,12 @@ ruma_api! {
metadata: {
description: "Gets the config for the media repository.",
method: GET,
path: "/_matrix/media/r0/config",
r0_path: "/_matrix/media/r0/config",
stable_path: "/_matrix/media/v3/config",
name: "get_media_config",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Get a preview for a URL.",
name: "get_media_preview",
method: GET,
path: "/_matrix/media/r0/preview_url",
r0_path: "/_matrix/media/r0/preview_url",
stable_path: "/_matrix/media/v3/preview_url",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Ban a user from a room.",
method: POST,
name: "ban_user",
path: "/_matrix/client/r0/rooms/:room_id/ban",
r0_path: "/_matrix/client/r0/rooms/:room_id/ban",
stable_path: "/_matrix/client/v3/rooms/:room_id/ban",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Forget a room.",
method: POST,
name: "forget_room",
path: "/_matrix/client/r0/rooms/:room_id/forget",
r0_path: "/_matrix/client/r0/rooms/:room_id/forget",
stable_path: "/_matrix/client/v3/rooms/:room_id/forget",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -12,9 +12,11 @@ ruma_api! {
description: "Get membership events for a room.",
method: GET,
name: "get_member_events",
path: "/_matrix/client/r0/rooms/:room_id/members",
r0_path: "/_matrix/client/r0/rooms/:room_id/members",
stable_path: "/_matrix/client/v3/rooms/:room_id/members",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -19,9 +19,11 @@ ruma_api! {
description: "Invite a user to a room.",
method: POST,
name: "invite_user",
path: "/_matrix/client/r0/rooms/:room_id/invite",
r0_path: "/_matrix/client/r0/rooms/:room_id/invite",
stable_path: "/_matrix/client/v3/rooms/:room_id/invite",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Join a room using its ID.",
method: POST,
name: "join_room_by_id",
path: "/_matrix/client/r0/rooms/:room_id/join",
r0_path: "/_matrix/client/r0/rooms/:room_id/join",
stable_path: "/_matrix/client/v3/rooms/:room_id/join",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Join a room using its ID or one of its aliases.",
method: POST,
name: "join_room_by_id_or_alias",
path: "/_matrix/client/r0/join/:room_id_or_alias",
r0_path: "/_matrix/client/r0/join/:room_id_or_alias",
stable_path: "/_matrix/client/v3/join/:room_id_or_alias",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -11,9 +11,11 @@ ruma_api! {
description: "Get a map of user ids to member info objects for members of the room. Primarily for use in Application Services.",
method: GET,
name: "joined_members",
path: "/_matrix/client/r0/rooms/:room_id/joined_members",
r0_path: "/_matrix/client/r0/rooms/:room_id/joined_members",
stable_path: "/_matrix/client/v3/rooms/:room_id/joined_members",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Get a list of the user's current rooms.",
method: GET,
name: "joined_rooms",
path: "/_matrix/client/r0/joined_rooms",
r0_path: "/_matrix/client/r0/joined_rooms",
stable_path: "/_matrix/client/v3/joined_rooms",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Kick a user from a room.",
method: POST,
name: "kick_user",
path: "/_matrix/client/r0/rooms/:room_id/kick",
r0_path: "/_matrix/client/r0/rooms/:room_id/kick",
stable_path: "/_matrix/client/v3/rooms/:room_id/kick",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Leave a room.",
method: POST,
name: "leave_room",
path: "/_matrix/client/r0/rooms/:room_id/leave",
r0_path: "/_matrix/client/r0/rooms/:room_id/leave",
stable_path: "/_matrix/client/v3/rooms/:room_id/leave",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Unban a user from a room.",
method: POST,
name: "unban_user",
path: "/_matrix/client/r0/rooms/:room_id/unban",
r0_path: "/_matrix/client/r0/rooms/:room_id/unban",
stable_path: "/_matrix/client/v3/rooms/:room_id/unban",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -14,9 +14,11 @@ ruma_api! {
description: "Get message events for a room.",
method: GET,
name: "get_message_events",
path: "/_matrix/client/r0/rooms/:room_id/messages",
r0_path: "/_matrix/client/r0/rooms/:room_id/messages",
stable_path: "/_matrix/client/v3/rooms/:room_id/messages",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {
@ -175,7 +177,7 @@ mod tests {
.try_into_http_request(
"https://homeserver.tld",
SendAccessToken::IfRequired("auth_tok"),
&[MatrixVersion::V1_0],
&[MatrixVersion::V1_1],
)
.unwrap();
assert_eq!(
@ -204,7 +206,7 @@ mod tests {
.try_into_http_request::<Vec<u8>>(
"https://homeserver.tld",
SendAccessToken::IfRequired("auth_tok"),
&[MatrixVersion::V1_0],
&[MatrixVersion::V1_1],
)
.unwrap();
assert_eq!("from=token&to=token2&dir=b&limit=0", request.uri().query().unwrap(),);

View File

@ -11,9 +11,11 @@ ruma_api! {
description: "Send a message event to a room.",
method: PUT,
name: "create_message_event",
path: "/_matrix/client/r0/rooms/:room_id/send/:event_type/:txn_id",
r0_path: "/_matrix/client/r0/rooms/:room_id/send/:event_type/:txn_id",
stable_path: "/_matrix/client/v3/rooms/:room_id/send/:event_type/:txn_id",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -11,9 +11,11 @@ ruma_api! {
description: "Get presence status for this user.",
method: GET,
name: "get_presence",
path: "/_matrix/client/r0/presence/:user_id/status",
r0_path: "/_matrix/client/r0/presence/:user_id/status",
stable_path: "/_matrix/client/v3/presence/:user_id/status",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -9,9 +9,11 @@ ruma_api! {
description: "Set presence status for this user.",
method: PUT,
name: "set_presence",
path: "/_matrix/client/r0/presence/:user_id/status",
r0_path: "/_matrix/client/r0/presence/:user_id/status",
stable_path: "/_matrix/client/v3/presence/:user_id/status",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Get the avatar URL of a user.",
method: GET,
name: "get_avatar_url",
path: "/_matrix/client/r0/profile/:user_id/avatar_url",
r0_path: "/_matrix/client/r0/profile/:user_id/avatar_url",
stable_path: "/_matrix/client/v3/profile/:user_id/avatar_url",
rate_limited: false,
authentication: None,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Get the display name of a user.",
method: GET,
name: "get_display_name",
path: "/_matrix/client/r0/profile/:user_id/displayname",
r0_path: "/_matrix/client/r0/profile/:user_id/displayname",
stable_path: "/_matrix/client/v3/profile/:user_id/displayname",
rate_limited: false,
authentication: None,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Get all profile information of an user.",
method: GET,
name: "get_profile",
path: "/_matrix/client/r0/profile/:user_id",
r0_path: "/_matrix/client/r0/profile/:user_id",
stable_path: "/_matrix/client/v3/profile/:user_id",
rate_limited: false,
authentication: None,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Set the avatar URL of the user.",
method: PUT,
name: "set_avatar_url",
path: "/_matrix/client/r0/profile/:user_id/avatar_url",
r0_path: "/_matrix/client/r0/profile/:user_id/avatar_url",
stable_path: "/_matrix/client/v3/profile/:user_id/avatar_url",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Set the display name of the user.",
method: PUT,
name: "set_display_name",
path: "/_matrix/client/r0/profile/:user_id/displayname",
r0_path: "/_matrix/client/r0/profile/:user_id/displayname",
stable_path: "/_matrix/client/v3/profile/:user_id/displayname",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -9,9 +9,11 @@ ruma_api! {
description: "This endpoint removes the push rule defined in the path.",
method: DELETE,
name: "delete_pushrule",
path: "/_matrix/client/r0/pushrules/:scope/:kind/:rule_id",
r0_path: "/_matrix/client/r0/pushrules/:scope/:kind/:rule_id",
stable_path: "/_matrix/client/v3/pushrules/:scope/:kind/:rule_id",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -13,9 +13,11 @@ ruma_api! {
description: "Paginate through the list of events that the user has been, or would have been notified about.",
method: GET,
name: "get_notifications",
path: "/_matrix/client/r0/notifications",
r0_path: "/_matrix/client/r0/notifications",
stable_path: "/_matrix/client/v3/notifications",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "Gets all currently active pushers for the authenticated user.",
method: GET,
name: "get_pushers",
path: "/_matrix/client/r0/pushers",
r0_path: "/_matrix/client/r0/pushers",
stable_path: "/_matrix/client/v3/pushers",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -9,9 +9,11 @@ ruma_api! {
description: "Retrieve a single specified push rule.",
method: GET,
name: "get_pushrule",
path: "/_matrix/client/r0/pushrules/:scope/:kind/:rule_id",
r0_path: "/_matrix/client/r0/pushrules/:scope/:kind/:rule_id",
stable_path: "/_matrix/client/v3/pushrules/:scope/:kind/:rule_id",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "This endpoint get the actions for the specified push rule.",
method: GET,
name: "get_pushrule_actions",
path: "/_matrix/client/r0/pushrules/:scope/:kind/:rule_id/actions",
r0_path: "/_matrix/client/r0/pushrules/:scope/:kind/:rule_id/actions",
stable_path: "/_matrix/client/v3/pushrules/:scope/:kind/:rule_id/actions",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -9,9 +9,11 @@ ruma_api! {
description: "This endpoint gets whether the specified push rule is enabled.",
method: GET,
name: "get_pushrule_enabled",
path: "/_matrix/client/r0/pushrules/:scope/:kind/:rule_id/enabled",
r0_path: "/_matrix/client/r0/pushrules/:scope/:kind/:rule_id/enabled",
stable_path: "/_matrix/client/v3/pushrules/:scope/:kind/:rule_id/enabled",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Retrieve all push rulesets for this user.",
method: GET,
name: "get_pushrules_all",
path: "/_matrix/client/r0/pushrules/",
r0_path: "/_matrix/client/r0/pushrules/",
stable_path: "/_matrix/client/v3/pushrules/",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Retrieve all push rulesets in the global scope for this user.",
method: GET,
name: "get_pushrules_global_scope",
path: "/_matrix/client/r0/pushrules/global/",
r0_path: "/_matrix/client/r0/pushrules/global/",
stable_path: "/_matrix/client/v3/pushrules/global/",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
#[derive(Default)]

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "This endpoint allows the creation, modification and deletion of pushers for this user ID.",
method: POST,
name: "set_pusher",
path: "/_matrix/client/r0/pushers/set",
r0_path: "/_matrix/client/r0/pushers/set",
stable_path: "/_matrix/client/v3/pushers/set",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "This endpoint allows the creation, modification and deletion of pushers for this user ID.",
method: PUT,
name: "set_pushrule",
path: "/_matrix/client/r0/pushrules/:scope/:kind/:rule_id",
r0_path: "/_matrix/client/r0/pushrules/:scope/:kind/:rule_id",
stable_path: "/_matrix/client/v3/pushrules/:scope/:kind/:rule_id",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -10,9 +10,11 @@ ruma_api! {
description: "This endpoint allows clients to change the actions of a push rule. This can be used to change the actions of builtin rules.",
method: PUT,
name: "set_pushrule_actions",
path: "/_matrix/client/r0/pushrules/:scope/:kind/:rule_id/actions",
r0_path: "/_matrix/client/r0/pushrules/:scope/:kind/:rule_id/actions",
stable_path: "/_matrix/client/v3/pushrules/:scope/:kind/:rule_id/actions",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -9,9 +9,11 @@ ruma_api! {
description: "This endpoint allows clients to enable or disable the specified push rule.",
method: PUT,
name: "set_pushrule_enabled",
path: "/_matrix/client/r0/pushrules/:scope/:kind/:rule_id/enabled",
r0_path: "/_matrix/client/r0/pushrules/:scope/:kind/:rule_id/enabled",
stable_path: "/_matrix/client/v3/pushrules/:scope/:kind/:rule_id/enabled",
rate_limited: false,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -8,9 +8,11 @@ ruma_api! {
description: "Sets the position of the read marker for a given room, and optionally the read receipt's location.",
method: POST,
name: "set_read_marker",
path: "/_matrix/client/r0/rooms/:room_id/read_markers",
r0_path: "/_matrix/client/r0/rooms/:room_id/read_markers",
stable_path: "/_matrix/client/v3/rooms/:room_id/read_markers",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

View File

@ -9,9 +9,11 @@ ruma_api! {
description: "Send a receipt event to a room.",
method: POST,
name: "create_receipt",
path: "/_matrix/client/r0/rooms/:room_id/receipt/:receipt_type/:event_id",
r0_path: "/_matrix/client/r0/rooms/:room_id/receipt/:receipt_type/:event_id",
stable_path: "/_matrix/client/v3/rooms/:room_id/receipt/:receipt_type/:event_id",
rate_limited: true,
authentication: AccessToken,
added: 1.0,
}
request: {

Some files were not shown because too many files have changed in this diff Show More