3.0.0 • Published 3 years ago

2-met-dev-sdk v3.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

2-met-dev-SDK

This SDK allows to create a new event for a metric within your organization.

Installation

Use the package manager npm to install 2-met-dev-SDK.

npm install 2-met-dev-SDK

Usage

const SDK = require("2-met-dev-sdk");

const sdkInstance = new sdk("API-KEY");

const createNewEvent = async () => {
  const response = await sdkInstance.createEvent("metricId", "value");
  return response;
};

In order to use this SDK, you have to follow this steps:

  • Import the SDK using the name '2-met-dev-sdk'
  • Create an instance passing as parameter the API-KEY of your organization
  • Create a new event using the method 'createEvent()' which recieves first the metric ID and second the new value. This method is asynchronous, so it has to be inside an async/await function. The response will be ok if the value was added successfully, error if there was a problem, or timeout.
2.0.3

3 years ago

2.0.4

3 years ago

3.0.0

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago