stoptimetable needs to include the StopPointName

18 views
Skip to first unread message

mpo...@gmail.com

unread,
Aug 16, 2021, 9:26:14 PM8/16/21
to 511SFBayDeveloperResources
I just coded up the Scheduled Departures at a Stop endpoint and it gives me almost all the fields I expected. It returns a structure very similar to the Real Time stop monitoring, except that it doesn't show the StopPointName.

It would be really useful to have TargetedCall>StopPointName in stoptimetable
similar to MonitoredCall>StopPointName

How would I go about requesting such a change to the endpoint?

Mike

Nisar Ahmed

unread,
Aug 17, 2021, 2:37:45 PM8/17/21
to 511sfbaydevel...@googlegroups.com

The StopMonitoring API that has the StopPointName provides both scheduled and predicted arrival/departure times. Scheduled is <AimedArrivalTime> and predicted is <ExpectedArrivalTime>.

 

Hope this is helpful.

 

--Nisar

 

From: 511sfbaydevel...@googlegroups.com <511sfbaydevel...@googlegroups.com> On Behalf Of mpo...@gmail.com
Sent: Monday, August 16, 2021 6:26 PM
To: 511SFBayDeveloperResources <511sfbaydevel...@googlegroups.com>
Subject: [511SFBayDeveloperResources] stoptimetable needs to include the StopPointName

 

*External Email*

 

--
You received this message because you are subscribed to the Google Groups "511SFBayDeveloperResources" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 511sfbaydeveloperre...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/511sfbaydeveloperresources/700c5c82-eeb6-4076-952b-266711d55ff3n%40googlegroups.com.

mpo...@gmail.com

unread,
Aug 17, 2021, 3:16:36 PM8/17/21
to 511SFBayDeveloperResources
I'm asking this change for agencies that are NOT monitored.  If a user asks for the schedule at a specific stop number, it does not provide the stop name.

Nisar Ahmed

unread,
Aug 17, 2021, 3:36:30 PM8/17/21
to 511sfbaydevel...@googlegroups.com

In that case, you may want to pair up your query with the http://api.511.org/transit/stops? API.

mpo...@gmail.com

unread,
Aug 17, 2021, 3:49:55 PM8/17/21
to 511SFBayDeveloperResources
I'm trying to avoid having to make 2 calls, especially if the stops API has to return a very large list. I'm also thinking of the case where someone enters a stop number without telling me the agency. I may have to make up to 33 calls to the stops API to find the correct agency.

Take WestCat for example. What is the stop name for stop 2176?

Stop name is not here:
{
  "ServiceDelivery": {
    "ResponseTimestamp": "2021-08-17T19:30:44Z",
    "ProducerRef": "WC",
    "Status": true,
    "StopMonitoringDelivery": {
      "version": "1.4",
      "ResponseTimestamp": "2021-08-17T19:30:44Z",
      "Status": true,
      "MonitoredStopVisit": [
        
      ]
    }
  }
}

Stop name is not here, but should be in TargetedCall to match the format of stopmonitoring when it has monitored stop visits:
{
  "Siri": {
    "ServiceDelivery": {
      "ResponseTimestamp": "2021-08-16T16:13:06-07:00",
      "Status": true,
      "StopTimetableDelivery": {
        "ResponseTimestamp": "2021-08-16T16:13:06-07:00",
        "TimetabledStopVisit": [
          {
            "RecordedAtTime": "2021-06-17T10:04:35-07:00",
            "MonitoringRef": "2176",
            "TargetedVehicleJourney": {
              "LineRef": "10",
              "DirectionRef": "LP",
              "DatedVehicleJourneyRef": "1018113255660",
              "PublishedLineName": "10",
              "OperatorRef": "WC",
              "OriginRef": "25501",
              "OriginName": "Hercules Transit Center",
              "DestinationRef": "25501",
              "DestinationName": "Hercules Transit Center",
              "VehicleJourneyName": "Loop Route",
              "TargetedCall": {
                "VisitNumber": "1",
                "AimedArrivalTime": "2021-08-16T16:52:06-07:00",
                "AimedDepartureTime": "2021-08-16T16:52:06-07:00"
              }
            }
          },
          {
            "RecordedAtTime": "2021-06-17T10:04:35-07:00",
            "MonitoringRef": "2176",
            "TargetedVehicleJourney": {
              "LineRef": "10",
              "DirectionRef": "LP",
              "DatedVehicleJourneyRef": "1018140255660",
              "PublishedLineName": "10",
              "OperatorRef": "WC",
              "OriginRef": "25501",
              "OriginName": "Hercules Transit Center",
              "DestinationRef": "25501",
              "DestinationName": "Hercules Transit Center",
              "VehicleJourneyName": "Loop Route",
              "TargetedCall": {
                "VisitNumber": "1",
                "AimedArrivalTime": "2021-08-16T17:32:06-07:00",
                "AimedDepartureTime": "2021-08-16T17:32:06-07:00"
              }
            }
          },
          {
            "RecordedAtTime": "2021-06-17T10:04:35-07:00",
            "MonitoringRef": "2176",
            "TargetedVehicleJourney": {
              "LineRef": "10",
              "DirectionRef": "LP",
              "DatedVehicleJourneyRef": "1017859255660",
              "PublishedLineName": "10",
              "OperatorRef": "WC",
              "OriginRef": "25501",
              "OriginName": "Hercules Transit Center",
              "DestinationRef": "25501",
              "DestinationName": "Hercules Transit Center",
              "VehicleJourneyName": "Loop Route",
              "TargetedCall": {
                "VisitNumber": "1",
                "AimedArrivalTime": "2021-08-16T18:12:06-07:00",
                "AimedDepartureTime": "2021-08-16T18:12:06-07:00"
              }
            }
          }
        ]
      }
    }
  }
}


Reply all
Reply to author
Forward
0 new messages