aqts-client
TypeScript icon, indicating that this package has built-in type declarations

1.1.19 • Public • Published

AQTS_Client library

TS/JS library client for Aquarius Timeseries data pulls


Getting Started

npm i aqts-client

Creating an instance and pulling data example

import AquariusApi from "aqts-client";

\\ Get token
const credentials = {
    Username: "aqts-username"
    EncryptedPassword: "aqts-password"
}

const token = await AquariusApi.getTokenWithCredentials(
    "server",
    credentials
).then(response => response)

\\ Initiate an Aquarius instance
let instance = new AquariusApi(server, token);

\\ Retrieve data
const locationId = {
    LocationIdentifier: "locationIdentifier"
}
const locationData = await instance.getLocationData(
    locationId
).then(reponse => response)

\\Retrieve data from an endpoint without a method
const data = await instance.getCustomEndpoint(
    "CustomEndpoint"
    { property1: "value, "propertty2: "value" }
).then(response => response)

Devloper's Guide

Clone repo

$ git clone https://code.usgs.gov/keoconnor/aqts-client.git

Set up environment variables

export AQ_USERNAME=<username>
export AQ_PASSWORD=<password>

Run tests

$ jest

or

$ npm run test

Readme

Keywords

Package Sidebar

Install

npm i aqts-client

Weekly Downloads

28

Version

1.1.19

License

CC0

Unpacked Size

19 kB

Total Files

9

Last publish

Collaborators

  • keoconnor