Crates.io | simplygo |
lib.rs | simplygo |
version | 0.2.0 |
source | src |
created_at | 2024-05-17 04:08:23.352757 |
updated_at | 2024-05-31 03:42:32.234254 |
description | Simplygo SDK for Rust. |
homepage | |
repository | https://github.com/mrzzy/providence |
max_upload_size | |
id | 1242803 |
size | 97,943 |
simplygo
is an Rust SDK for programming interfacing with the Translink Simplygo site.
SimplyGo
client: login with credentials, scrape HTML from SimplyGo site.parsing
module: Parse scraped HTML from SimplyGo site into native rust structs.cargo add simplygo
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)
});