katsutedev / onemta Goto Github PK
View Code? Open in Web Editor NEWThe MTA Bus and Subway APIs all in one Java library
Home Page: https://katsute.dev/product/onemta
License: GNU General Public License v2.0
The MTA Bus and Subway APIs all in one Java library
Home Page: https://katsute.dev/product/onemta
License: GNU General Public License v2.0
Use GTFS feeds for bus rather than json
http://bt.mta.info/wiki/Developers/GTFSRt
GTFS is far more efficient than raw json requests.
This issue ticket is for internal tracking, developers please refer to issue #61.
Bus data is served in a folder within the zip, rather than the base directory. The below section needs to be modified to reflect this change.
OneMTA/src/main/java/dev/katsute/onemta/DataResource.java
Lines 76 to 88 in f1e627b
ubuntu-latest
Java 17
1.0.1
Possibly caused by the change in the service status proto: OneBusAway/onebusaway-gtfs-realtime-api@9d31123
No response
Windows 10
Java 17
1.1.0-SNAPSHOT
Busses under Bus Company use the LineRef
: MTABC_
not MTA NYCT_
The code needs to internally run a check if the Bus Company static data is used, and adjust the LineRef
accordingly.
No response
For methods that return enums as strings, use @see
pointing towards the enum in the GTFS library.
Allow developers to easily see what string values can be returned.
ubuntu-latest
Java 8, 11, 17
1.1.0-SNAPSHOT
Using the update method causes some tests to fail, particularly vehicles. Change the update tests so it updates a new instance, rather than the one pregenerated for the test case.
No response
When parsed, sort the list by keys; when requesting use a binary search.
Current implementation is inefficient.
Stop descriptions are no longer used and should be removed
Add support for station transfer information. Keys are non-unique, csv parser may need to be altered.
Sample csv:
from_stop_id,to_stop_id,transfer_type,min_transfer_time
101,101,2,180
103,103,2,180
104,104,2,180
106,106,2,180
107,107,2,180
This method might need to be updated:
OneMTA/src/main/java/dev/katsute/onemta/CSV.java
Lines 69 to 76 in 130f962
Developers may want transfer information.
Windows 10
Java 17
1.0.1
Arrival/departure times are incorrect, code is expecting epoch to be in milliseconds while gtfs returns epoch in seconds. Fix this by multiplying the time by 1000.
OneMTA/src/main/java/dev/katsute/onemta/MTASchema_Subway.java
Lines 470 to 471 in 130f962
OneMTA/src/main/java/dev/katsute/onemta/MTASchema_LIRR.java
Lines 478 to 479 in 130f962
OneMTA/src/main/java/dev/katsute/onemta/MTASchema_MNR.java
Lines 434 to 435 in 130f962
No response
Java is failing to download from URL, need to convert to bash script for test provider.
Should be run manually when testing. Need to update action flow.
Windows 10
Java 17
1.0.2
Same issue as #23, multiply this time number by 1000 to fix it.
OneMTA/src/main/java/dev/katsute/onemta/MTASchema.java
Lines 83 to 84 in e5e80dc
No response
Auth is changing from login/pwd to a user token
Anytime a bus is requested:
Current implementation runs a new request for every bus which is not efficient for enterprise. Requesting all busses then parsing is more efficient when submitting multiple requests.
Missing ~X
routes
OneMTA/src/main/java/dev/katsute/onemta/MTAImpl.java
Lines 115 to 154 in ebf9c8e
Add a new method .update(inplace?)
to stop, route, and vehicle objects; to allow developers to refresh realtime data without having to make new calls.
The inplace
parameter should be false by default and return a new object to prevent developers from accidentally changing objects that are in use by other concurrent operations.
Prevent redundant calls to the base object and to reduce confusion for developers expecting the realtime data to update everytime they make a call.
The MTA SIRI Bus API has received an update: https://bustime.mta.info/wiki/Developers/CancelledTripAPIFeatures
Without Cancelled Trip Information | With Cancelled Trip Information | |
---|---|---|
v1 | /api/siri/stop-monitoring.xml |
/api/2/siri/stop-monitoring.xml |
v2 | /api/siri/stop-monitoring.xml?version=2 |
/api/2/siri/stop-monitoring.xml?version=2 |
<MonitoredVehicleJourney>
<MonitoredStopVisit>
-- <MonitoredCall>
-- <ArrivalStatus>cancelled</ArrivalStatus>
-- <DepartureStatus>cancelled</DepartureStatus>
-- </MonitoredCall>
++ <MonitoredVehicleJourney>
++ <VehicleStatus>cancelled</VehicleStatus>
++ </MonitoredVehicleJourney>
</MonitoredStopVisit>
</MonitoredVehicleJourney>
entity {
id: "MTA NYCT_GH_A2-Weekday-SDon-063200_BX39_765"
alert {
informed_entity {
agency_id: "MTA NYCT"
trip {
route_id: "BX39"
direction_id: 0
}
}
informed_entity {
agency_id: "MTA NYCT"
trip {
route_id: "BX39"
direction_id: 1
}
}
effect: REDUCED_SERVICE
description_text {
translation {
text: "The 10:32am BX39 to SOUNDVIEW AV/CORNELL AV is canceled"
language: "EN"
}
}
}
}
Required to keep up to date with API.
Add method to subway vehicles to check if they are express.
Achieved by checking the route ID of the trip, express routes will end with an x
.
Local example: 7
Express example: 7X
Subway express statuses are a commonly requested field
This issue has been resolved in #63. Please update your library to 1.2.1^
.
Static data for MTA busses have recently changed so that data is saved inside a folder rather than the base directory in the zip file; because of this change the zip files are currently incompatible with this library.
In order to use the data with this library you must:
Provide utility methods for:
Should be an interface class with:
.isExactStop()
|| .isExactRoute()
.isSameStop()
|| .isSameRoute()
Simplify equality checking.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.