Skip to content

Commit

Permalink
Convert current-time method to new rest_api layout
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronbrethorst committed Mar 20, 2024
1 parent c50988a commit ac77207
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
1 change: 1 addition & 0 deletions src/api/example_responses/current-time.json
Original file line number Diff line number Diff line change
@@ -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}
27 changes: 4 additions & 23 deletions src/api/where/methods/current-time.md
Original file line number Diff line number Diff line change
@@ -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

<response>
<version>2</version>
<code>200</code>
<text>OK</text>
<currentTime>1270614730908</currentTime>
<data class="time">
<references/>
<time>
<time>1270614730908</time>
<readableTime>2010-04-06T21:32:10-07:00</readableTime>
</time>
</data>
</response>

## Response

* `time` - current system time as milliseconds since the Unix epoch
Expand Down

0 comments on commit ac77207

Please sign in to comment.