Update get_supported_versions for new module structure in ruma-client-api.
This commit is contained in:
parent
a7ce18f752
commit
94d1e61e35
@ -15,7 +15,8 @@ use std::convert::TryInto;
|
|||||||
|
|
||||||
use hyper::client::{Client as Hyper, IntoUrl};
|
use hyper::client::{Client as Hyper, IntoUrl};
|
||||||
use hyper::method::Method as HyperMethod;
|
use hyper::method::Method as HyperMethod;
|
||||||
use ruma_client_api::{Endpoint, Method, supported_versions};
|
use ruma_client_api::{Endpoint, Method};
|
||||||
|
use ruma_client_api::unversioned::get_supported_versions;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
pub use error::Error;
|
pub use error::Error;
|
||||||
@ -65,7 +66,7 @@ impl Client {
|
|||||||
|
|
||||||
/// Get the versions of the Matrix client-server specification supported by the homeserver.
|
/// Get the versions of the Matrix client-server specification supported by the homeserver.
|
||||||
pub fn get_supported_versions(&self)
|
pub fn get_supported_versions(&self)
|
||||||
-> Result<Response<<supported_versions::Endpoint as Endpoint>::Response>, Error> {
|
-> Result<Response<<get_supported_versions::Endpoint as Endpoint>::Response>, Error> {
|
||||||
let response = self.hyper.request(
|
let response = self.hyper.request(
|
||||||
supported_versions::Endpoint::method().into_hyper(),
|
supported_versions::Endpoint::method().into_hyper(),
|
||||||
self.homeserver_url.join(&supported_versions::Endpoint::request_path(()))?,
|
self.homeserver_url.join(&supported_versions::Endpoint::request_path(()))?,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user