feat: add site data api

This commit is contained in:
Jef Roosens 2023-05-11 14:36:07 +02:00
parent e8e73e9afe
commit 0aa021259a
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
6 changed files with 353 additions and 5 deletions

View file

@ -8,3 +8,4 @@ edition = "2021"
[dependencies]
affluences-api = { path = "../affluences-api" }
tokio = { version = "1.28.1", features = ["full"] }
chrono = "*"

View file

@ -1,8 +1,17 @@
use affluences_api::AffluencesClient;
use chrono::NaiveDate;
#[tokio::main]
async fn main() {
let site = "ghent-university";
// let uuid = "026b8caa-d310-464f-b714-4c21a2cf98ea";
let mut client = AffluencesClient::new();
let res = client.available().await.unwrap();
let res = client.site_data(site).await.unwrap();
// let res = client
// .available(uuid, NaiveDate::from_ymd_opt(2023, 5, 11).unwrap(), 1)
// .await
// .unwrap();
println!("{:?}", res);
}