aqts-client
v1.1.19
Published
Client library for the Aquarius Timeseries API
Downloads
48
Readme
AQTS_Client library
TS/JS library client for Aquarius Timeseries data pulls
Getting Started
npm i aqts-clientCreating 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.gitSet up environment variables
export AQ_USERNAME=<username>
export AQ_PASSWORD=<password>Run tests
$ jestor
$ npm run test