Transit stop times (p:stoptimes)

http://profiles.goabout.com/stoptimes

The StopTimes resources represents a list of vehicles that will arrive and depart at the listed time. It will be linked to from within the Location (p:location) resource.

Stop times is a list of arrival and departure times of transit journeys at a stop. It is be linked from the Location (p:location) profile using the Stop times (r:stoptimes) relation.

Example

{
  "_embedded" : {
    "item" : [ {
      "actualArrivalTime" : "2013-08-20T12:00:00.000Z",
      "actualDepartureTime" : "2013-08-20T12:00:30.000Z",
      "scheduledArrivalTime" : "2013-08-20T12:00:00.000Z",
      "scheduledDepartureTime" : "2013-08-20T12:00:30.000Z",
      "dynamic" : false,
      "cancelled" : false,
      "lineNumber" : "5",
      "headsign" : "Amsterdam CS",
      "modeType" : "subway",
      "viaLabel" : "A'dam Sloterdijk, Haarlem, Beverwijk",
      "locationType" : "stop",
      "locationLabel" : "Halte Amsterdam, Keizersgracht",
      "_links" : {
        "self" : {
          "href" : "ni://goabout.com/sha-256;ZjM2NjlkZDUwMTM5ODQ2MTZkZjdhM2VmZDMzNjFjNzFkMjkyZTkxYTYxODVjMWU0ODI4NjE4Yjk1YjUxMzA5Ng=="
        },
        "http://rels.goabout.com/journey" : {
          "href" : "https://api.goabout.com/journey/ARR/TRIP1/20101203"
        },
        "http://rels.goabout.com/location": {
          "href": "https://api.goabout.com/location/stop/9e43ca13"
        }
      }
    } ]
  },
  "_links": {
    "self": {
      "href": "https://api.goabout.com/location/stop/9e43ca13/stoptimes"
    }
  }
}

Reference

Embedded

item:A list of Transit stop time (p:stoptime).

Methods

GET:Retrieve a list of Transit stop time (p:stoptime), associated with this stop, between the indicated interval.

Examples

First get a link from a location to the corresponding StopTimes resource:

$ curl -H'Authorization: Bearer UArtDY9Bpo9Whga2mfd7nIK6vENxp2twtnH7RvPC6xj0jy6' -H'Content-Type: application/json' 'https://api.goabout.com/geocoder/encode?query=Halte+Keizersgracht'
{
  "type" : "stop",
  "label" : "Halte Amsterdam, Keizersgracht",
  "coordinates" : {
    "latitude" : 4.2,
    "longitude" : 3.4
  },
  "name" : "Amsterdam Keizersgracht",
  "_links" : {
    "self" : {
      "href" : "https://api.goabout.com/location/stop/9e43ca13"
    },
    "http://rels.goabout.com/stoptimes" : {
      "href" : "https://api.goabout.com/location/stop/9e43ca13/stoptimes{?interval}",
      "templated" : true
    }

  }
}

Get the relation http://rels.goabout.com/stoptimes and expand the query-template. To get the “upcoming hour”, just use PT1H for the interval [1]. More complex intervals are possible of course, see the ISO8601 format.

$ curl -H'Authorization Bearer UArtDY9Bpo9Whga2mfd7nIK6vENxp2twtnH7RvPC6xj0jy6' -H'Content-Type application/json' 'https://api.goabout.com/location/stop/9e43ca13/stoptimes?interval=PT1H'
{
  "_embedded" : {
    "item" : [ {
      "actualArrivalTime" : "2013-08-20T12:00:00.000Z",
      "actualDepartureTime" : "2013-08-20T12:00:30.000Z",
      "scheduledArrivalTime" : "2013-08-20T12:00:00.000Z",
      "scheduledDepartureTime" : "2013-08-20T12:00:30.000Z",
      "dynamic" : false,
      "lineNumber" : "5",
      "headsign" : "Amsterdam CS",
      "modeType" : "subway",
      "locationType" : "stop",
      "locationLabel" : "Halte Amsterdam, Keizersgracht",
      "_links" : {
        "self" : {
          "href" : "ni://goabout.com/sha-256;ZjM2NjlkZDUwMTM5ODQ2MTZkZjdhM2VmZDMzNjFjNzFkMjkyZTkxYTYxODVjMWU0ODI4NjE4Yjk1YjUxMzA5Ng=="
        },
        "http://rels.goabout.com/journey" : {
          "href" : "https://api.goabout.com/journey/ARR/TRIP-ID-1/20101203"
        },
        "http://rels.goabout.com/location": {
          "href": "https://api.goabout.com/location/stop/9e43ca13"
        }
      }
    },
    {
      "actualArrivalTime" : "2013-08-20T12:10:00.000Z",
      "actualDepartureTime" : "2013-08-20T12:11:00.000Z",
      "scheduledArrivalTime" : "2013-08-20T12:10:00.000Z",
      "scheduledDepartureTime" : "2013-08-20T12:11:00.000Z",
      "dynamic" : false,
      "lineNumber" : "6",
      "headsign" : "Amsterdam CS",
      "modeType" : "subway",
      "locationType" : "stop",
      "locationLabel" : "Halte Amsterdam, Keizersgracht",
      "_links": {
        "self": {
          "href" : "ni://goabout.com/sha-256;MDc1MzhkZjkwNzc2M2JlOGRiZjlhNGU2NGZmODNkNDdhMTdjZGQwYjc2ZTBlMTJhYzk2YTc5ODY3NDQ1YWExMg=="
        },
        "http://rels.goabout.com/journey" : {
          "href" : "https://api.goabout.com/journey/ARR/TRIP-ID-2/20101203"
        },
        "http://rels.goabout.com/location": {
          "href": "https://api.goabout.com/location/stop/9e43ca13"
        }
      }
    },
    {
      ...
    } ]
  },
  "_links": {
    "self": {
      "href": "https://api.goabout.com/location/stop/9e43ca13/stoptimes"
    }
  }
}
[1]Note that the resource will assume now as a start and it will include the current date-time in its self-link.