vlr_scraper/
lib.rs

1//! # vlr-scraper
2//!
3//! A Rust library for scraping Valorant esports data from [vlr.gg](https://www.vlr.gg).
4//!
5//! ## Quick start
6//!
7//! ```no_run
8//! # async fn example() -> vlr_scraper::Result<()> {
9//! use vlr_scraper::{EventType, Region, VlrClient};
10//!
11//! let client = VlrClient::new();
12//!
13//! // Fetch upcoming events
14//! let events = client
15//!     .get_events(EventType::Upcoming, Region::All, 1)
16//!     .await?;
17//!
18//! // Fetch matches for the first event
19//! let matches = client.get_event_matchlist(events.events[0].id).await?;
20//!
21//! // Get detailed match info
22//! let match_detail = client.get_match(matches[0].id).await?;
23//!
24//! // Fetch a player profile (info, teams, agent stats, news, placements)
25//! let player = client.get_player(17323, Default::default()).await?;
26//! println!("{} from {:?}", player.info.name, player.info.country);
27//!
28//! // Fetch a player's match history
29//! let player_matches = client.get_player_matchlist(17323, 1).await?;
30//!
31//! // Fetch a team's match history
32//! let team_matches = client.get_team_matchlist(6530, 1).await?;
33//! # Ok(())
34//! # }
35//! ```
36
37mod client;
38pub mod error;
39pub mod model;
40mod vlr_scraper;
41
42// Re-export the client as the primary public API.
43pub use client::VlrClient;
44// Re-export error types at the crate root for convenience.
45pub use error::{Result, VlrError};
46// Re-export all model types at the crate root for convenience.
47pub use model::*;