Jonas Platte
c9277ddc94
Upgrade dependencies
2018-11-10 22:39:29 +01:00
Jonas Platte
1334fc37e5
Remove unused mut
2018-11-09 11:28:36 +01:00
Jonas Platte
bd23e42cfc
Update lazy_static, url, ring, untrusted
2018-11-09 11:28:05 +01:00
Jonas Platte
86135ddeb0
Update base64 to latest version
2018-11-09 11:20:56 +01:00
Jonas Herzig
20cbadd95b
Make Request and Response cloneable
2018-09-12 15:27:40 +02:00
Jonas Herzig
e4ec9442d8
Make the Future returned by generated future_from
s be Send
2018-09-12 13:23:33 +02:00
Jonas Herzig
e23eff151b
Add convertion to/from Request/Response from/to http::Request/Response
2018-09-12 13:00:28 +02:00
Jonas Herzig
c71b60ef70
Add convertion to/from Request/Response from/to http::Request/Response
2018-09-11 16:56:25 +02:00
Jonas Herzig
74dad12056
Fix test compilation
2018-09-11 15:00:52 +02:00
Jonas Herzig
eb6f2518ef
get_supported_versions does not require authentication
2018-09-11 14:13:58 +02:00
Jonas Herzig
ec8198964a
get_state_events_for_key::Request::event_type should be of type EventType
2018-09-11 14:14:09 +02:00
Jonas Herzig
07e079bb8d
get_subscribed_presences::Response::presence_events should be public
2018-09-11 14:13:58 +02:00
Florian Jacob
af3a14e3b4
Apply upcoming spec change to m.presence event representation,
...
making ruma-client more interoperable with synapse.
See https://github.com/matrix-org/matrix-doc/pull/1137 for the details
of the spec change.
Fixes https://github.com/ruma/ruma-client-api/issues/27
2018-09-01 12:22:30 +02:00
Jörg Sommer
a01702093e
Make cargo-clippy happy
2018-08-31 17:48:09 +02:00
Jörg Sommer
5fb288fc66
Cleanup the examples a little bit
...
They run fine without this code.
2018-08-31 17:47:52 +02:00
Jörg Sommer
a0ce0a9da8
Update examples
2018-08-31 17:47:52 +02:00
Jörg Sommer
04af2e41b4
Client.log_in: Add parameter device_id
...
This parameter was added to the request.
a7bce18b59
2018-08-31 17:47:52 +02:00
Jörg Sommer
66037a9339
Update of hyper
...
* hyper::UriError was moved to http::InvalidUri
* tokio_core::reactor::Handle is no longer used by the new hyper version;
tokio_core can get dropped completely
2018-08-31 17:47:49 +02:00
Jörg Sommer
58d06f82a2
Fix Rust's hint about proc_macro
...
The feature `proc_macro` has been stable since 1.29.0 and no longer
requires an attribute to enable
2018-08-31 14:09:45 +02:00
Jörg Sommer
7112b79859
Add hyper for new version of ruma-api
2018-08-31 14:09:38 +02:00
Jörg Sommer
116a6f44bc
Fix some hints from Rust and clippy
...
* the feature `proc_macro` has been stable since 1.29.0 and no longer
requires an attribute to enable
* https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#needless_return
* https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#len_zero
2018-08-31 13:47:29 +02:00
Jörg Sommer
c91b9137fb
Update dependent crates quote, syn and others
...
Cargo treats updates in the third position of the version number as
compatible and updates them silently. Therefore, we can drop this number
in the config.
`Tokens` was moved from *quote* to *proc_macro2* and got renamed to
`TokenStream`.
2018-08-31 13:47:27 +02:00
Jörg Sommer
8703e515a9
Replace Vec<u8> by hyper::Body
...
The `hyper::Request` and `Response` used in *ruma-client* require a type
parameter that implements `hyper::body::Payload`, but no implementation
for `Vec<u8>` is provided by a crate. Therefore, the best is to use
`hyper::Body` in the macros.
2018-08-31 13:46:28 +02:00
Jörg Sommer
d4578a835d
Use Hyper::Body
as default for Endpoint
...
This makes many code more compact.
2018-08-31 12:35:44 +02:00
Jörg Sommer
08c0d14221
Add Error(Hyper)
for errors originated from Hyper
...
During the parsing of the HTTP responses an error might come from
*Hyper*. To pass this error down to the caller, we need an entry in
`Error`.
2018-08-31 12:31:46 +02:00
bors[bot]
199ed02274
Merge #30
...
30: Support deserializing a (keyword) string into a unit-only enum r=nox a=smangelsdorf
This adds support for deserializing a structure such as:
```rust
#[derive(Serialize, Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
enum SortOrder {
Asc,
Desc,
}
#[derive(Serialize, Deserialize, Debug)]
struct SearchOptions {
sort: SortOrder,
}
```
This is already supported for serialization (and I've added a test case for the existing support as part of this PR), but attempting to deserialize the string `"sort=asc"` would result in the error:
```
invalid type: string "asc", expected enum SortOrder
```
I've made a sample in the playground of the way this is handled in `serde_urlencoded` vs `serde_json`: https://play.rust-lang.org/?gist=75fc1e5bbbc1eec29a472373d47488a0&version=stable
This brings the behaviour in line with the way `serde_json` currently handles this case, which I hope is appropriate. Happy to tweak the behaviour if there's a better way to handle it.
Co-authored-by: Shaun Mangelsdorf <s.mangelsdorf@gmail.com>
2018-08-14 10:53:15 +00:00
Shaun Mangelsdorf
4d220818f7
Implement deserialization into unit enums
2018-08-14 12:52:36 +02:00
Jimmy Cuadra
78b0d1e054
Update Diesel integration to Diesel 1.0.
2018-06-10 01:05:32 -07:00
Jimmy Cuadra
7ba979a411
Derive more traits for Error.
2018-05-24 04:04:19 -07:00
Jimmy Cuadra
c31794f581
Use new rand 0.5 API.
2018-05-24 04:04:08 -07:00
Jimmy Cuadra
b994d16203
Bump dependencies.
2018-05-24 03:43:15 -07:00
Jimmy Cuadra
d042f63146
Update dependencies and convert to ruma-api-macros 0.2.
2018-05-19 02:28:43 -07:00
Jimmy Cuadra
adf785ffc9
Bump version to 0.2.2.
2018-05-19 02:16:10 -07:00
Jimmy Cuadra
f744e0813d
Upgrade dependencies.
2018-05-19 02:15:51 -07:00
Jimmy Cuadra
527562c760
Bump version to 0.2.1.
2018-05-19 02:08:44 -07:00
Jimmy Cuadra
1bedd5af4e
Request body must always be a Vec<u8>.
2018-05-19 02:08:44 -07:00
Jimmy Cuadra
ff30a4381a
Use fields stripped of serde attributes.
2018-05-19 02:08:44 -07:00
Jimmy Cuadra
621b73bd6f
Add missing commas after each query field.
2018-05-19 02:08:44 -07:00
Jimmy Cuadra
1678ee2cea
Ignore attributes that aren't Meta::List
s.
2018-05-19 02:08:44 -07:00
Jimmy Cuadra
eb46147942
Bump version to 0.10.0.
2018-05-19 00:12:28 -07:00
Jimmy Cuadra
799d8e8d77
Merge pull request #10 from florianjacob/update_feature_flags
...
remove conservative_impl_trait feature flag
2018-05-19 00:11:05 -07:00
Jimmy Cuadra
4bc916556f
Merge pull request #6 from florianjacob/update_proc_macros2
...
update proc_macro2 to fix build with current nightly
2018-05-19 00:09:49 -07:00
Jimmy Cuadra
3acc5c3a93
Run rustfmt.
2018-05-18 23:54:13 -07:00
Florian Jacob
dcd259c1ca
update proc_macro2 to fix build with current nightly
2018-05-18 13:01:16 +02:00
Jimmy Cuadra
f9c30c7052
Merge pull request #2 from florianjacob/fix-statuscode-error
...
Throw StatusCode error if http request was not successful
2018-05-18 01:30:58 -07:00
Jimmy Cuadra
601f00e820
Merge pull request #9 from mujx/matrix-events-update
...
Update matrix events to their latest version
2018-05-18 01:29:16 -07:00
Florian Jacob
c59b43d027
Throw StatusCode error if http response is non-success
...
to prevent a misleading deserialization error on error responses.
2018-05-18 09:08:33 +02:00
Jimmy Cuadra
745d493e01
Merge pull request #24 from musoke/master
...
r0.3.0/login: Add device_id to request & response
2018-05-17 21:42:57 -07:00
Jimmy Cuadra
e314e51d00
Merge pull request #26 from florianjacob/room_members_require_authentication
...
/rooms/{room_id}/members requires authentication
2018-05-17 21:25:46 -07:00
Jimmy Cuadra
d384c1175e
Merge pull request #25 from florianjacob/room-filter-typo
...
RoomFilter: fix typo
2018-05-17 21:25:11 -07:00