This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function initializeClient() { | |
const client = await ZoomdataSDK.createClient({ | |
credentials: { | |
key: "KVKWiD8kUl" | |
}, | |
application: { | |
secure: true, | |
host: "developer.zoomdata.com", | |
port: 443, | |
path: "/zoomdata-2.6" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function transformToCount20(metric) { | |
var countMetric20 = {}; | |
if (metric) { | |
_.set(countMetric20, 'type', 'COUNT'); | |
if (_.has(metric, 'label')) { | |
_.set(countMetric20, 'label', metric.label); | |
} | |
return metric.name === 'count' ? countMetric20 : metric; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type metricCount = {type_: string}; | |
type metricWithLabel = { | |
type_: string, | |
label: string | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type metricCount = {type_: string}; | |
type metricWithLabel = { | |
type_: string, | |
label: string | |
}; | |
let createCountWithLabel = (label: string) : metricWithLabel => {type_: "COUNT", label}; | |
let countMetric: metricCount = {type_: "COUNT"}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type metricCount = {type_: string}; | |
type metricWithLabel = { | |
type_: string, | |
label: string | |
}; | |
let createCountWithLabel = (label: string) : metricWithLabel => {type_: "COUNT", label}; | |
let countMetric: metricCount = {type_: "COUNT"}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type metricCount = {type_: string}; | |
type metricWithLabel = { | |
type_: string, | |
label: string | |
}; | |
let createCountWithLabel = (label: string) : metricWithLabel => {type_: "COUNT", label}; | |
let countMetric: metricCount = {type_: "COUNT"}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type metricCount = {type_: string}; | |
type metricWithLabel = { | |
type_: string, | |
label: string | |
}; | |
let createCountWithLabel = (label) : metricWithLabel => {type_: "COUNT", label}; | |
type metric = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by BUCKLESCRIPT VERSION 2.1.0, PLEASE EDIT WITH CARE | |
'use strict'; | |
var Block = require("bs-platform/lib/js/block.js"); | |
var Json_decode = require("bs-json/src/Json_decode.js"); | |
function createCountWithLabel(label) { | |
return /* record */[ | |
/* type_ */"COUNT", | |
/* label */label |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MetricEncoder = { | |
let encodeCountMetricWithLabel = (m: metricWithLabel) => | |
Json.Encode.(object_([("type", string(m.type_)), ("label", string(m.label))])); | |
let encodeCountMetric = (m: metricCount) => Json.Encode.(object_([("type", string(m.type_))])); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type metricCount = {type_: string}; | |
type metricWithLabel = { | |
type_: string, | |
label: string | |
}; | |
let createCountWithLabel = (label) : metricWithLabel => {type_: "COUNT", label}; | |
let countMetric: metricCount = {type_: "COUNT"}; |