这是indexloc提供的服务,不要输入任何密码

gtfs_bindings 0.1.0 copy "gtfs_bindings: ^0.1.0" to clipboard
gtfs_bindings: ^0.1.0 copied to clipboard

A wrapper package around GTFS Schedule datasets.

example/gtfs_bindings_example.dart

import 'dart:io';

import 'package:gtfs_bindings/schedule.dart';

Future<void> main() async {
  // https://eu.ftp.opendatasoft.com/stif/GTFS/IDFM-gtfs.zip - Île de France
  // https://exs.tcar.cityway.fr/gtfs.aspx?key=OPENDATA&operatorCode=ASTUCE - Astuce
  final dataset = DownloadableDataset(
    Uri.parse(
      'https://exs.tcar.cityway.fr/gtfs.aspx?key=OPENDATA&operatorCode=ASTUCE',
    ),
  );
  await dataset.pipe(
    tempDir: Directory('/tmp'),
  ); // Preferably use path_provider's getTemporaryDirectory
  await dataset.populateList(dataset.bindings);
  print('${await dataset.routes.count()} routes were counted');
}
1
likes
130
points
31
downloads

Publisher

verified publisherhelomri.tech

Weekly Downloads

A wrapper package around GTFS Schedule datasets.

Repository (GitHub)
View/report issues

Topics

#gtfs #parser #wrapper

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

archive, async, csv, http, intl, logging, mgrs_dart, path

More

Packages that depend on gtfs_bindings