algeria_transit_services 2.2.0
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:
OfflineHttpClientkeeps the last answer of lines, stops, route paths, cities and alerts and serves it without network (OfflineStoreprovided by the app);MassarApi.useHttpClient,MassarApi.downloadForOffline. Subline.getSublinesusesRouteLine.httpClient(was the global http client).RouteLine.toJsonkeepsserviceand writes the type astyp(a cached line lost its type);LineService.toJson.
2.1.0 #
LineService(fare, hours, frequency; admin-set or learned from past buses), also inRouteLine.servicefromgetLine;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.vehicleIdfor passenger-shared buses. LocationWebSocket.follow: tell the server which bus you follow (the driver sees a count).RideLeg.headwayMinutesfor untracked rides.FeatureUnavailable/CommunityException.
1.0.0 #
- Initial version.
1.0.4 #
- Changed to Microsoft Azure hosting.
1.3.1 #
Station.codeis aString(codes like12002-S0001);Station.getLinesandDepartures.getDeparturestake the code as aString. Parsingintcodes threw on the new codes.
1.3.0 #
RouteLine.numberandDeparture.routeNumber: the short line number for badges (num/route_num). Codes are now system codes like12-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(stalemessage) andConnectionOpened(connectionmessage). ConnectionClosenow carriesbusIdandreason(stoppedortimeout).locationParserreturnsUnknownMessagefor unknown types instead of throwing.StationOnRoute:stopCode,stopNameArabic;estimatedArrivalparses ISO timestamps; numeric fields accept ints.Departure:isStale,lastSeen.Departures.getDeparturesreturns an empty list when no bus is tracked instead of throwing.Subline.fromJsonreads the direction fromway(ordir).Station.fromIdreads thedataobject;Station.fromJsonaccepts integer coordinates.
1.4.0 #
- Trip planning:
TripPlanner.plan()(POST /api/plan) withTripPlan,TripOption,WalkLeg/RideLegandWalkOnly.
1.5.0 #
- Place search:
Places.search()(POST /api/places/search) returningPlaces.
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,NewsScraperand the other scrapers,RouteLine.getPdfTimetable,Station.fromId,BusStopped(never sent by the server;stopmessages now parse asUnknownMessage). Dropped thehtmlanddart_rssdependencies. Departures.httpClientfor tests; no more debug printing.- Tests use real Massar API responses (
test/fixtures); README and example rewritten. - Directions in English:
Way.outbound/Way.back(wasWay.way/Way.back); reads the server'soutbound/returnand the older CatalanAnada/Tornada.