forex_factory/lib.rs
1//! Forex Factory Calendar Scraper Library
2//!
3//! This library provides functionality to scrape economic event data from the
4//! Forex Factory calendar website.
5//!
6//! # Example
7//!
8//! ```ignore
9//! use forex_factory::{CalendarService, EventQuery, Impact, Result};
10//!
11//! async fn fetch_events() -> Result<()> {
12//! let service = CalendarService::new()?;
13//!
14//! // Get all events for this week
15//! let events = service.get_week_events().await?;
16//!
17//! // Query with filters
18//! let query = EventQuery::new()
19//! .with_currency_pair("EUR/USD")
20//! .with_min_impact(Impact::Medium);
21//! let filtered = service.query_events(&query).await?;
22//!
23//! Ok(())
24//! }
25//! ```
26
27mod error;
28mod scraper;
29mod service;
30mod types;
31
32// Re-export public types
33pub use error::{Error, Result};
34pub use scraper::{CalendarParser, HttpCalendarFetcher};
35pub use service::CalendarService;
36pub use types::{EconomicEvent, EventQuery, Impact, resolve_currency};