Skip to content

Commit

Permalink
changed as per review
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajay9330 committed Apr 12, 2024
1 parent 70bbd2c commit 1da06cc
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/_data/rest_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@
"vehicles-for-agency": {
"description": "get active vehicles for an agency"
},
"search (stop)": {
"search-stop": {
"description": "helps to find the stops based on the name/keywords"
},
"search (route)": {
"search-route": {
"description": "helps to find the routes based on the name/keywords"
}
},
Expand Down
17 changes: 17 additions & 0 deletions src/api/where/methods/search-route.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
layout: rest_api
title: Search-Route Method
description: Search for a route based on its name.
sample_request_url: https://api.pugetsound.onebusaway.org/api/where/search/route.json?input=crystal&key=TEST
example_response_file: search_route_crystal.json
---

## Request Parameters

* `input` - the string to search for, encoded directly in the URL:
* `https://api.pugetsound.onebusaway.org/api/where/search/route.json?input=[INPUT GOES HERE]`
* `maxCount` - the max number of results to return. Defaults to 20.

## Response

The method returns a [list result](/api/where/elements/list-result), so see additional documentation on controlling the number of elements returned and interpreting the results. The list contents are `<route/>` elements, so see details about the various properties of the [`<route/>` element](/api/where/elements/route).
17 changes: 17 additions & 0 deletions src/api/where/methods/search-stop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
layout: rest_api
title: Search-Stop Method
description: Search for a stop based on its name.
sample_request_url: https://api.pugetsound.onebusaway.org/api/where/search/stop.json?input=crystal&key=TEST
example_response_file: search_stop_crystal.json
---

## Request Parameters

* `input` - the string to search for, encoded directly in the URL:
* `https://api.pugetsound.onebusaway.org/api/where/search/stop.json?input=[INPUT GOES HERE]`
* `maxCount` - the max number of results to return. Defaults to 20.

## Response

The method returns a [list result](/api/where/elements/list-result), so see additional documentation on controlling the number of elements returned and interpreting the results. The list contents are `<stop/>` elements, so see details about the various properties of the [`<stop/>` element](/api/where/elements/stop).
6 changes: 3 additions & 3 deletions src/api/where/search/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The Search API follows all the conventions of the RESTful API.

## Methods

The current list of supported Search searches:
The current list of supported Search are:

* [stop](/api/where/methods/search (stop))
* [route](/api/where/methods/search (route))
* [stop](/api/where/methods/search-stop)
* [route](/api/where/methods/search-route)

0 comments on commit 1da06cc

Please sign in to comment.