Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify types for Provider query parameters #352

Merged
merged 1 commit into from
Oct 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,12 @@ Schema: [`trips` schema][trips-schema]

The trips API should allow querying trips with a combination of query parameters.

* `device_id`
* `vehicle_id`
* `min_end_time`: filters for trips where `end_time` occurs at or after the given time
* `max_end_time`: filters for trips where `end_time` occurs before the given time
| Parameter | Type | Comments |
| ----- | ---- | -------- |
| `device_id` | UUID | |
| `vehicle_id` | UUID | |
| `min_end_time` | [timestamp][ts] | filters for trips where `end_time` occurs at or after the given time |
| `max_end_time` | [timestamp][ts] | filters for trips where `end_time` occurs before the given time|

When multiple query parameters are specified, they should all apply to the returned trips. For example, a request with `?min_end_time=1549800000000&max_end_time=1549886400000` should only return trips whose end time falls in the range `[1549800000000, 1549886400000)`.

Expand Down Expand Up @@ -305,8 +307,10 @@ Because of the unreliability of device clocks, the Provider is unlikely to know

The status_changes API should allow querying status changes with a combination of query parameters.

* `start_time`: filters for status changes where `event_time` occurs at or after the given time
* `end_time`: filters for status changes where `event_time` occurs before the given time
| Parameter | Type | Comments |
| ----- | ---- | -------- |
| `start_time` | [timestamp][ts] | filters for status changes where `event_time` occurs at or after the given time |
| `end_time` | [timestamp][ts] | filters for status changes where `event_time` occurs before the given time |

When multiple query parameters are specified, they should all apply to the returned status changes. For example, a request with `?start_time=1549800000000&end_time=1549886400000` should only return status changes whose `event_time` falls in the range `[1549800000000, 1549886400000)`.

Expand Down