Merge pull request #41 from ruma/simple-spec-updates

Implement some simple spec updates
This commit is contained in:
Jimmy Cuadra 2019-04-26 15:59:16 -07:00 committed by GitHub
commit f9e431b60a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 6 deletions

View File

@ -1,4 +1,4 @@
//! [GET /_matrix/client/r0/user/{userId}/filter/{filterId}](https://matrix.org/docs/spec/client_server/r0.2.0.html#get-matrix-client-r0-user-userid-filter-filterid)
//! [GET /_matrix/client/r0/user/{userId}/filter/{filterId}](https://matrix.org/docs/spec/client_server/r0.4.0.html#get-matrix-client-r0-user-userid-filter-filterid)
use ruma_api_macros::ruma_api;
use ruma_identifiers::UserId;
@ -13,7 +13,7 @@ ruma_api! {
name: "get_filter",
path: "/_matrix/client/r0/user/:user_id/filter/:filter_id",
rate_limited: false,
requires_authentication: false,
requires_authentication: true,
}
request {

View File

@ -1,4 +1,4 @@
//! [POST /_matrix/media/r0/upload](https://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-media-r0-upload)
//! [POST /_matrix/media/r0/upload](https://matrix.org/docs/spec/client_server/r0.4.0.html#post-matrix-media-r0-upload)
use ruma_api_macros::ruma_api;
use serde::{Deserialize, Serialize};
@ -9,14 +9,21 @@ ruma_api! {
method: POST,
name: "create_media_content",
path: "/_matrix/media/r0/upload",
rate_limited: false,
requires_authentication: false,
rate_limited: true,
requires_authentication: true,
}
request {
/// The name of the file being uploaded.
#[serde(skip_serializing_if = "Option::is_none")]
#[ruma_api(query)]
pub filename: Option<String>,
/// The content type of the file being uploaded.
#[ruma_api(header = "CONTENT_TYPE")]
pub content_type: String,
/// The file contents to upload.
#[ruma_api(body)]
pub file: Vec<u8>,
}
response {

View File

@ -1,4 +1,4 @@
//! [GET /_matrix/client/r0/rooms/{roomId}/members](https://matrix.org/docs/spec/client_server/r0.2.0.html#get-matrix-client-r0-rooms-roomid-members)
//! [GET /_matrix/client/r0/rooms/{roomId}/members](https://matrix.org/docs/spec/client_server/r0.4.0.html#get-matrix-client-r0-rooms-roomid-members)
use ruma_api_macros::ruma_api;
use ruma_events::room::member::MemberEvent;