diff --git a/examples/hello_world.rs b/examples/hello_world.rs index b88687e2..6ff462a0 100644 --- a/examples/hello_world.rs +++ b/examples/hello_world.rs @@ -4,6 +4,7 @@ use std::{convert::TryFrom, env, process::exit}; use ruma_client::{ self, + api::r0, events::{ room::message::{MessageEventContent, MessageType, TextMessageEventContent}, EventType, @@ -11,7 +12,6 @@ use ruma_client::{ identifiers::RoomAliasId, Client, }; -use ruma_client_api::r0; use url::Url; async fn hello_world(homeserver_url: Url, room: String) -> Result<(), ruma_client::Error> { diff --git a/src/lib.rs b/src/lib.rs index 4a4c0918..2384a225 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -126,6 +126,7 @@ use url::Url; use crate::error::InnerError; pub use crate::{error::Error, session::Session}; +pub use ruma_client_api as api; pub use ruma_events as events; pub use ruma_identifiers as identifiers; @@ -225,7 +226,7 @@ where password: String, device_id: Option, ) -> Result { - use ruma_client_api::r0::session::login; + use api::r0::session::login; let response = self .request(login::Request { @@ -252,7 +253,7 @@ where /// this method stores the session data returned by the endpoint in this /// client, instead of returning it. pub async fn register_guest(&self) -> Result { - use ruma_client_api::r0::account::register; + use api::r0::account::register; let response = self .request(register::Request { @@ -289,7 +290,7 @@ where username: Option, password: String, ) -> Result { - use ruma_client_api::r0::account::register; + use api::r0::account::register; let response = self .request(register::Request { @@ -320,13 +321,12 @@ where /// the logged-in users account and are visible to them. pub fn sync( &self, - filter: Option, + filter: Option, since: Option, set_presence: bool, - ) -> impl Stream> - + TryStream - { - use ruma_client_api::r0::sync::sync_events; + ) -> impl Stream> + + TryStream { + use api::r0::sync::sync_events; // TODO: Is this really the way TryStreams are supposed to work? #[derive(Debug, PartialEq, Eq)]