adding openfigi as identifier for company data
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
// src/corporate/storage.rs
|
||||
use super::{types::*, helpers::*};
|
||||
use super::{types::*, helpers::*, scraper::get_primary_isin_and_name};
|
||||
use crate::config;
|
||||
|
||||
use tokio::fs;
|
||||
use chrono::{Datelike, NaiveDate};
|
||||
use std::collections::HashMap;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
pub async fn load_existing_events() -> anyhow::Result<HashMap<String, CompanyEvent>> {
|
||||
@@ -100,7 +102,7 @@ pub async fn save_prices_for_ticker(ticker: &str, timeframe: &str, mut prices: V
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn load_companies() -> Result<Vec<CompanyMetadata>, anyhow::Error> {
|
||||
pub async fn _load_companies() -> Result<Vec<CompanyMetadata>, anyhow::Error> {
|
||||
let path = Path::new("src/data/companies.json");
|
||||
if !path.exists() {
|
||||
println!("Missing companies.json file at src/data/companies.json");
|
||||
|
||||
Reference in New Issue
Block a user