openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 8.7 kB
JSON
{"openapi":"3.0.0","info":{"description":"Real-time bus prediction methods.","title":"Real-Time Bus Predictions","version":"1.0","x-apisguru-categories":["transport"],"x-logo":{"url":"https://twitter.com/wmata/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"https://developer.wmata.com/docs/services/5476365e031f590f38092508/export?DocumentFormat=Swagger","version":"2.0"}],"x-providerName":"wmata.com","x-serviceName":"bus-realtime"},"security":[{"apiKeyHeader":[]},{"apiKeyQuery":[]}],"tags":[],"paths":{"/Predictions":{"get":{"description":"<h4 class=\"text-primary\">Description</h4>\r\n\r\n<p>Returns next bus arrival times at a stop.</p>\r\n\r\n<h4 class=\"text-primary\">Response Elements</h4>\r\n\r\n<table class=\"table table-condensed table-hover\">\r\n<thead>\r\n<tr>\r\n<th class=\"col-md-3\">Element</th>\r\n\r\n<th>Description</th>\r\n</tr>\r\n</thead>\r\n\r\n<tbody>\r\n<tr>\r\n<td>Predictions</td>\r\n\r\n<td>\r\nArray containing bus predictions (<a href=\r\n\"#NextBusPrediction\">NextBusPrediction</a>).\r\n</td>\r\n</tr>\r\n\r\n<tr>\r\n<td>StopName</td>\r\n\r\n<td>Full name of the given StopID.</td>\r\n</tr>\r\n\r\n<tr>\r\n<td colspan=\"2\">\r\n<div class=\"text-primary\" style=\"margin-top: 1em\">\r\n<a id=\"NextBusPrediction\" name=\r\n\"NextBusPrediction\">NextBusPrediction Elements</a>\r\n</div>\r\n</td>\r\n</tr>\r\n\r\n<tr>\r\n<td>DirectionNum</td>\r\n\r\n<td>Denotes a binary direction (0 or 1) of the bus. There is no\r\nspecific mapping to direction, but a different value for the same\r\nroute signifies that the buses are traveling in opposite\r\ndirections. Use the DirectionText element to show the actual\r\ndestination of the bus.</td>\r\n</tr>\r\n\r\n<tr>\r\n<td>DirectionText</td>\r\n\r\n<td>Customer-friendly description of direction and destination for\r\na bus.</td>\r\n</tr>\r\n\r\n<tr>\r\n<td>Minutes</td>\r\n\r\n<td>Minutes until bus arrival at this stop. Numeric value.</td>\r\n</tr>\r\n\r\n<tr>\r\n<td>RouteID</td>\r\n\r\n<td>Base route name as shown on the bus. This can be used in other\r\nbus-related methods. Note that all variants will be shown as their\r\nbase route names (i.e.: 10Av1 and 10Av2 will be shown as 10A).</td>\r\n</tr>\r\n\r\n<tr>\r\n<td>TripID</td>\r\n\r\n<td>Trip identifier. This can be correlated with the data in our\r\nbus schedule information as well as bus positions.</td>\r\n</tr>\r\n\r\n<tr>\r\n<td>VehicleID</td>\r\n\r\n<td>Bus identifier. This can be correlated with results returned\r\nfrom bus positions.</td>\r\n</tr>\r\n</tbody>\r\n</table>","operationId":"5476365e031f5909e4fe331e","parameters":[{"description":"7-digit regional stop ID.","in":"query","name":"StopID","required":true,"schema":{"type":"string","enum":["1001195"],"default":"1001195"}}],"responses":{"200":{"description":"Default response code.","content":{"text/xml":{"examples":{"response":{"value":"<NextBusResponse\n xmlns=\"http://www.wmata.com\"\n xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">\n <Predictions>\n <NextBusPrediction>\n <DirectionNum>0</DirectionNum>\n <DirectionText>North to Bwi - Thurgood Marshall Airport</DirectionText>\n <Minutes>8</Minutes>\n <RouteID>B30</RouteID>\n <TripID>6794838</TripID>\n <VehicleID>6217</VehicleID>\n </NextBusPrediction>\n <NextBusPrediction>\n <DirectionNum>1</DirectionNum>\n <DirectionText>South to Greenbelt Station</DirectionText>\n <Minutes>37</Minutes>\n <RouteID>B30</RouteID>\n <TripID>6794868</TripID>\n <VehicleID>6217</VehicleID>\n </NextBusPrediction>\n <NextBusPrediction>\n <DirectionNum>0</DirectionNum>\n <DirectionText>North to Bwi - Thurgood Marshall Airport</DirectionText>\n <Minutes>48</Minutes>\n <RouteID>B30</RouteID>\n <TripID>6794839</TripID>\n <VehicleID>6213</VehicleID>\n </NextBusPrediction>\n <NextBusPrediction>\n <DirectionNum>1</DirectionNum>\n <DirectionText>South to Greenbelt Station</DirectionText>\n <Minutes>77</Minutes>\n <RouteID>B30</RouteID>\n <TripID>6794869</TripID>\n <VehicleID>6213</VehicleID>\n </NextBusPrediction>\n </Predictions>\n <StopName>Bwi Airport + Stop 2</StopName>\n</NextBusResponse>"}}}}},"400":{"description":"Response from invalid Stop ID.","content":{"application/xml":{"examples":{"response":{"value":"<Error><Message>Stop Id not specified, invalid, or does not exist.</Message></Error>"}}}}}},"summary":"XML - Next Buses"}},"/json/jPredictions":{"get":{"description":"<h4 class=\"text-primary\">Description</h4>\r\n\r\n<p>Returns next bus arrival times at a stop.</p>\r\n\r\n<h4 class=\"text-primary\">Response Elements</h4>\r\n\r\n<table class=\"table table-condensed table-hover\">\r\n<thead>\r\n<tr>\r\n<th class=\"col-md-3\">Element</th>\r\n\r\n<th>Description</th>\r\n</tr>\r\n</thead>\r\n\r\n<tbody>\r\n<tr>\r\n<td>Predictions</td>\r\n\r\n<td>\r\nArray containing bus predictions (<a href=\r\n\"#NextBusPrediction\">NextBusPrediction</a>).\r\n</td>\r\n</tr>\r\n\r\n<tr>\r\n<td>StopName</td>\r\n\r\n<td>Full name of the given StopID.</td>\r\n</tr>\r\n\r\n<tr>\r\n<td colspan=\"2\">\r\n<div class=\"text-primary\" style=\"margin-top: 1em\">\r\n<a id=\"NextBusPrediction\" name=\r\n\"NextBusPrediction\">NextBusPrediction Elements</a>\r\n</div>\r\n</td>\r\n</tr>\r\n\r\n<tr>\r\n<td>DirectionNum</td>\r\n\r\n<td>Denotes a binary direction (0 or 1) of the bus. There is no\r\nspecific mapping to direction, but a different value for the same\r\nroute signifies that the buses are traveling in opposite\r\ndirections. Use the DirectionText element to show the actual\r\ndestination of the bus.</td>\r\n</tr>\r\n\r\n<tr>\r\n<td>DirectionText</td>\r\n\r\n<td>Customer-friendly description of direction and destination for\r\na bus.</td>\r\n</tr>\r\n\r\n<tr>\r\n<td>Minutes</td>\r\n\r\n<td>Minutes until bus arrival at this stop. Numeric value.</td>\r\n</tr>\r\n\r\n<tr>\r\n<td>RouteID</td>\r\n\r\n<td>Base route name as shown on the bus. This can be used in other\r\nbus-related methods. Note that all variants will be shown as their\r\nbase route names (i.e.: 10Av1 and 10Av2 will be shown as 10A).</td>\r\n</tr>\r\n\r\n<tr>\r\n<td>TripID</td>\r\n\r\n<td>Trip identifier. This can be correlated with the data in our\r\nbus schedule information as well as bus positions.</td>\r\n</tr>\r\n\r\n<tr>\r\n<td>VehicleID</td>\r\n\r\n<td>Bus identifier. This can be correlated with results returned\r\nfrom bus positions.</td>\r\n</tr>\r\n</tbody>\r\n</table>","operationId":"5476365e031f5909e4fe331d","parameters":[{"description":"7-digit regional stop ID.","in":"query","name":"StopID","required":true,"schema":{"type":"string","enum":["1001195"],"default":"1001195"}}],"responses":{"200":{"description":"Default response type.","content":{"application/json":{"examples":{"response":{"value":"{\n \"Predictions\": [\n {\n \"DirectionNum\": \"0\",\n \"DirectionText\": \"North to Bwi - Thurgood Marshall Airport\",\n \"Minutes\": 8,\n \"RouteID\": \"B30\",\n \"TripID\": \"6794838\",\n \"VehicleID\": \"6217\"\n },\n {\n \"DirectionNum\": \"1\",\n \"DirectionText\": \"South to Greenbelt Station\",\n \"Minutes\": 37,\n \"RouteID\": \"B30\",\n \"TripID\": \"6794868\",\n \"VehicleID\": \"6217\"\n },\n {\n \"DirectionNum\": \"0\",\n \"DirectionText\": \"North to Bwi - Thurgood Marshall Airport\",\n \"Minutes\": 48,\n \"RouteID\": \"B30\",\n \"TripID\": \"6794839\",\n \"VehicleID\": \"6213\"\n },\n {\n \"DirectionNum\": \"1\",\n \"DirectionText\": \"South to Greenbelt Station\",\n \"Minutes\": 77,\n \"RouteID\": \"B30\",\n \"TripID\": \"6794869\",\n \"VehicleID\": \"6213\"\n }\n ],\n \"StopName\": \"Bwi Airport + Stop 2\"\n}"}}}}},"400":{"description":"Response from invalid Stop ID.","content":{"application/json":{"examples":{"response":{"value":"{\"Message\":\"Stop Id not specified, invalid, or does not exist.\"}"}}}}}},"summary":"JSON - Next Buses"}}},"servers":[{"url":"http://api.wmata.com/NextBusService.svc"},{"url":"https://api.wmata.com/NextBusService.svc"}],"components":{"securitySchemes":{"apiKeyHeader":{"in":"header","name":"api_key","type":"apiKey"},"apiKeyQuery":{"in":"query","name":"api_key","type":"apiKey"}}}}