@Path(value="/routers/{routerId}/index") @Produces(value="application/json") public class IndexAPI extends Object
Constructor and Description |
---|
IndexAPI(OTPServer otpServer,
String routerId) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
getAgencies(String feedId)
Return a list of all agencies in the graph.
|
javax.ws.rs.core.Response |
getAgency(String feedId,
String agencyId)
Return specific agency in the graph, by ID.
|
javax.ws.rs.core.Response |
getAgencyRoutes(String feedId,
String agencyId)
Return all routes for the specific agency.
|
javax.ws.rs.core.Response |
getAllFlexAreas()
Return all GTFS-Flex area IDs.
|
javax.ws.rs.core.Response |
getAllStopClusters()
Return all clusters of stops.
|
javax.ws.rs.core.Response |
getFeedInfo(String feedId) |
javax.ws.rs.core.Response |
getFeeds() |
javax.ws.rs.core.Response |
getFlexAreaByFeedId(String areaIdString)
Return a specific GTFS-Flex area given an ID in Agency:ID format.
|
javax.ws.rs.core.Response |
getGeometryForPattern(String patternIdString)
Return geometry for the pattern as a packed coordinate sequence
|
javax.ws.rs.core.Response |
getGeometryForTrip(String tripIdString)
Return geometry for the trip as a packed coordinate sequence
|
javax.ws.rs.core.Response |
getGraphQL(HashMap<String,Object> queryParameters) |
javax.ws.rs.core.Response |
getGraphQL(String query) |
javax.ws.rs.core.Response |
getPattern(String patternIdString) |
javax.ws.rs.core.Response |
getPatterns() |
javax.ws.rs.core.Response |
getPatternsForRoute(String routeIdString)
Return all stop patterns used by trips on the given route.
|
javax.ws.rs.core.Response |
getPatternsForStop(String stopIdString) |
javax.ws.rs.core.Response |
getRoute(String routeIdString)
Return specific route in the graph, for the given ID.
|
javax.ws.rs.core.Response |
getRoutes(List<String> stopIds)
Return a list of all routes in the graph.
|
javax.ws.rs.core.Response |
getRoutesForStop(String stopId) |
javax.ws.rs.core.Response |
getSemanticHashForPattern(String patternIdString) |
javax.ws.rs.core.Response |
getSemanticHashForTrip(String tripIdString) |
javax.ws.rs.core.Response |
getServices()
List basic information about all service IDs.
|
javax.ws.rs.core.Response |
getServices(String serviceId)
List details about a specific service ID including which dates it runs on.
|
javax.ws.rs.core.Response |
getStop(String stopIdString)
Return specific transit stop in the graph, by ID.
|
javax.ws.rs.core.Response |
getStopCluster(String clusterIdString)
Return a cluster of stops by its ID.
|
javax.ws.rs.core.Response |
getStopsForPattern(String patternIdString) |
javax.ws.rs.core.Response |
getStopsForRoute(String routeIdString)
Return all stops in any pattern on a given route.
|
javax.ws.rs.core.Response |
getStopsForTrip(String tripIdString) |
javax.ws.rs.core.Response |
getStopsInRadius(Double minLat,
Double minLon,
Double maxLat,
Double maxLon,
Double lat,
Double lon,
Double radius)
Return a list of all stops within a circle around the given coordinate.
|
javax.ws.rs.core.Response |
getStoptimesForStop(String stopIdString,
long startTime,
int timeRange,
int numberOfDepartures,
boolean omitNonPickups)
Return upcoming vehicle arrival/departure times at the given stop.
|
javax.ws.rs.core.Response |
getStoptimesForStopAndDate(String stopIdString,
String date,
boolean omitNonPickups)
Return upcoming vehicle arrival/departure times at the given stop.
|
javax.ws.rs.core.Response |
getStoptimesForTrip(String tripIdString) |
javax.ws.rs.core.Response |
getTransfers(String stopIdString)
Return the generated transfers a stop in the graph, by stop ID
|
javax.ws.rs.core.Response |
getTrip(String tripIdString) |
javax.ws.rs.core.Response |
getTripsForPattern(String patternIdString) |
javax.ws.rs.core.Response |
getTripsForRoute(String routeIdString)
Return all trips in any pattern on the given route.
|
@GET @Path(value="/feeds") public javax.ws.rs.core.Response getFeeds()
@GET @Path(value="/feeds/{feedId}") public javax.ws.rs.core.Response getFeedInfo(@PathParam(value="feedId") String feedId)
@GET @Path(value="/agencies/{feedId}") public javax.ws.rs.core.Response getAgencies(@PathParam(value="feedId") String feedId)
@GET @Path(value="/agencies/{feedId}/{agencyId}") public javax.ws.rs.core.Response getAgency(@PathParam(value="feedId") String feedId, @PathParam(value="agencyId") String agencyId)
@GET @Path(value="/agencies/{feedId}/{agencyId}/routes") public javax.ws.rs.core.Response getAgencyRoutes(@PathParam(value="feedId") String feedId, @PathParam(value="agencyId") String agencyId)
@GET @Path(value="/stops/{stopId}") public javax.ws.rs.core.Response getStop(@PathParam(value="stopId") String stopIdString)
@GET @Path(value="/stops") public javax.ws.rs.core.Response getStopsInRadius(@QueryParam(value="minLat") Double minLat, @QueryParam(value="minLon") Double minLon, @QueryParam(value="maxLat") Double maxLat, @QueryParam(value="maxLon") Double maxLon, @QueryParam(value="lat") Double lat, @QueryParam(value="lon") Double lon, @QueryParam(value="radius") Double radius)
@GET @Path(value="/stops/{stopId}/routes") public javax.ws.rs.core.Response getRoutesForStop(@PathParam(value="stopId") String stopId)
@GET @Path(value="/stops/{stopId}/patterns") public javax.ws.rs.core.Response getPatternsForStop(@PathParam(value="stopId") String stopIdString)
@GET @Path(value="/stops/{stopId}/stoptimes") public javax.ws.rs.core.Response getStoptimesForStop(@PathParam(value="stopId") String stopIdString, @QueryParam(value="startTime") long startTime, @QueryParam(value="timeRange") @DefaultValue(value="86400") int timeRange, @QueryParam(value="numberOfDepartures") @DefaultValue(value="2") int numberOfDepartures, @QueryParam(value="omitNonPickups") boolean omitNonPickups)
stopIdString
- Stop ID in Agency:Stop ID formatstartTime
- Start time for the search. Seconds from UNIX epochtimeRange
- Searches forward for timeRange seconds from startTimenumberOfDepartures
- Number of departures to fetch per pattern@GET @Path(value="/stops/{stopId}/stoptimes/{date}") public javax.ws.rs.core.Response getStoptimesForStopAndDate(@PathParam(value="stopId") String stopIdString, @PathParam(value="date") String date, @QueryParam(value="omitNonPickups") boolean omitNonPickups)
date
- in YYYYMMDD format@GET @Path(value="/stops/{stopId}/transfers") public javax.ws.rs.core.Response getTransfers(@PathParam(value="stopId") String stopIdString)
@GET @Path(value="/routes") public javax.ws.rs.core.Response getRoutes(@QueryParam(value="hasStop") List<String> stopIds)
@GET @Path(value="/routes/{routeId}") public javax.ws.rs.core.Response getRoute(@PathParam(value="routeId") String routeIdString)
@GET @Path(value="/routes/{routeId}/patterns") public javax.ws.rs.core.Response getPatternsForRoute(@PathParam(value="routeId") String routeIdString)
@GET @Path(value="/routes/{routeId}/stops") public javax.ws.rs.core.Response getStopsForRoute(@PathParam(value="routeId") String routeIdString)
@GET @Path(value="/routes/{routeId}/trips") public javax.ws.rs.core.Response getTripsForRoute(@PathParam(value="routeId") String routeIdString)
@GET @Path(value="/trips/{tripId}") public javax.ws.rs.core.Response getTrip(@PathParam(value="tripId") String tripIdString)
@GET @Path(value="/trips/{tripId}/stops") public javax.ws.rs.core.Response getStopsForTrip(@PathParam(value="tripId") String tripIdString)
@GET @Path(value="/trips/{tripId}/semanticHash") public javax.ws.rs.core.Response getSemanticHashForTrip(@PathParam(value="tripId") String tripIdString)
@GET @Path(value="/trips/{tripId}/stoptimes") public javax.ws.rs.core.Response getStoptimesForTrip(@PathParam(value="tripId") String tripIdString)
@GET @Path(value="/trips/{tripId}/geometry") public javax.ws.rs.core.Response getGeometryForTrip(@PathParam(value="tripId") String tripIdString)
@GET @Path(value="/patterns") public javax.ws.rs.core.Response getPatterns()
@GET @Path(value="/patterns/{patternId}") public javax.ws.rs.core.Response getPattern(@PathParam(value="patternId") String patternIdString)
@GET @Path(value="/patterns/{patternId}/trips") public javax.ws.rs.core.Response getTripsForPattern(@PathParam(value="patternId") String patternIdString)
@GET @Path(value="/patterns/{patternId}/stops") public javax.ws.rs.core.Response getStopsForPattern(@PathParam(value="patternId") String patternIdString)
@GET @Path(value="/patterns/{patternId}/semanticHash") public javax.ws.rs.core.Response getSemanticHashForPattern(@PathParam(value="patternId") String patternIdString)
@GET @Path(value="/patterns/{patternId}/geometry") public javax.ws.rs.core.Response getGeometryForPattern(@PathParam(value="patternId") String patternIdString)
@GET @Path(value="/services") public javax.ws.rs.core.Response getServices()
@GET @Path(value="/services/{serviceId}") public javax.ws.rs.core.Response getServices(@PathParam(value="serviceId") String serviceId)
@GET @Path(value="/clusters") public javax.ws.rs.core.Response getAllStopClusters()
@GET @Path(value="/clusters/{clusterId}") public javax.ws.rs.core.Response getStopCluster(@PathParam(value="clusterId") String clusterIdString)
@GET @Path(value="/flexAreas") public javax.ws.rs.core.Response getAllFlexAreas()
@GET @Path(value="/flexAreas/{id}") public javax.ws.rs.core.Response getFlexAreaByFeedId(@PathParam(value="id") String areaIdString)
@POST @Path(value="/graphql") @Consumes(value="application/json") public javax.ws.rs.core.Response getGraphQL(HashMap<String,Object> queryParameters)
@POST @Path(value="/graphql") @Consumes(value="application/graphql") public javax.ws.rs.core.Response getGraphQL(String query)
Copyright © 2019. All rights reserved.