queue_times

Crates.ioqueue_times
lib.rsqueue_times
version0.0.4
sourcesrc
created_at2021-06-16 04:05:39.728778
updated_at2021-06-21 04:59:10.738166
descriptionClient for scraping the queue times website.
homepage
repository
max_upload_size
id410721
size30,158
Andrew Ealovega (andyblarblar)

documentation

https://docs.rs/queue_times/

README

queue_times is a crate for scraping data from the queue times website.

Most consumers of this crate will want to use [client::CachedClient] or another client from [client]. This is enabled with the feature client.

use queue_times::client::{Client, QueueTimesClient, CachedClient};

let client = CachedClient::default(); //Replace with `Client::new()` to remove caching if needed
let parks = client.get_park_urls().await?;
let cedar_point_waits = client.get_ride_times(parks.get("Cedar Point")?.to_owned()).await?;

let mille_wait = cedar_point_waits.iter().find(|r| r.name == "Millennium Force").unwrap();

println!("The current wait for Millennium Force is: {:?}", mille_wait.status)

[parser] contains structs for parsing ride times from the raw html, and can be extended for parsing either newer versions of queue times as the API breaks, or even other websites (or anything really).

Commit count: 0

cargo fmt