2-met-dev-sdk 中文文档教程
2-met-dev-SDK
此 SDK 允许为您组织内的指标创建新事件。
Installation
使用包管理器 npm 安装 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;
};
要使用此 SDK,您必须执行以下步骤:
- 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, ortimeout
.
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, ortimeout
.
更多
你可能也喜欢
- 404-page 中文文档教程
- 5r1m-phonegap-plugin-barcodescanner 中文文档教程
- @1nd/react-social-login 中文文档教程
- @3dhd_org/patient 中文文档教程
- @3test/ethereum-order-gateway-contracts 中文文档教程
- @4tw/vue-cli-plugin-vuetify-preset-4tw 中文文档教程
- @58fe/hammer 中文文档教程
- @8base/react-sdk 中文文档教程
- @8bu/mlb-services 中文文档教程
- @aaa-ncnu/common-react-components 中文文档教程