telemetrics-js
v0.0.10
Published
Telemetrics makes it easy to track and forecast your data. This is the client-side (JavaScript) library to interact with the Telemetrics REST API at api.telemetrics.dev.
Downloads
1
Maintainers
Readme
Telemetrics - JS Library
Track and forecast progress.
Telemetrics makes it easy to track and forecast your data. This is the client-side (JavaScript) library to interact with the Telemetrics REST API at api.telemetrics.dev.
Features
- Capture single data points, or multiple data points in bulk.
- Create, manage and delete collections, metrics, goals and milestones.
- Configure forecast settings for each metric.
- Retrieve progress towards goals and milestones.
- Output forecasts, make predictions, and analyze your data.
Installation
npm install telemetrics-js
Capturing Data
Before we do anything in Telemetrics, we'll need to send some data points. The minimum required parameters are the metric ID
and a value
(float or integer).
import Telemetrics from 'telemetrics-js';
// Capture a value of "75" for a given metric ID
Telemetrics.capture('XXXX-XXXX-XXXX-XXXX', 75);
Capturing Metadata (Coming Soon)
import Telemetrics from 'telemetrics-js';
// Capture a value of "90", with some additional metadata for filtering later
Telemetrics.capture('XXXX-XXXX-XXXX-XXXX', 90, {
metadata: {
foo: 'bar',
bar: 'foo'
}
});
Capturing in Bulk (Coming Soon)
import Telemetrics from 'telemetrics-js';
// Capture multiple values all at once
Telemetrics.captureBulk('XXXX-XXXX-XXXX-XXXX', [
{
timestamp: "2023-06-20 05:00:00",
value: 75
},
{
timestamp: "2023-06-20 05:45:00",
value: 90,
metadata: {
foo: 'bar',
bar: 'foo'
}
}
]);