redash-snapshot

[![Version](https://img.shields.io/npm/v/redash-snapshot.svg)](https://npmjs.org/package/redash-snapshot) [![Downloads/week](https://img.shields.io/npm/dw/redash-snapshot.svg)](https://npmjs.org/package/redash-snapshot) [![License](https://img.shields.io/

Usage no npm install needed!

<script type="module">
  import redashSnapshot from 'https://cdn.skypack.dev/redash-snapshot';
</script>

README

Redash.io query snapshots

Version Downloads/week License TypeScript

Create query snapshots (PNG) with node for redash.

Installation

npm install redash-snapshot

or

yarn add redash-snapshot

Usage

import {querySnapshot} from 'redash-snapshot'

const snapshot = await querySnapshot({
    token: 'my-user-token',
    queryId: 'query-id',
    visualizationId: 'visualization-id'
});

Parameters

name default type
token string
queryId string
visualizationId string
host https://redash.io string
path string
width 800 number
height 600 number

If path is defined, the png will be written to disk at given path.

References