start working on bar pinger and traewelling client

This commit is contained in:
Schrottkatze 2024-09-07 18:31:04 +02:00
parent 867514362a
commit 718fe00b46
Signed by: schrottkatze
SSH key fingerprint: SHA256:hXb3t1vINBFCiDCmhRABHX5ocdbLiKyCdKI4HK2Rbbc
13 changed files with 1062 additions and 48 deletions

View file

@ -0,0 +1,35 @@
use std::{default, fs};
use clap::{Parser, Subcommand};
use commands::current_journey::get_current_journey;
use reqwest::{
header::{self, HeaderMap},
ClientBuilder,
};
use traewelling::model::{Container, Status};
mod commands;
mod traewelling;
#[derive(Parser)]
struct Cli {
#[command(subcommand)]
subcommand: Subcommands,
}
#[derive(Subcommand, Clone)]
enum Subcommands {
/// Watch for a current journey and give out json info about it
Current,
}
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let args = Cli::parse();
match args.subcommand {
Subcommands::Current => get_current_journey().await?,
};
Ok(())
}