ruwuma/src/r0/push/set_pusher.rs
Ragotzy.devin 1e3769a0f1
impl EndpointError for Error
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
2020-03-22 03:08:08 +01:00

33 lines
822 B
Rust

//! [POST /_matrix/client/r0/pushers/set](https://matrix.org/docs/spec/client_server/r0.6.0#post-matrix-client-r0-pushers-set)
use ruma_api::ruma_api;
use super::Pusher;
ruma_api! {
metadata {
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",
rate_limited: true,
requires_authentication: true,
}
request {
/// The pusher to configure
#[serde(flatten)]
pub pusher: Pusher,
/// Controls if another pusher with the same pushkey and app id should be created.
/// See the spec for details.
#[serde(default)]
pub append: bool
}
response {}
error: crate::Error
}