18 lines
610 B
Rust
18 lines
610 B
Rust
pub mod osm;
|
|
use crate::osm::scores;
|
|
use std::error::Error;
|
|
use chrono::NaiveDateTime;
|
|
|
|
const DATE_FORMAT: &str = "%Y-%m-%dT%H:%M:%SZ";
|
|
|
|
#[tokio::main]
|
|
async fn main()-> Result<(), Box<dyn Error>> {
|
|
let user = "ammaratef45";
|
|
let start_date = NaiveDateTime::parse_from_str("2025-11-13T11:55:07Z", DATE_FORMAT)?;
|
|
let end_date = NaiveDateTime::parse_from_str("2025-11-13T15:55:07Z", DATE_FORMAT)?;
|
|
let scores_input = scores::Input {
|
|
start_time: start_date, end_time: end_date, teams: vec![scores::Team{players: vec![String::from(user)]}]
|
|
};
|
|
scores::calculate(scores_input).await
|
|
}
|