From fcb4a98b328892830a9db7b2af4dfaa1bcc971c6 Mon Sep 17 00:00:00 2001 From: Tben <52448020+BenjaminToby@users.noreply.github.com> Date: Wed, 3 May 2023 07:36:17 +0100 Subject: [PATCH] update readme --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a64b19..b3eb50f 100644 --- a/README.md +++ b/README.md @@ -24,4 +24,13 @@ const datasquirel = require("datasquirel"); This method requires a readonly key or fullaccess key gotten from [datasquirel](https://datasquirel.com/). It uses a basic https get request paired with some query params. -`code` +```js +const datasquirel = require("datasquirel"); +const getData = await datasquirel.get({ + key: "aldhkf89asdflksdafh908asdfjkhasdf", // API Key + db: "my_database", // Database name slug (Eg. Db Name => My Database, Db Slug => my_database) + query: "SELECT * FROM blog_posts", // SQL Query +}); +``` + +Datasquirel uses all conventional SQL query commands. However you can only use the `SELECT` command when using a readonly API key.