Go to file
2023-05-03 07:36:17 +01:00
utils first commit 2023-05-03 07:16:29 +01:00
.gitignore Initial commit 2023-05-03 06:44:12 +01:00
index.js first commit 2023-05-03 07:25:12 +01:00
package.json first commit 2023-05-03 07:25:12 +01:00
README.md update readme 2023-05-03 07:36:17 +01:00

Datasquirel

This package requires an account with datasquirel, so be sure to create an account at datasquirel-create-account before you continue.

Instalation

Package manager

Using npm:

$ npm install datasquirel

Once the package is installed, you can import the library using require approach:

const datasquirel = require("datasquirel");

Usage

Fetch Data

This method requires a readonly key or fullaccess key gotten from datasquirel. It uses a basic https get request paired with some query params.

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.