Tinybird.js
A library for managing your Tinybird Tokens, Data Sources and Pipes.
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 i --save tinybird.js
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