From 143f95558fe5b957eba911c158f8cb6b1744a370 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Fri, 4 Jun 2021 11:41:48 +0100 Subject: [PATCH] add location examples json --- location/examples.json | 61 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 location/examples.json diff --git a/location/examples.json b/location/examples.json new file mode 100644 index 0000000..f016f7f --- /dev/null +++ b/location/examples.json @@ -0,0 +1,61 @@ +{ + "read": [{ + "title": "Get location by ID", + "description": "Lookup the location of an entity by ID", + "request": { + "id": "1" + }, + "response": { + "entity": { + "id": "1", + "type": "bike", + "location": { + "latitude": 51.511061, + "longitude": -0.120022, + "timestamp": "1622802761" + } + } + } + }], + "save": [{ + "title": "Save an entity", + "description": "Save the location of an entity", + "request": { + "entity": { + "id": "1", + "type": "bike", + "location": { + "latitude": 51.511061, + "longitude": -0.120022, + "timestamp": "1622802761" + } + } + }, + "response": {} + }], + "search": [{ + "title": "Search for locations", + "description": "Search a given radius for entities", + "request": { + "center": { + "latitude": 51.511061, + "longitude": -0.120022 + }, + "numEntities": 10, + "radius": 100, + "type": "bike" + }, + "response": { + "entities": [{ + "id": "1", + "type": "bike", + "location": { + "latitude": 51.511061, + "longitude": -0.120022, + "timestamp": "1622802761" + } + }] + }, + "response": {} + }] +}