# cubiql-connector

> This library enables the consumption of CubiQL endpoint.

Latest version **1.0.3** (published 2019-01-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install cubiql-connector
pnpm add cubiql-connector
yarn add cubiql-connector
bun add cubiql-connector
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-01-23 |
| First published | 2019-01-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | agustin_gp |

## Links

- npm: https://www.npmjs.com/package/cubiql-connector
- npm.io page: https://npm.io/package/cubiql-connector

## Dependencies (1)

- [graphql-request](https://npm.io/package/graphql-request.md) ^1.8.2

## Recent versions

- 1.0.3 (latest) — 2019-01-23
- 1.0.2 — 2019-01-14
- 1.0.1 — 2019-01-14

## README

# CubiQL-connector
CubiQL connector is an NPM library that simplifies CubiQL Linked Statistical Data most common queries. 
## Installation
```
npm install cubiql-connector --save
```
## Usage
```typescript
import {CubiQLconnector} from 'cubiql-connector';

const api_url = "http://10.196.2.154:9000/graphql?query=";
const obs_limit = 20000; //set the limit for observations
let cubiql = new CubiQLconnector(api_url, obs_limit); 

//Query Datasets 
cubiql.getDatasets()
.then(datasets => {
    //do stuff
})
.catch(error => {
    //manage error
});

cubiql.getDatasetDimensions(cube_schema)
.then(resp => {
    //do stuff
})
.catch(error => {
    //manage error
});

cubiql.getDatasetMeasures(cube_schema)
.then(resp => {
    //do stuff
})
.catch(error => {
    //manage error
});

cubiql.getDatasetMetadata(cube_schema)
.then(resp => {
    //do stuff
})
.catch(error => {
    //manage error
});

cubiql.getDatasetDimensionsValues(cube_schema)
.then(resp => {
    //do stuff
})
.catch(error => {
    //manage error
});

let exampleData = {
            	"dataset" : "dataset_iwavebnetwork_spectral",
            	"dimensions" : {
                "measure_type" : "PEAKPERIOD"
              },
            	"components": [ "uri", "time", "latitude" ]
            };
cubiql.getObservationsFilteredByDimension(exampleData)
.then(resp => {
    //do stuff
})
.catch(error => {
    //manage error
});
```

---
_Source: https://npm.io/package/cubiql-connector · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
