simplygo

Crates.iosimplygo
lib.rssimplygo
version0.2.0
sourcesrc
created_at2024-05-17 04:08:23.352757
updated_at2024-05-31 03:42:32.234254
descriptionSimplygo SDK for Rust.
homepage
repositoryhttps://github.com/mrzzy/providence
max_upload_size
id1242803
size97,943
Zhu Zhanyan (mrzzy)

documentation

README

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

MIT

Commit count: 612

cargo fmt