fetchScheduleAtStop function

Future<ScheduleAtStop> fetchScheduleAtStop(
  1. String apiKey, {
  2. required String stopId,
  3. DateTime? date,
})

Fetches the schedule for a specific stop.

apiKey is your API key for the WMATA API.

date is the date for which to retrieve the schedule at the stop. If omitted, the current date will be used.

Implementation

Future<ScheduleAtStop> fetchScheduleAtStop(
  String apiKey, {
  required String stopId,
  DateTime? date,
}) async =>
    await ScheduleAtStopService.fetchScheduleAtStop(
      apiKey,
      stopId: stopId,
      date: date?.toWmataStringDateOnly(),
    );