2 unstable releases
0.2.0 | May 31, 2024 |
---|---|
0.1.0 | May 17, 2024 |
#625 in Authentication
33KB
752 lines
simplygo
simplygo
is an Rust SDK for programming interfacing with the Translink Simplygo site.
Features
SimplyGo
client: login with credentials, scrape HTML from SimplyGo site.parsing
module: Parse scraped HTML from SimplyGo site into native rust structs.
Installation
cargo add simplygo
Usage
use simplygo::SimplyGo;
use simplygo::parsing::parse_trips;
let simplygo = SimplyGo::default().login(&args.username, &args.password);
let cards = simplygo.cards();
cards.iter().for_each(|card| {
let html = simplygo.trips(card, NaiveDate::from_ymd(...), NaiveDate::from_ymd(...));
let trips = parse_trips(&card.id, html)
});
License
Dependencies
~11–24MB
~327K SLoC