run check bool

This commit is contained in:
Dominic Wong
2021-09-09 13:56:52 +01:00
parent 528b1e1c69
commit 5c998951a1
17 changed files with 48 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
"question": [{ "question": [{
"title": "Ask a question", "title": "Ask a question",
"description": "Ask a question and get an instant answer", "description": "Ask a question and get an instant answer",
"run_check": true,
"request": { "request": {
"query": "google" "query": "google"
}, },

5
cache/examples.json vendored
View File

@@ -3,6 +3,7 @@
"set": [{ "set": [{
"title": "Set a value", "title": "Set a value",
"description": "Set allows you to set a value", "description": "Set allows you to set a value",
"run_check": true,
"request": { "request": {
"key": "foo", "key": "foo",
"value": "bar" "value": "bar"
@@ -14,6 +15,7 @@
"get": [{ "get": [{
"title": "Get a value", "title": "Get a value",
"description": "Get returns a value from the cache", "description": "Get returns a value from the cache",
"run_check": true,
"request": { "request": {
"key": "foo" "key": "foo"
}, },
@@ -26,6 +28,7 @@
"delete": [{ "delete": [{
"title": "Delete a value", "title": "Delete a value",
"description": "Delete a value from the cache", "description": "Delete a value from the cache",
"run_check": true,
"request": { "request": {
"key": "foo" "key": "foo"
}, },
@@ -36,6 +39,7 @@
"increment": [{ "increment": [{
"title": "Increment a value", "title": "Increment a value",
"description": "Increment a value by 2", "description": "Increment a value by 2",
"run_check": true,
"request": { "request": {
"key": "counter", "key": "counter",
"value": 2 "value": 2
@@ -48,6 +52,7 @@
"decrement": [{ "decrement": [{
"title": "Decrement a value", "title": "Decrement a value",
"description": "Decrement a value by 2", "description": "Decrement a value by 2",
"run_check": true,
"request": { "request": {
"key": "counter", "key": "counter",
"value": 2 "value": 2

View File

@@ -3,6 +3,7 @@
"codes": [{ "codes": [{
"title": "Get supported codes", "title": "Get supported codes",
"description": "Returns the supported currency codes (example response)", "description": "Returns the supported currency codes (example response)",
"run_check": true,
"request": {}, "request": {},
"response": { "response": {
"codes": [ "codes": [
@@ -32,6 +33,7 @@
"rates": [{ "rates": [{
"title": "Get rates for USD", "title": "Get rates for USD",
"description": "Returns the rates for USD (sample response)", "description": "Returns the rates for USD (sample response)",
"run_check": true,
"request": { "request": {
"code": "USD" "code": "USD"
}, },
@@ -54,6 +56,7 @@
"convert": [{ "convert": [{
"title": "Convert USD to GBP", "title": "Convert USD to GBP",
"description": "Convert from USD to GBP", "description": "Convert from USD to GBP",
"run_check": true,
"request": { "request": {
"from": "USD", "from": "USD",
"to": "GBP" "to": "GBP"
@@ -67,6 +70,7 @@
{ {
"title": "Convert $10 USD to GBP", "title": "Convert $10 USD to GBP",
"description": "Convert $10 from USD to GBP", "description": "Convert $10 from USD to GBP",
"run_check": true,
"request": { "request": {
"from": "USD", "from": "USD",
"to": "GBP", "to": "GBP",

View File

@@ -1,6 +1,7 @@
{ {
"create": [{ "create": [{
"title": "Create a record", "title": "Create a record",
"run_check": true,
"request": { "request": {
"table": "users", "table": "users",
"record": { "record": {
@@ -16,6 +17,7 @@
}], }],
"update": [{ "update": [{
"title": "Update a record", "title": "Update a record",
"run_check": true,
"request": { "request": {
"table": "users", "table": "users",
"record": { "record": {
@@ -28,6 +30,7 @@
}], }],
"read": [{ "read": [{
"title": "Read records", "title": "Read records",
"run_check": true,
"request": { "request": {
"table": "users", "table": "users",
"query": "age == 43" "query": "age == 43"
@@ -43,6 +46,7 @@
}], }],
"delete": [{ "delete": [{
"title": "Delete a record", "title": "Delete a record",
"run_check": true,
"request": { "request": {
"table": "users", "table": "users",
"id": "1" "id": "1"

View File

@@ -1,6 +1,7 @@
{ {
"save": [{ "save": [{
"title": "Save file", "title": "Save file",
"run_check": true,
"request": { "request": {
"file": { "file": {
"content": "file content example", "content": "file content example",
@@ -13,6 +14,7 @@
}], }],
"list": [{ "list": [{
"title": "List files", "title": "List files",
"run_check": true,
"request": { "request": {
"project": "examples" "project": "examples"
}, },
@@ -28,6 +30,7 @@
}], }],
"delete": [{ "delete": [{
"title": "Delete file", "title": "Delete file",
"run_check": true,
"request": { "request": {
"project": "examples", "project": "examples",
"path": "/document/text-files/file.txt" "path": "/document/text-files/file.txt"
@@ -36,6 +39,7 @@
}], }],
"read": [{ "read": [{
"title": "Read file", "title": "Read file",
"run_check": true,
"request": { "request": {
"project": "examples", "project": "examples",
"path": "/document/text-files/file.txt" "path": "/document/text-files/file.txt"

View File

@@ -3,6 +3,7 @@
"call": [{ "call": [{
"title": "Call the helloworld service", "title": "Call the helloworld service",
"description": "Helloworld is a simple example that takes a name and returns a personalised message", "description": "Helloworld is a simple example that takes a name and returns a personalised message",
"run_check": true,
"request": { "request": {
"name": "John" "name": "John"
}, },

View File

@@ -2,6 +2,7 @@
{ {
"generate": [{ "generate": [{
"title": "Generate a unique ID", "title": "Generate a unique ID",
"run_check": true,
"request": { "request": {
"type": "uuid" "type": "uuid"
}, },
@@ -12,6 +13,7 @@
}, },
{ {
"title": "Generate a short ID", "title": "Generate a short ID",
"run_check": true,
"request": { "request": {
"type": "shortid" "type": "shortid"
}, },
@@ -22,6 +24,7 @@
}, },
{ {
"title": "Generate a snowflake ID", "title": "Generate a snowflake ID",
"run_check": true,
"request": { "request": {
"type": "snowflake" "type": "snowflake"
}, },
@@ -32,6 +35,7 @@
}, },
{ {
"title": "Generate a bigflake ID", "title": "Generate a bigflake ID",
"run_check": true,
"request": { "request": {
"type": "bigflake" "type": "bigflake"
}, },

View File

@@ -2,6 +2,7 @@
"resize": [{ "resize": [{
"title": "Base64 to hosted image", "title": "Base64 to hosted image",
"description": "Resize an input base64 encoded image and store the resulting resized image on our CDN.", "description": "Resize an input base64 encoded image and store the resulting resized image on our CDN.",
"run_check": true,
"request": { "request": {
"base64": "data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==", "base64": "data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"outputURL": true, "outputURL": true,
@@ -15,6 +16,7 @@
}, { }, {
"title": "Base64 to base64 image", "title": "Base64 to base64 image",
"description": "Resize a base64 encoded image on the fly without storing it anywhere", "description": "Resize a base64 encoded image on the fly without storing it anywhere",
"run_check": true,
"request": { "request": {
"base64": "data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==", "base64": "data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"width": 100, "width": 100,
@@ -26,6 +28,7 @@
},{ },{
"title": "Base64 to base64 image with cropping", "title": "Base64 to base64 image with cropping",
"description": "Resize a base64 encoded image on the fly without storing it anywhere", "description": "Resize a base64 encoded image on the fly without storing it anywhere",
"run_check": true,
"request": { "request": {
"base64": "data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==", "base64": "data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"width": 100, "width": 100,

View File

@@ -2,6 +2,7 @@
"lookup": [{ "lookup": [{
"title": "Lookup IP info", "title": "Lookup IP info",
"description": "Lookup the location info for an IP address", "description": "Lookup the location info for an IP address",
"run_check": true,
"request": { "request": {
"ip": "93.148.214.31" "ip": "93.148.214.31"
}, },

View File

@@ -2,6 +2,7 @@
"save": [{ "save": [{
"title": "Save an entity", "title": "Save an entity",
"description": "Save the location of an entity", "description": "Save the location of an entity",
"run_check": true,
"request": { "request": {
"entity": { "entity": {
"id": "1", "id": "1",
@@ -18,6 +19,7 @@
"read": [{ "read": [{
"title": "Get location by ID", "title": "Get location by ID",
"description": "Lookup the location of an entity by ID", "description": "Lookup the location of an entity by ID",
"run_check": true,
"request": { "request": {
"id": "1" "id": "1"
}, },
@@ -36,6 +38,7 @@
"search": [{ "search": [{
"title": "Search for locations", "title": "Search for locations",
"description": "Search a given radius for entities", "description": "Search a given radius for entities",
"run_check": true,
"request": { "request": {
"center": { "center": {
"latitude": 51.511061, "latitude": 51.511061,
@@ -55,7 +58,6 @@
"timestamp": "1622802761" "timestamp": "1622802761"
} }
}] }]
}, }
"response": {}
}] }]
} }

View File

@@ -3,6 +3,7 @@
"generate": [{ "generate": [{
"title": "Generate OTP", "title": "Generate OTP",
"description": "Generate a one time password for a unique id, email or user", "description": "Generate a one time password for a unique id, email or user",
"run_check": true,
"request": { "request": {
"id": "asim@example.com" "id": "asim@example.com"
}, },
@@ -13,6 +14,7 @@
"validate": [{ "validate": [{
"title": "Validate OTP", "title": "Validate OTP",
"description": "Validate the one time password created via generate", "description": "Validate the one time password created via generate",
"run_check": true,
"request": { "request": {
"id": "asim@example.com", "id": "asim@example.com",
"code": "656211" "code": "656211"

View File

@@ -3,6 +3,7 @@
"add": [{ "add": [{
"title": "Add a new feed", "title": "Add a new feed",
"description": "Add a new rss feed to the crawler", "description": "Add a new rss feed to the crawler",
"run_check": true,
"request": { "request": {
"name": "bbc", "name": "bbc",
"url": "http://feeds.bbci.co.uk/news/rss.xml", "url": "http://feeds.bbci.co.uk/news/rss.xml",
@@ -13,6 +14,7 @@
"feed": [{ "feed": [{
"title": "Read a feed", "title": "Read a feed",
"description": "Read an rss feed by name", "description": "Read an rss feed by name",
"run_check": true,
"request": { "request": {
"name": "bbc" "name": "bbc"
}, },
@@ -40,6 +42,7 @@
"list": [{ "list": [{
"title": "List rss feeds", "title": "List rss feeds",
"description": "List the saved rss feeds", "description": "List the saved rss feeds",
"run_check": true,
"request": {}, "request": {},
"response": { "response": {
"feeds": [ "feeds": [
@@ -55,6 +58,7 @@
"remove": [{ "remove": [{
"title": "Remove a feed", "title": "Remove a feed",
"description": "Remove an rss feed from the crawler", "description": "Remove an rss feed from the crawler",
"run_check": true,
"request": { "request": {
"name": "bbc" "name": "bbc"
}, },

View File

@@ -2,6 +2,7 @@
"analyze": [{ "analyze": [{
"title": "Analyze a piece of text", "title": "Analyze a piece of text",
"description": "Analyze and score a piece of text", "description": "Analyze and score a piece of text",
"run_check": true,
"request": { "request": {
"text": "this is amazing" "text": "this is amazing"
}, },

View File

@@ -3,6 +3,7 @@
"publish": [{ "publish": [{
"title": "Publish a message", "title": "Publish a message",
"description": "Publish a message to a topic on the stream", "description": "Publish a message to a topic on the stream",
"run_check": true,
"request": { "request": {
"topic": "events", "topic": "events",
"message": {"id": "1", "type": "signup", "user": "john"} "message": {"id": "1", "type": "signup", "user": "john"}

View File

@@ -2,6 +2,7 @@
"list": [{ "list": [{
"title": "List your shortened URLs", "title": "List your shortened URLs",
"description": "List the token holder's shortened URLs", "description": "List the token holder's shortened URLs",
"run_check": true,
"request": { "request": {
}, },
"response": { "response": {
@@ -14,6 +15,7 @@
}], }],
"shorten": [{ "shorten": [{
"title": "Shorten a long URL", "title": "Shorten a long URL",
"run_check": true,
"request": { "request": {
"destinationURL": "https://mysite.com/this-is-a-rather-long-web-address" "destinationURL": "https://mysite.com/this-is-a-rather-long-web-address"
}, },
@@ -23,6 +25,7 @@
}], }],
"proxy": [{ "proxy": [{
"title": "Resolve a short URL to a long destination URL", "title": "Resolve a short URL to a long destination URL",
"run_check": true,
"request": { "request": {
"shortURL": "https://m3o.one/u/ck6SGVkYp" "shortURL": "https://m3o.one/u/ck6SGVkYp"
}, },

View File

@@ -1,6 +1,7 @@
{ {
"create": [{ "create": [{
"title": "Create an account", "title": "Create an account",
"run_check": true,
"request": { "request": {
"id": "usrid-1", "id": "usrid-1",
"username": "usrname-1", "username": "usrname-1",
@@ -12,6 +13,7 @@
}], }],
"read": [{ "read": [{
"title": "Read an account by id", "title": "Read an account by id",
"run_check": true,
"request": { "request": {
"id": "usrid-1" "id": "usrid-1"
}, },
@@ -26,6 +28,7 @@
} }
},{ },{
"title": "Read account by username or email", "title": "Read account by username or email",
"run_check": true,
"request": { "request": {
"username": "usrname-1" "username": "usrname-1"
}, },
@@ -41,6 +44,7 @@
},{ },{
"title": "Read account by email", "title": "Read account by email",
"run_check": true,
"request": { "request": {
"email": "joe@example.com" "email": "joe@example.com"
}, },
@@ -56,6 +60,7 @@
}], }],
"sendVerificationEmail": [{ "sendVerificationEmail": [{
"title": "Send verification email", "title": "Send verification email",
"run_check": true,
"request": { "request": {
"email": "joe@example.com", "email": "joe@example.com",
"subject": "Email verification", "subject": "Email verification",

View File

@@ -2,6 +2,7 @@
"now": [{ "now": [{
"title": "Get current weather", "title": "Get current weather",
"description": "Get the weather forecast right at this moment", "description": "Get the weather forecast right at this moment",
"run_check": true,
"request": { "request": {
"location": "london" "location": "london"
}, },