reorder examples files

This commit is contained in:
Dominic Wong
2021-06-09 10:21:00 +01:00
parent 5bb0ed38b9
commit 3da95bd85c
4 changed files with 54 additions and 54 deletions

22
cache/examples.json vendored
View File

@@ -1,5 +1,16 @@
{
"set": [{
"title": "Set a value",
"description": "Set allows you to set a value",
"request": {
"key": "foo",
"value": "bar"
},
"response": {
"status": "ok"
}
}],
"get": [{
"title": "Get a value",
"description": "Get returns a value from the cache",
@@ -12,17 +23,6 @@
"ttl": 0
}
}],
"set": [{
"title": "Set a value",
"description": "Set allows you to set a value",
"request": {
"key": "foo",
"value": "bar"
},
"response": {
"status": "ok"
}
}],
"delete": [{
"title": "Delete a value",
"description": "Delete a value from the cache",

View File

@@ -1,4 +1,20 @@
{
"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": {}
}],
"read": [{
"title": "Get location by ID",
"description": "Lookup the location of an entity by ID",
@@ -17,22 +33,6 @@
}
}
}],
"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",

View File

@@ -10,29 +10,6 @@
},
"response": {}
}],
"remove": [{
"title": "Remove a feed",
"description": "Remove an rss feed from the crawler",
"request": {
"name": "bbc"
},
"response": {}
}],
"list": [{
"title": "List rss feeds",
"description": "List the saved rss feeds",
"request": {},
"response": {
"feeds": [
{
"id": "micro/asim/18882020881032690",
"name": "bbc",
"url": "http://feeds.bbci.co.uk/news/rss.xml",
"category": "news"
}
]
}
}],
"feed": [{
"title": "Read a feed",
"description": "Read an rss feed by name",
@@ -59,5 +36,28 @@
}
]
}
}],
"list": [{
"title": "List rss feeds",
"description": "List the saved rss feeds",
"request": {},
"response": {
"feeds": [
{
"id": "micro/asim/18882020881032690",
"name": "bbc",
"url": "http://feeds.bbci.co.uk/news/rss.xml",
"category": "news"
}
]
}
}],
"remove": [{
"title": "Remove a feed",
"description": "Remove an rss feed from the crawler",
"request": {
"name": "bbc"
},
"response": {}
}]
}

View File

@@ -24,7 +24,7 @@
"proxy": [{
"title": "Resolve a short URL to a long destination URL",
"request": {
"shortURL": "https://m3o.one/u3zS8YHmYp"
"shortURL": "https://m3o.one/u/ck6SGVkYp"
},
"response": {
"destinationURL": "https://mysite.com/this-is-a-rather-long-web-address"