119 Commits

Author SHA1 Message Date
Jonas Platte
a2b64df5d3
api: Require all EndpointErrors to be Send 2021-05-01 21:20:10 +02:00
Jonas Platte
12ec0fb168
api: Rename SendAccessToken methods to be clearer
Co-authored-by: Johannes Becker <j.becker@famedly.com>
2021-04-23 15:01:57 +02:00
Jonas Platte
f818b53ca1
Make conversions from Ruma types to http types generic
So users can select the Body type that makes the most sense for them.
2021-04-23 13:26:10 +02:00
Jonas Platte
ae26be88c5
api-macros: Refactor access token sending logic 2021-04-23 13:22:20 +02:00
Johannes Becker
0ca5785ead api: Replace access_token Option with SendAccessToken enum 2021-04-23 10:56:04 +02:00
Jonas Platte
de949815af
Release ruma-api 0.17.0-alpha.4 2021-04-17 19:39:02 +02:00
Jonas Platte
b3c646a2b7
Release ruma-events 0.22.0-alpha.3 2021-04-17 19:33:51 +02:00
Jonas Platte
309ba18b82
api: Update changelog 2021-04-17 19:14:43 +02:00
Jonas Platte
c1693569f1
api: Replace bytes::Buf by AsRef<u8> for reading
This allows us to switch back to serde_json::from_slice instead of
serde_json::from_reader, because the latter is significantly slower.

See https://github.com/serde-rs/json/issues/160
2021-04-13 22:12:16 +02:00
Jonas Platte
2a8b4a0478
Release ruma-identifiers 0.19.0 2021-04-13 21:12:24 +02:00
Jonas Platte
a774771fc9
Remove verbose error types from tests 2021-04-13 14:14:27 +02:00
Jonas Platte
6585aeb628
api: Make OutgoingResponse a supertrait of EndpointError 2021-04-13 13:15:57 +02:00
Jonas Platte
0e197aae0b
api: Update try_from_http_request to be generic like try_from_http_response 2021-04-12 20:38:22 +02:00
Jonas Platte
23ba0bc164
api-macros: Refactor request code generation 2021-04-12 20:38:22 +02:00
Jonas Platte
b122dcc135
api: Introduce OutgoingResponse trait 2021-04-12 20:38:22 +02:00
Jonas Platte
6f5c1ee953
api: Stop storing the http::Request in RequestDeserializationError 2021-04-12 20:38:22 +02:00
Jonas Platte
2ac020173b
api: Introduce IncomingResponse trait 2021-04-12 20:38:22 +02:00
Jonas Platte
effb53444d
api: Stop storing the http::Response in ResponseDeserializationError 2021-04-12 20:38:22 +02:00
Johannes Becker
dbc6bb29d0
api: Add trait OutgoingRequestAppserviceExt
Provides the method `try_into_http_request_with_user_id`.
2021-04-12 13:30:04 +02:00
Jonas Platte
a68b854734
api: Refactor macro code and improve error handling
* Inline lots of methods that were only used once
* Create a separate error case for missing headers
2021-04-10 14:50:01 +02:00
Akshay
06a2a27a99
api: Check http method in try_from_http_request 2021-04-09 17:21:05 +02:00
Jonas Platte
85f152fccc
api: Normalize std::fmt import 2021-04-09 12:51:50 +02:00
Jonas Platte
1ab1a24e1d
Remove outdated documentation 2021-04-09 10:58:37 +02:00
Kévin Commaille
963400979b
docs: Harmonize ruma modules descriptions 2021-04-07 12:14:49 +02:00
Jonas Platte
c523fa0f74
Use ruma_api::try_deserialize in manual endpoint implementations 2021-04-05 22:33:05 +02:00
Jonas Platte
345d0cf990
api-macros: Allow ruma_api! invocation without request / response 2021-04-05 14:49:40 +02:00
Jonas Platte
1bf4157a89
Add favicon and logo URLs for rustdoc 2021-04-05 11:42:07 +02:00
Jonas Platte
39a8c26263
Release ruma-identifiers 0.18.1 2021-04-03 17:56:01 +02:00
Jonas Platte
b79fd0c3aa
Release ruma-identifiers 0.18.0 2021-03-23 21:08:44 +01:00
Jonas Platte
c910d57b14
Release ruma-serde 0.3.1 2021-03-23 20:58:53 +01:00
Jonas Platte
e843ccdb90
ruma-api: Force client and server Cargo features to always be on 2021-03-09 19:58:36 +01:00
Akshay
4d51e98707
Introduce client and server feature flags for *-api crates 2021-03-05 16:00:35 +01:00
Jonas Platte
ed6e55a22f
Re-format 2021-02-09 15:42:40 +01:00
Jonas Platte
44a0bebd09
Fix links in docs 2021-02-08 20:46:57 +01:00
Akshay
1c0dab5a47
api: Allow cfg attributes on rate_limited and authentication metadata fields 2021-02-05 12:47:43 +01:00
Akshay
b087cf75b7
Set the default Content-Type for requests to application/json 2021-01-22 17:39:06 +01:00
Amanda Graven
85037832d1
Minor comment spelling and formatting fixes 2021-01-18 16:12:28 +01:00
Jonas Platte
daf2d463ba
ruma: Show all features on docs.rs 2021-01-17 22:40:11 +01:00
Jonas Platte
ca1f334ded
Remove documentation links from all Cargo.tomls
It was wrong for ruma-federation-api and useless for all others since
crates.io will link to docs.rs automatically if no link is given.
2021-01-17 17:00:09 +01:00
Jonas Platte
8e247a5ce2
Release ruma-api 0.17.0-alpha.2 2021-01-02 14:58:00 +01:00
Jonas Platte
b95ab27272
Release ruma-events 0.22.0-alpha.2 2021-01-02 14:49:00 +01:00
Jonas Platte
6d468b88a3
Release ruma-identifiers-validation 0.2.0 and ruma-identifiers 0.18.0-alpha.1 2021-01-02 13:31:08 +01:00
Jonas Platte
2ebd827355
Release ruma-serde 0.3.0 2021-01-02 13:04:39 +01:00
Jonas Platte
f55e2b2cc6
Bump dependency requirements 2020-12-24 02:48:01 +01:00
Jonas Platte
95d21552e0
Use a dedicated method for conversion from http::Request to Ruma request types 2020-12-13 12:59:21 +01:00
Jonas Platte
b38ae1bb76
api: Improve docs for AuthScheme variants 2020-12-13 12:21:19 +01:00
Jonas Platte
5562a23aaa
Move Raw, Outgoing and all macro code from ruma-common to ruma-serde 2020-11-28 03:45:39 +01:00
Jonas Platte
8ccf0f128b
Normalize formatting of empty curly braces 2020-11-27 23:07:32 +01:00
Jonas Platte
e7f55ea2c6
Rewrap comments 2020-11-27 18:22:18 +01:00
Jonas Platte
d34a270919
Allow custom values for more enums 2020-11-02 00:29:47 +01:00