From 1da06cc466dca517bf2723820c7aad7c3594d772 Mon Sep 17 00:00:00 2001 From: Ajaykumar Yadav Date: Fri, 12 Apr 2024 17:19:31 +0000 Subject: [PATCH] changed as per review --- src/_data/rest_api.json | 4 ++-- src/api/where/methods/search-route.md | 17 +++++++++++++++++ src/api/where/methods/search-stop.md | 17 +++++++++++++++++ src/api/where/search/index.md | 6 +++--- 4 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 src/api/where/methods/search-route.md create mode 100644 src/api/where/methods/search-stop.md diff --git a/src/_data/rest_api.json b/src/_data/rest_api.json index 077af2c..631b998 100644 --- a/src/_data/rest_api.json +++ b/src/_data/rest_api.json @@ -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" } }, diff --git a/src/api/where/methods/search-route.md b/src/api/where/methods/search-route.md new file mode 100644 index 0000000..cb78ef3 --- /dev/null +++ b/src/api/where/methods/search-route.md @@ -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 `` elements, so see details about the various properties of the [`` element](/api/where/elements/route). \ No newline at end of file diff --git a/src/api/where/methods/search-stop.md b/src/api/where/methods/search-stop.md new file mode 100644 index 0000000..d4a292c --- /dev/null +++ b/src/api/where/methods/search-stop.md @@ -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 `` elements, so see details about the various properties of the [`` element](/api/where/elements/stop). diff --git a/src/api/where/search/index.md b/src/api/where/search/index.md index 9da3ced..5f35793 100644 --- a/src/api/where/search/index.md +++ b/src/api/where/search/index.md @@ -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)) \ No newline at end of file +* [stop](/api/where/methods/search-stop) +* [route](/api/where/methods/search-route)