diff --git a/src/api/example_responses/config.json b/src/api/example_responses/config.json new file mode 100644 index 0000000..cf1ca19 --- /dev/null +++ b/src/api/example_responses/config.json @@ -0,0 +1 @@ +{"code":200,"currentTime":1710960036523,"data":{"entry":{"gitProperties":{"git.branch":"d600e47ead0928a9e1bd76af9f16c12294d3782c","git.build.host":"swdev31","git.build.time":"23.01.2024 @ 16:01:10 EST","git.build.user.email":"sheldonb@gmail.com","git.build.user.name":"sheldonabrown","git.build.version":"2.5.2-cs","git.closest.tag.commit.count":"0","git.closest.tag.name":"onebusaway-application-modules-2.5.2-cs","git.commit.id":"d600e47ead0928a9e1bd76af9f16c12294d3782c","git.commit.id.abbrev":"d600e47","git.commit.id.describe":"onebusaway-application-modules-2.5.2-cs","git.commit.id.describe-short":"onebusaway-application-modules-2.5.2-cs","git.commit.message.full":"[maven-release-plugin] prepare release onebusaway-application-modules-2.5.2-cs","git.commit.message.short":"[maven-release-plugin] prepare release onebusaway-application-modules-2.5.2-cs","git.commit.time":"23.01.2024 @ 15:48:19 EST","git.commit.user.email":"sheldonb@gmail.com","git.commit.user.name":"sheldonabrown","git.dirty":"false","git.remote.origin.url":"git@github.com:camsys/onebusaway-application-modules.git","git.tags":"onebusaway-application-modules-2.5.2-cs"},"id":"b6bff432-3b99-4f75-8834-4b0c6969fb3f","name":"FEB24_2_4","serviceDateFrom":"1709280000000","serviceDateTo":"1722409200000"},"references":{"agencies":[],"routes":[],"situations":[],"stopTimes":[],"stops":[],"trips":[]}},"text":"OK","version":2} \ No newline at end of file diff --git a/src/api/example_responses/current-time.json b/src/api/example_responses/current-time.json new file mode 100644 index 0000000..725dfa9 --- /dev/null +++ b/src/api/example_responses/current-time.json @@ -0,0 +1 @@ +{"code":200,"currentTime":1710960121182,"data":{"entry":{"readableTime":"2024-03-20T11:42:01-07:00","time":1710960121182},"references":{"agencies":[],"routes":[],"situations":[],"stopTimes":[],"stops":[],"trips":[]}},"text":"OK","version":2} \ No newline at end of file diff --git a/src/api/example_responses/report-problem-with-stop-1_75403.json b/src/api/example_responses/report-problem-with-stop-1_75403.json new file mode 100644 index 0000000..1a0c961 --- /dev/null +++ b/src/api/example_responses/report-problem-with-stop-1_75403.json @@ -0,0 +1 @@ +{"code":200,"currentTime":1710960205535,"data":{},"text":"OK","version":2} \ No newline at end of file diff --git a/src/api/example_responses/report-problem-with-trip-1_79430293.json b/src/api/example_responses/report-problem-with-trip-1_79430293.json new file mode 100644 index 0000000..2712932 --- /dev/null +++ b/src/api/example_responses/report-problem-with-trip-1_79430293.json @@ -0,0 +1 @@ +{"code":200,"currentTime":1710960426279,"data":{},"text":"OK","version":2} \ No newline at end of file diff --git a/src/api/where/methods/config.md b/src/api/where/methods/config.md index 292c9da..67d5036 100644 --- a/src/api/where/methods/config.md +++ b/src/api/where/methods/config.md @@ -1,65 +1,11 @@ --- -layout: page -title: config.json Method +layout: rest_api +title: config Method +description: Get access to configuration information about the OBA server. +sample_request_url: https://api.pugetsound.onebusaway.org/api/where/config.json?key=TEST +example_response_file: config.json --- -Access to configuration information. - -## Sample Request - -[https://api.pugetsound.onebusaway.org/api/where/config.json?key=TEST](https://api.pugetsound.onebusaway.org/api/where/config.json?key=TEST) - - -## Sample Response - - ``` - { - "code": 200, - "currentTime": 1709665910298, - "data": { - "entry": { - "gitProperties": { - "git.branch": "d600e47ead0928a9e1bd76af9f16c12294d3782c", - "git.build.host": "swdev31", - "git.build.time": "23.01.2024 @ 16:01:10 EST", - "git.build.user.email": "sheldonb@gmail.com", - "git.build.user.name": "sheldonabrown", - "git.build.version": "2.5.2-cs", - "git.closest.tag.commit.count": "0", - "git.closest.tag.name": "onebusaway-application-modules-2.5.2-cs", - "git.commit.id": "d600e47ead0928a9e1bd76af9f16c12294d3782c", - "git.commit.id.abbrev": "d600e47", - "git.commit.id.describe": "onebusaway-application-modules-2.5.2-cs", - "git.commit.id.describe-short": "onebusaway-application-modules-2.5.2-cs", - "git.commit.message.full": "[maven-release-plugin] prepare release onebusaway-application-modules-2.5.2-cs", - "git.commit.message.short": "[maven-release-plugin] prepare release onebusaway-application-modules-2.5.2-cs", - "git.commit.time": "23.01.2024 @ 15:48:19 EST", - "git.commit.user.email": "sheldonb@gmail.com", - "git.commit.user.name": "sheldonabrown", - "git.dirty": "false", - "git.remote.origin.url": "git@github.com:camsys/onebusaway-application-modules.git", - "git.tags": "onebusaway-application-modules-2.5.2-cs" - }, - "id": "b6bff432-3b99-4f75-8834-4b0c6969fb3f", - "name": "FEB24_2_4", - "serviceDateFrom": "1709280000000", - "serviceDateTo": "1722409200000" - }, - "references": { - "agencies": [], - "routes": [], - "situations": [], - "stopTimes": [], - "stops": [], - "trips": [] - } - }, - "text": "OK", - "version": 2 -} - - ``` - ## Request Parameters * key - API key for authentication. diff --git a/src/api/where/methods/current-time.md b/src/api/where/methods/current-time.md index 51c75e2..4246f4d 100644 --- a/src/api/where/methods/current-time.md +++ b/src/api/where/methods/current-time.md @@ -1,30 +1,11 @@ --- -layout: page +layout: rest_api title: current-time Method +description: Retrieve the current system time. +sample_request_url: https://api.pugetsound.onebusaway.org/api/where/current-time.json?key=TEST +example_response_file: current-time.json --- -Retrieve the current system time - -## Sample Request - -[http://api.pugetsound.onebusaway.org/api/where/current-time.json?key=TEST](http://api.pugetsound.onebusaway.org/api/where/current-time.json?key=TEST) - -## Sample Response - - - 2 - 200 - OK - 1270614730908 - - - - - - ## Response * `time` - current system time as milliseconds since the Unix epoch diff --git a/src/api/where/methods/plan-trip.md b/src/api/where/methods/plan-trip.md deleted file mode 100644 index 6f1bf9a..0000000 --- a/src/api/where/methods/plan-trip.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -layout: page -title: plan-trip Method ---- - -~~This method allows you to plan a trip using public transit between locations. Detailed information about the sequence of steps for the trip, including walking and transit, are included in the response. A variety of parameters can be used to control which trip plans are favored in a particular request.~~ - -**This method is deprecated and no longer supported** - -Check out the [OpenTripPlanner](http://www.opentripplanner.org/) open-source project for multimodal trip planning capabilities. diff --git a/src/api/where/methods/report-problem-with-stop.md b/src/api/where/methods/report-problem-with-stop.md index a237876..445710c 100644 --- a/src/api/where/methods/report-problem-with-stop.md +++ b/src/api/where/methods/report-problem-with-stop.md @@ -1,29 +1,15 @@ --- -layout: page +layout: rest_api title: report-problem-with-stop Method +description: | + Submit a user-generated problem report for a particular stop. The reporting mechanism provides lots of fields that can + be specified to give more context about the details of the problem (which trip, stop, vehicle, etc was involved), + making it easier for a developer or transit agency staff to diagnose the problem. These reports feed into the + problem reporting admin interface. +sample_request_url: https://api.pugetsound.onebusaway.org/api/where/report-problem-with-stop/1_75403.json?key=TEST&code=stop_name_wrong +example_response_file: report-problem-with-stop-1_75403.json --- -Submit a user-generated problem report for a particular stop. The reporting mechanism provides lots of fields that can -be specified to give more context about the details of the problem (which trip, stop, vehicle, etc was involved), -making it easier for a developer or transit agency staff to diagnose the problem. These reports feed into the -problem reporting admin interface. - -## Sample Request - -[http://api.pugetsound.onebusaway.org/api/where/report-problem-with-stop/1_75403.json?key=TEST&code=stop_name_wrong](http://api.pugetsound.onebusaway.org/api/where/report-problem-with-stop/1_75403.json?key=TEST&code=stop_name_wrong) - -## Sample Response - -~~~~ - - 2 - 200 - 1318879898047 - OK - - -~~~~ - ## Request Parameters * stopId - the trip id, encoded directly in the URL: diff --git a/src/api/where/methods/report-problem-with-trip.md b/src/api/where/methods/report-problem-with-trip.md index 60dd2e9..25e572d 100644 --- a/src/api/where/methods/report-problem-with-trip.md +++ b/src/api/where/methods/report-problem-with-trip.md @@ -1,29 +1,15 @@ --- -layout: page +layout: rest_api title: report-problem-with-trip Method +description: | + Submit a user-generated problem report for a particular trip. The reporting mechanism provides lots of fields that can + be specified to give more context about the details of the problem (which trip, stop, vehicle, etc was involved), + making it easier for a developer or transit agency staff to diagnose the problem. These reports feed into the + problem reporting admin interface. +sample_request_url: https://api.pugetsound.onebusaway.org/api/where/report-problem-with-trip/1_79430293.json?key=TEST&serviceDate=1291536000000&vehicleId=1_3521&stopId=1_75403&code=vehicle_never_came +example_response_file: report-problem-with-trip-1_79430293.json --- -Submit a user-generated problem report for a particular trip. The reporting mechanism provides lots of fields that can -be specified to give more context about the details of the problem (which trip, stop, vehicle, etc was involved), -making it easier for a developer or transit agency staff to diagnose the problem. These reports feed into the -problem reporting admin interface. - -## Sample Request - -[http://api.pugetsound.onebusaway.org/api/where/report-problem-with-trip/1_79430293.json?key=TEST&serviceDate=1291536000000&vehicleId=1_3521&stopId=1_75403&code=vehicle_never_came](http://api.pugetsound.onebusaway.org/api/where/report-problem-with-trip/1_79430293.json?key=TEST&serviceDate=1291536000000&vehicleId=1_3521&stopId=1_75403&code=vehicle_never_came) - -## Sample Response - -~~~~ - - 2 - 200 - 1318879898047 - OK - - -~~~~ - ## Request Parameters * tripId - the trip id, encoded directly in the URL: