How to use the moesifapi.configuration function in moesifapi

To help you get started, we’ve selected a few moesifapi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Moesif / moesif-express / test / outgoingWithMoesif.js View on Github external
before(function() {
      var config = moesifapi.configuration;
      config.ApplicationId = '';
      // config.BaseUri = options.baseUri || options.BaseUri || config.BaseUri;
      var moesifController = moesifapi.ApiController;
      var logger = function(text) {
        console.log('[test logger]:' + text);
      };

      var options = {};

      options.identifyUser =
        options.identifyUser ||
        function() {
          return undefined;
        };

      options.identifyCompany =
github Moesif / moesif-express / lib / index.js View on Github external
module.exports = function(options) {
  logMessage(options.debug, 'moesifInitiator', 'start');

  ensureValidOptions(options);

  // config moesifapi
  var config = moesifapi.configuration;
  config.ApplicationId = options.applicationId || options.ApplicationId;
  config.BaseUri = options.baseUri || options.BaseUri || config.BaseUri;
  var moesifController = moesifapi.ApiController;

  options.identifyUser = options.identifyUser || noop;
  options.identifyCompany = options.identifyCompany || noop;

  // function to add custom metadata (must be an object that can be converted to JSON)
  options.getMetadata = options.getMetadata || noop;

  // function to add custom session token (must be a string)
  options.getSessionToken = options.getSessionToken || noop;

  // function to allow adding of custom tags (this is decprecated - getMetadata should be used instead)
  options.getTags = options.getTags || noop;

moesifapi

Collection/Data Ingestion API for Moesif

Apache-2.0
Latest version published 1 month ago

Package Health Score

73 / 100
Full package analysis