Skip to main content

algeria_transit_services 2.2.0 copy "algeria_transit_services: ^2.2.0" to clipboard
algeria_transit_services: ^2.2.0 copied to clipboard

An unofficial, public API to access Algeria's transportation services

CHANGELOG #

2.2.0 #

  • Offline use: OfflineHttpClient keeps the last answer of lines, stops, route paths, cities and alerts and serves it without network (OfflineStore provided by the app); MassarApi.useHttpClient, MassarApi.downloadForOffline.
  • Subline.getSublines uses RouteLine.httpClient (was the global http client).
  • RouteLine.toJson keeps service and writes the type as typ (a cached line lost its type); LineService.toJson.

2.1.0 #

  • LineService (fare, hours, frequency; admin-set or learned from past buses), also in RouteLine.service from getLine; LineService.fetch, headwayAt, ServiceHours.isRunningAt.
  • Alerts.fetch / ServiceAlert (city, line or stop notices; empty on servers without alerts).
  • Feedback.send (FeedbackKind): report a problem, anonymously.
  • BusShare: share the position of the bus you ride (anonymous session per ride).
  • Realtime messages and departures carry source (isPassengerShared); Departure.vehicleId for passenger-shared buses.
  • LocationWebSocket.follow: tell the server which bus you follow (the driver sees a count).
  • RideLeg.headwayMinutes for untracked rides.
  • FeatureUnavailable / CommunityException.

1.0.0 #

  • Initial version.

1.0.4 #

  • Changed to Microsoft Azure hosting.

1.3.1 #

  • Station.code is a String (codes like 12002-S0001); Station.getLines and Departures.getDepartures take the code as a String. Parsing int codes threw on the new codes.

1.3.0 #

  • RouteLine.number and Departure.routeNumber: the short line number for badges (num / route_num). Codes are now system codes like 12-CHR-L01; both fall back to the code on older servers.

1.2.0 #

  • Realtime messages carry the bus: BusPosition.busId/sublineId, RouteStationInfo.busId/sublineId.
  • New BusStale (stale message) and ConnectionOpened (connection message).
  • ConnectionClose now carries busId and reason (stopped or timeout).
  • locationParser returns UnknownMessage for unknown types instead of throwing.
  • StationOnRoute: stopCode, stopNameArabic; estimatedArrival parses ISO timestamps; numeric fields accept ints.
  • Departure: isStale, lastSeen. Departures.getDepartures returns an empty list when no bus is tracked instead of throwing.
  • Subline.fromJson reads the direction from way (or dir).
  • Station.fromId reads the data object; Station.fromJson accepts integer coordinates.

1.4.0 #

  • Trip planning: TripPlanner.plan() (POST /api/plan) with TripPlan, TripOption, WalkLeg/RideLeg and WalkOnly.

1.5.0 #

  • Place search: Places.search() (POST /api/places/search) returning Places.

1.6.0 #

  • RideLeg.rideSource (RideSource.live|history|partial|estimate): where the ride time comes from.

2.0.0 #

  • Removed the Mallorca (TIB) leftovers: TransitRss, NewsScraper and the other scrapers, RouteLine.getPdfTimetable, Station.fromId, BusStopped (never sent by the server; stop messages now parse as UnknownMessage). Dropped the html and dart_rss dependencies.
  • Departures.httpClient for tests; no more debug printing.
  • Tests use real Massar API responses (test/fixtures); README and example rewritten.
  • Directions in English: Way.outbound / Way.back (was Way.way / Way.back); reads the server's outbound / return and the older Catalan Anada / Tornada.
0
likes
150
points
420
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

An unofficial, public API to access Algeria's transportation services

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

http, latlong2, web_socket_channel, xml

More

Packages that depend on algeria_transit_services