fetchPath function

Future<Path> fetchPath(
  1. String apiKey, {
  2. required String startStationCode,
  3. required String destinationStationCode,
})

Fetches the path between two stations.

apiKey is your API key for the WMATA API.

startStationCode is the station code of the station you want to start at.

destinationStationCode is the station code of the station you want to end at.

Implementation

Future<Path> fetchPath(
  String apiKey, {
  required String startStationCode,
  required String destinationStationCode,
}) async =>
    await PathBetweenStationsService.fetchPath(
      apiKey,
      startStationCode: startStationCode,
      destinationStationCode: destinationStationCode,
    );