diff options
| author | kboz <kutayboz@gmail.com> | 2026-04-24 01:11:23 +0200 |
|---|---|---|
| committer | kboz <kutayboz@gmail.com> | 2026-04-24 01:11:23 +0200 |
| commit | 29c4b57db9a34e0f815d93cac6a2cae543778a93 (patch) | |
| tree | 68628e0b67353bcf74b5c516e5a2f0893cd598b7 /rust_backend/src/eve_service.rs | |
| parent | e43c98997b0de6a8da989f68d97f1d4f7fb7bb6f (diff) | |
| download | haul-29c4b57db9a34e0f815d93cac6a2cae543778a93.tar.gz | |
- Added a 2026 copyright statement under the original creator's in `license.md` to properly establish new fork logic.
- Updated `readme.md` to explicitly state this repository is a maintained fork.
- Eliminated the `rust_backend/` directory, Actix codebase, and its associated launch configurations.
- Purged all references specifying a Python/Rust/React tri-split from `AGENTS.md` and the frontend `.instructions.md` configuration.
Co-authored-by: Copilot <copilot@github.com>
Diffstat (limited to 'rust_backend/src/eve_service.rs')
| -rw-r--r-- | rust_backend/src/eve_service.rs | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/rust_backend/src/eve_service.rs b/rust_backend/src/eve_service.rs deleted file mode 100644 index c831847..0000000 --- a/rust_backend/src/eve_service.rs +++ /dev/null @@ -1,42 +0,0 @@ -use crate::eve_api::EveApiClient; -use crate::pathfinding::Location; -use crate::market::Orders; - -use std::error::Error; - -pub struct EveService { - client: EveApiClient, -} - -impl EveService { - pub fn new() -> Result<Self, Box<dyn Error>> { - let eve_api_client = EveApiClient::new()?; - Ok(EveService { client: eve_api_client, }) - } - - pub fn get_authorization_url(&self) -> String { - self.client.get_authorization_url() - } - - pub async fn exchange_code_for_token(&self, code: &str) -> Result<(), Box<dyn Error>> { - self.client.exchange_code_for_token(code).await - } - - pub async fn location(&self) -> Result<Location, Box<dyn Error>> { - self.client.request_location().await.map_err(|e| e.into()) - } - - pub async fn updated_orders(&self, current_orders: &Orders) -> Result<Orders, Box<dyn Error>> { - let mut region_orders = Orders::new(); - - let regions = current_orders.expired_regions(); - - for ®ion in regions.iter() { - let (orders, expiry) = self.client.request_orders(region).await?; - region_orders.insert(region, orders, expiry); - } - - Ok(region_orders) - - } -} |
