Update
This commit is contained in:
parent
51c09d0e5a
commit
15dfc5982c
1 changed files with 4 additions and 3 deletions
|
@ -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<chrono::NaiveDate, D::Error>
|
||||
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<url::Url> {
|
||||
pub fn gen_rpc_url(endpoint: &Url, school: &str) -> Result<Url> {
|
||||
let mut x = endpoint.join("jsonrpc.do")?;
|
||||
x.query_pairs_mut().append_pair("school", school);
|
||||
|
||||
|
|
Loading…
Reference in a new issue