npm.io
2.1.0 • Published 4 years ago

tinybird.js

Licence
MIT
Version
2.1.0
Deps
1
Size
464 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated
Tinybird

Tinybird.js

A library for managing your Tinybird Tokens, Data Sources and Pipes.

npm downloads per month
MIT License


Tinybird Analytics allows you to build Real-time APIs at scale for your existing Data Sources.

Examples

Installation

NPM

NPM is the recommended installation method. It pairs nicely with a CommonJS module bundler such as Webpack or Browserify.

# npm
npm i --save tinybird.js

# Yarn
yarn add tinybird.js
CDN

Instead of downloading, you can use our CDN to access files directly.

<script src="https://cdn.tinybird.co/v1/tinybird.js"></script>

Usage

Install and import the Tinybird as an ES module and start using it.

import Tinybird from 'tinybird.js';

const tinyb = Tinybird(YOUR_AUTH_TOKEN)
const res = tinyb.query('SELECT * FROM your_data_source LIMIT 3')
  .then(function (res) {
    console.log(res.data[0])
    console.log(`query time: ${res.statistics.elapsed}`)
  })

Docs

You can discover how to use the library in the official documentation.

License

MIT

Keywords