Socket
Socket
Sign inDemoInstall

@barchart/events-client-js

Package Overview
Dependencies
16
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @barchart/events-client-js

JavaScript library for interfacing with Barchart's Events API


Version published
Weekly downloads
3
decreased by-40%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@barchart/events-client-js

AWS CodeBuild

A public JavaScript SDK for interfacing with Barchart's Event Tracking System

Overview

The Barchart Event Tracking System collects usage statistics from various software systems and exposes the following functionality:

  • Accepts and saves events (e.g. Job Started, Pizza Ordered, Lightning Struck, etc).
  • Accepts requests to generate log files containing events (given a customer, product type, and optional start and end dates).

This SDK simplifies interaction with the Barchart Event Tracking System, by exposing JavaScript classes with simple functions:

  • EventGateway.sendEvents (sends a new event(s) to the backend),
  • ReportGateway.startReport (triggers generation of a new report),
  • ReportGateway.getReportAvailability (checks progress of report generation), and
  • ReportGateway.getReport (gets the download link for a completed report)

Also, two utilities exist:

  • EventBatcher (Wraps an EventGateway, temporarily caching new events before sending them to the backend), and
  • EventFactory (Simplifies creation of event objects)

Documentation

The code is documented with JSDoc. This will be used as the basis for formal documentation (coming soon).

Examples

SDK Usage

A step-by-step guide for using the SDK can be found here: README_SDK.md.

Direct API Access

You can interact with the Barchart Event Tracking System without using this SDK. The documentation for the API can be found here: README_API.md.

Browser Test Client

Two example pages exist. One allows you to send manually generated events the backend. The other allows you to trigger report generation, check report status, and download reports. Please note, these clients are attached to the staging environment (not the production environment).

Load the examples from your local file system, here:

  • ./example/browser/example.event.html
  • ./example/browser/example.report.html

Or, visit the hosted page at:

Development

Package Managers

This library has been published as a public module to NPM as @barchart/events-client-js.

npm install @barchart/events-client-js -S
Build

Modern JavaScript language features are used. Some browsers may still require polyfills.

License

This software is provided under the MIT license.

FAQs

Last updated on 30 Jun 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc