Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@influxdata/influx

Package Overview
Dependencies
Maintainers
11
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@influxdata/influx

InfluxDB 2.0 client

  • 0.5.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-92.92%
Maintainers
11
Weekly downloads
 
Created
Source

InfluxDB 2.0 browser JavaScript client

Disclaimer

This library is a work in progress and should not be considered production ready pre v1.0.

Usage

Initializing the client


import Client from '@influxdata/influx'

const client = new Client('basepath', 'token')

Querying

Using the client to execute a query:

const query = 'from(bucket: "my_bucket") |> range(start: -1h)'

const {promise, cancel} = client.queries.execute('someorgid', query)

const csv = await promise

The returned promise will eventually resolve with a Flux CSV.

The request can also be canceled with the returned cancel function, in which case the promise will reject with a CancellationError:

cancel() // Cancels request

Writing

Data written to the database should be in line protocol


const data = '' // Line protocal string

const response = await client.write.create('orgID', 'bucketID', data)

Development

Requirements

  • OpenJDK 8 or higher
  • Node 10.x or higher

Installing dependencies

yarn

Generating base from swagger

yarn run generate

Releasing a new version

Ensure that:

  • You have administrator access to this repo on GitHub
  • You have permissions to publish to the influxdata organization on npm
  • You are logged into Yarn (yarn login)
  • You are on master and the working tree is clean

Then run the publish script in the root of the repo:

./publish

Keywords

FAQs

Package last updated on 22 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc