diff --git a/src/lib.rs b/src/lib.rs index b6be2de..3f28dad 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,6 +3,7 @@ use chrono::Datelike; use cookie::Cookie; use serde::Deserialize; use serde_json::json; +use url::Url; fn deserialize_date<'de, D>(deserializer: D) -> Result where @@ -285,8 +286,8 @@ struct ApiTeachersResponse { #[derive(Debug)] pub struct Client { - pub webuntis_url: url::Url, - pub rpc_url: url::Url, + pub webuntis_url: Url, + pub rpc_url: Url, pub client_name: String, pub user_agent: String, pub username: String, @@ -296,7 +297,7 @@ pub struct Client { } impl Client { - pub fn gen_rpc_url(endpoint: url::Url, school: &str) -> Result { + pub fn gen_rpc_url(endpoint: &Url, school: &str) -> Result { let mut x = endpoint.join("jsonrpc.do")?; x.query_pairs_mut().append_pair("school", school);