Available on crate features
scraper and reqwest only.Expand description
Network fetching module based on reqwest
Provides an all-in-one ability to fetch and parse BMS difficulty tables from a web page or a header JSON source:
- Fetch the page and extract the bmstable header URL from HTML (if present);
- Download and parse the header JSON;
- Download and parse chart data according to
data_urlin the header; - Return a
BmsTablecontaining the header and the chart set.
§Example
use bms_table::fetch::reqwest::{fetch_table, make_lenient_client};
let client = make_lenient_client()?;
let table = fetch_table(&client, "https://stellabms.xyz/sl/table.html").await?;
assert!(!table.data.charts.is_empty());Functions§
- fetch_
table - Fetch and parse a complete BMS difficulty table.
- fetch_
table_ full - Fetch and parse a complete BMS difficulty table from a web page or a header JSON source.
- fetch_
table_ list - Fetch a list of BMS difficulty tables.
- fetch_
table_ list_ full - Fetch a list of BMS difficulty tables along with the raw JSON string.
- make_
lenient_ client - Create a more lenient and compatible HTTP client.