dashbot
Version:
Analytics for your bot
26 lines (20 loc) • 703 B
JavaScript
/* Copyright (c) 2016-2019 Dashbot Inc All rights reserved */
var _ = require('lodash');
var EventLogger = require('./event-logger')
var DashBotEventUtil = require('./event-util')
function DashBotBase(apiKey, urlRoot, debug, printErrors, config, platform) {
var that = this;
that.apiKey = apiKey;
that.platform = platform;
that.urlRoot = urlRoot;
that.debug = debug;
that.printErrors = printErrors;
that.eventLogger = new EventLogger(apiKey, urlRoot, debug, printErrors, config, platform);
that.config = config;
that.eventUtil = new DashBotEventUtil()
that.logEvent = function(data) {
return that.eventLogger.logEvent(data);
}
}
module.exports = DashBotBase;