Typescript

Aquarium typescript API is a tool that allows Aquarium Studio users to interact with there data directly from JS.

aquarium-ts-logo

This package is still in early access. Open issues or contact our support team if you are looking for more functions.


import Aquarium from '@fatfish-lab/aquarium-ts-api'

const aq = new Aquarium('https://studio.aquarium.app')

await aq.signin(AQ_USER, AQ_PASSWORD)

Installation

NPM

Our package is available on Github NPM registry.

  1. In the same directory as your package.json file, create or edit an .npmrc file to include a line specifying GitHub Packages URL and the namespace where the package is hosted. @fatfish-lab:registry=https://npm.pkg.github.com
  2. Install the package npm install --save-dev @fatfish-lab/aquarium-ts-api

Deno

Simply import the package from the github repository:

import Aquarium from https://github.com/fatfish-lab/aquarium-ts-api/blob/main/index.ts

Usage

Signin

import Aquarium from '@fatfish-lab/aquarium-ts-api'

const aq = new Aquarium('https://studio.aquarium.app')

await aq.signin(AQ_USER, AQ_PASSWORD)

Requests

The package is very basic and only provide a get, post, patch, put and delete functions to interact with the API.

Check out the REST API documentation for the list of all endpoints

Example: Get all projects

const meshql = '# $Project'
const projects = await aq.post('query', { meshql })