The original OBA APIs were created primarily for apps with robust UIs, but for wearables it seems that more refined direct entry of parameters that would come directly from the user should be supported. Seems like it would be useful to offer stop_code as a parameter for the arrivals-and-departures-for-stop API directly? This would avoid an additional API call just to map IDs (although you could save the mapping upon first entry, to avoid mapping again the next time the user selects that same ID). Then, you’d pass the stop_id from that response into the arrival-and-departures-for-stop API:įrom my knowledge this is the quickest way to map from stop_code to stop_id, although others can correct me if I’m wrong. Note you may need to provide a wide radius if you want to search a long distance from the user’s current location (although that also increases the chance of duplicate stop_code results, perhaps from neighboring agencies). From a quick test using CTA data, it looks like you can pass in the stop_code (i.e., what is visible to the user at the stop) into the stops-for-location API as a query, and it will return the correct stop: to the internal stop ID, which is stop_id in GTFS stops.txt). The stop ID shown on signs should be the stop_code field from GTFS stops.txt (vs. You can get the list of supported agencies for a region using agency-with-coverage method: After you sign in: If you have purchased or subscribed to a RealNetworks product, you can access agent support by email. For example, in Tampa HART doesn’t provide an agency_id, so requests look like: The prefix (“1_” in your example) is the agency_id from GTFS agency.txt ( ), or the agency_name from that same file if agency_id isn’t provided. Please let us know if you have any more questions! This involves clearing out old temporary internet files and resetting privacy and security settings. To fix it, you'll need to reset your web browser. Solution 2: Reset your Web Browser Your web browser may be blocking communication with the Internet. If you'd like to support multiple regions, get an API key from the region closest to you (Atlanta? - ), and then contact the remaining regions (currently Puget Sound and Tampa) and request that the same API key from Atlanta be added to those instances. Solution 1: Manually start the RealTimes Desktop Service. You will need an API key for each region. Note that you can get a JSON response by using ".json" instead of ".xml" in the URL. and then get the arrival times for a specific stop that the user selects (which takes the stop ID as an argument):Īlso, please note that we have a Regions API where you can pull back information about all OneBusAway regions programmatically (this is how the iOS and Android apps support multiple regions): The normal flow of the iOS and Android apps is to first get stops nearby the user's current location, using: Great to hear you're developing a Pebble app for OneBusAway.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |