feat: make reservation api wrapper
This commit is contained in:
parent
0aa021259a
commit
c799d3d226
7 changed files with 76 additions and 21 deletions
|
|
@ -9,3 +9,4 @@ edition = "2021"
|
|||
affluences-api = { path = "../affluences-api" }
|
||||
tokio = { version = "1.28.1", features = ["full"] }
|
||||
chrono = "*"
|
||||
uuid = "*"
|
||||
|
|
|
|||
|
|
@ -1,17 +1,18 @@
|
|||
use affluences_api::AffluencesClient;
|
||||
use chrono::NaiveDate;
|
||||
use uuid::{uuid, Uuid};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let site = "ghent-university";
|
||||
|
||||
// let uuid = "026b8caa-d310-464f-b714-4c21a2cf98ea";
|
||||
let site = "faculty-library-sciences";
|
||||
let id: Uuid = uuid!("4737e57a-ee05-4f7b-901a-7bb541eeb297");
|
||||
let mut client = AffluencesClient::new();
|
||||
let res = client.site_data(site).await.unwrap();
|
||||
|
||||
// let res = client
|
||||
// .available(uuid, NaiveDate::from_ymd_opt(2023, 5, 11).unwrap(), 1)
|
||||
// .await
|
||||
// .unwrap();
|
||||
// let res = client.site_data(site).await.unwrap();
|
||||
|
||||
let res = client
|
||||
.available(id, NaiveDate::from_ymd_opt(2023, 5, 11).unwrap(), 1)
|
||||
.await
|
||||
.unwrap();
|
||||
println!("{:?}", res);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue