25 Commits

Author SHA1 Message Date
Jonas Platte
f6d419298c
Revert "api: Allow cfg attributes on rate_limited and authentication metadata fields"
cfg-dependent metadata is no longer needed.
This reverts commit 1c0dab5a479737bc2ae83ff710321c191dd502f7.
2022-02-13 12:13:50 +01:00
Jonas Platte
aed0988694
api: Remove support for path metadata field 2022-02-13 11:44:32 +01:00
Jonas Platte
457726017b
api: Make metadata path field optional 2022-02-13 11:13:29 +01:00
Jonathan de Jong
4ccf79cb67
api: Add _path suffix to new path metadata keywords 2022-02-13 11:13:29 +01:00
Jonathan de Jong
9000567a70
api: Remove incorrect attribute on compile test 2022-02-13 09:59:42 +01:00
Jonathan de Jong
f72d6601fc
ruma-api-macros: Fix argument ordering 2022-02-12 20:51:59 +01:00
Jonathan de Jong
397727726e
api: Add multiple path support to OutgoingRequest 2022-02-12 13:44:11 +01:00
Jonathan de Jong
1e900ab58c
api: Add stable_path, r0_path and unstable_path metadata fields 2022-02-08 14:29:21 +01:00
Jonathan de Jong
0dcdb57c29
api: Add added, deprecated, and removed metadata fields 2022-02-08 10:52:43 +01:00
Jonas Platte
96b879eb2a
api: Fix inconsistent formatting 2022-02-02 12:06:57 +01:00
Jonathan de Jong
abd702cfbc
api: Don't extract request path arguments in IncomingRequest impls
… instead requiring callers to pass them as a list of strings.
Parsing is still done within the trait implementations though.
2022-02-02 11:57:29 +01:00
ftilde
6b78988d39
ruma-api-macros: Avoid empty POST/PUT request bodys 2021-12-18 20:06:37 +01:00
Jonas Platte
3ce578f384
identifiers: Make UserId a DST 2021-11-26 00:40:40 +01:00
Jonas Platte
2d4dbfe42f
identifiers: Make RoomId a DST 2021-11-26 00:04:28 +01:00
Jonas Platte
b0db5e94e1
identifiers: Make RoomAliasId a DST 2021-11-26 00:04:28 +01:00
Jonas Platte
42fda7c89f
api: Rename newtype raw body => raw body 2021-08-16 22:23:30 +02:00
Jonas Platte
af9247c604
events: Remove comment on ruma_api_lifetime tests
This change was never meant to be committed.
2021-08-15 22:26:18 +02:00
Jonas Platte
696c9fba4e
api-macros: Move ruma_api! trait impl generation into derive macros 2021-08-05 21:00:43 +02:00
Devin Ragotzy
337b1e26ef misc: Allow exhaustive for non api related structs 2021-06-18 22:44:00 +02:00
Jonas Platte
d71fa97346
Use slices for outgoing raw bodies 2021-05-10 15:16:37 +02:00
Jonas Platte
08e87ac3bf
api: Remove redundant clone 2021-05-09 00:02:44 +02:00
gnieto
e2eb92b8ed
Prevent panic on requests with invalid URIs
When `try_into_http_request` was used with an invalid base URI the code
was panicking. Acording to `http::request::Builder` documentation,
`headers_mut` returns `None` if the builder contains errors, which was
the case when an invalid URI was provided.

The new version only sets the additional headers in case that there are
no errors on the builder, preventing the panic. The conversion will
return an error when the builder is consumed on `body`.
2021-05-08 18:12:56 +02:00
Jonas Platte
a0f7e1b771
api: Replace error::Void by error::MatrixError 2021-05-08 14:33:12 +02:00
Devin Ragotzy
5090c11843
Enable non-default clippy lints 2021-05-06 11:07:31 +00:00
Jonas Platte
3db0ea7026
Move all crates into a new crates directory 2021-05-03 15:50:27 +02:00