Module reqwest

Module reqwest 

Source
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_url in the header;
  • Return a BmsTable containing 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.