commit
b6401a1232
@ -9,6 +9,7 @@ name = "ruma-api"
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/ruma/ruma-api"
|
repository = "https://github.com/ruma/ruma-api"
|
||||||
version = "0.6.0"
|
version = "0.6.0"
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures = "0.1.25"
|
futures = "0.1.25"
|
||||||
|
22
src/lib.rs
22
src/lib.rs
@ -12,25 +12,14 @@
|
|||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
#![feature(try_from)]
|
#![feature(try_from)]
|
||||||
|
|
||||||
extern crate futures;
|
|
||||||
extern crate http;
|
|
||||||
extern crate hyper;
|
|
||||||
extern crate ruma_identifiers;
|
|
||||||
#[cfg(test)]
|
|
||||||
extern crate serde;
|
|
||||||
#[cfg(test)]
|
|
||||||
#[macro_use]
|
|
||||||
extern crate serde_derive;
|
|
||||||
extern crate serde_json;
|
|
||||||
extern crate serde_urlencoded;
|
|
||||||
#[cfg(test)]
|
|
||||||
extern crate url;
|
|
||||||
|
|
||||||
use std::{convert::TryInto, io};
|
use std::{convert::TryInto, io};
|
||||||
|
|
||||||
use futures::future::FutureFrom;
|
use futures::future::FutureFrom;
|
||||||
use http::{Method, Request, Response, StatusCode};
|
use http::{self, Method, Request, Response, StatusCode};
|
||||||
use hyper::Body;
|
use hyper::{self, Body};
|
||||||
|
use ruma_identifiers;
|
||||||
|
use serde_json;
|
||||||
|
use serde_urlencoded;
|
||||||
|
|
||||||
/// A Matrix API endpoint.
|
/// A Matrix API endpoint.
|
||||||
pub trait Endpoint<T = Body, U = Body> {
|
pub trait Endpoint<T = Body, U = Body> {
|
||||||
@ -141,6 +130,7 @@ mod tests {
|
|||||||
};
|
};
|
||||||
use ruma_identifiers::{RoomAliasId, RoomId};
|
use ruma_identifiers::{RoomAliasId, RoomId};
|
||||||
use serde::de::{Deserialize, IntoDeserializer};
|
use serde::de::{Deserialize, IntoDeserializer};
|
||||||
|
use serde_derive::{Deserialize, Serialize};
|
||||||
use serde_json;
|
use serde_json;
|
||||||
use url::percent_encoding;
|
use url::percent_encoding;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user