pub fn parse_gtfs_systems(systems_csv: &str) -> Vec<GBFSSystem>Expand description
§General Bikeshare Feed Specification (GBFS) Reader
§Description
Fetches the list of GBFS systems from the github CSV file
§Usage
use gistools::readers::{GBFSSystem, parse_gtfs_systems};
use std::{fs, path::PathBuf};
let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
path.push("tests/readers/gbfs/fixtures/systems.csv");
let file_str = fs::read_to_string(path).unwrap();
let systems = parse_gtfs_systems(file_str.as_str());
assert_eq!(systems.len(), 960);§Links
- https://github.com/MobilityData/gbfs/blob/master/systems.csv
§Parameters
systems_csv: The data of the CSV file as a string. The default is the one used by GBFS. This variable exists for testing
§Returns
An array of systems