Update
This commit is contained in:
parent
5d5724cac1
commit
00cabc308d
1 changed files with 0 additions and 20 deletions
20
src/lib.rs
20
src/lib.rs
|
@ -739,24 +739,4 @@ impl Client {
|
||||||
// pub async fn exams(&self) -> Result<()> {
|
// pub async fn exams(&self) -> Result<()> {
|
||||||
// Ok(())
|
// Ok(())
|
||||||
// }
|
// }
|
||||||
|
|
||||||
pub async fn profile(&self) -> Result<ApiProfile> {
|
|
||||||
let resp = reqwest::Client::new()
|
|
||||||
.get(self.api_url.join("profile/general")?)
|
|
||||||
.header(reqwest::header::USER_AGENT, &self.user_agent)
|
|
||||||
.header(reqwest::header::ACCEPT, "application/json")
|
|
||||||
.header(
|
|
||||||
reqwest::header::COOKIE,
|
|
||||||
self.session.as_ref().context("Not logged in")?,
|
|
||||||
)
|
|
||||||
.header(
|
|
||||||
reqwest::header::AUTHORIZATION,
|
|
||||||
Client::construct_bearer(&self.authorization.as_ref().context("Not logged in")?),
|
|
||||||
)
|
|
||||||
.send()
|
|
||||||
.await?;
|
|
||||||
dbg!(resp.text().await?);
|
|
||||||
|
|
||||||
Ok(ApiProfile {})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue