diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/bridge/reqwest.rs | 9 | ||||
| -rw-r--r-- | src/lib.rs | 9 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/bridge/reqwest.rs b/src/bridge/reqwest.rs index 971d594..fc313b6 100644 --- a/src/bridge/reqwest.rs +++ b/src/bridge/reqwest.rs @@ -18,17 +18,14 @@ use serde_urlencoded; /// the instance of hyper's Client will have those methods available: /// /// ```rust,no_run -/// extern crate hyper; -/// extern crate serenity_oauth; -/// /// # fn main() { -/// use hyper::Client; +/// use reqwest::blocking::Client; /// /// let client = Client::new(); /// /// // At this point, the methods defined by the trait are not in scope. By /// // using the trait, they will be. -/// use serenity_oauth::DiscordOAuthHyperRequester; +/// use serenity_oauth::DiscordOAuthReqwestRequester; /// /// // The methods defined by `DiscordOAuthHyperRequester` are now in scope and /// // implemented on the instance of hyper's `Client`. @@ -112,7 +109,7 @@ impl DiscordOAuthReqwestRequester for ReqwestClient { fn exchange_code(&self, request: &AccessTokenExchangeRequest) -> Result<AccessTokenResponse> { let body = serde_urlencoded::to_string(request)?; - let response = sel + let response = self .post(BASE_TOKEN_URI) .header(CONTENT_TYPE, "application/x-www-form-urlencoded") .body(body) @@ -1,4 +1,3 @@ -#![warn(missing_docs)] //! # serenity-oauth //! //! `serenity-oauth` is a collection of HTTP library support bridges for @@ -39,3 +38,11 @@ pub use bridge::hyper::DiscordOAuthHyperRequester; pub use bridge::reqwest::DiscordOAuthReqwestRequester; pub use error::{Error, Result}; pub use scope::Scope; + +#[allow(missing_docs)] +pub mod prelude { + pub use crate::bridge::hyper::DiscordOAuthHyperRequester; + pub use crate::bridge::reqwest::DiscordOAuthReqwestRequester; + pub use crate::model::*; + pub use crate::scope::Scope; +} |