use dotenv::dotenv;
use std::env;
use std::error::Error;
use std::fs::{self, File};
use std::io::{self, Read, Write};
use std::path::Path;
use std::time::{SystemTime, UNIX_EPOCH, Duration};
use std::sync::Arc;
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use tokio::{task, time};
use tokio::sync::Semaphore;
use crate::pathfinding::Location;
use crate::market::Order;
const TOKEN_FILE: &str = "token.json";
use std::sync::Mutex;
#[derive(Deserialize, Serialize, Clone)]
struct TokenData {
access_token: String,
refresh_token: String,
expires_at: u64,
}
#[derive(Deserialize)]
struct TokenResponse {
access_token: String,
refresh_token: String,
expires_in: u64,
}
pub struct EveApiClient {
client_id: String,
client_secret: String,
character_id: String,
redirect_url: String,
access_token: Mutex