brettlangdon / node-dogapi

Datadog API Node.JS Client
https://brettlangdon.github.io/node-dogapi/
105 stars 45 forks source link

Refactor and improvements #61

Open AdrieanKhisbe opened 5 years ago

AdrieanKhisbe commented 5 years ago

Introduce a new way to consume the API:

const Dogapi = require('dogapi');

const options = {
  api_key: 'XXX',
  app_key: 'YYY',
  api_host: 'app.datadoghq.eu'
};

const dogapi = new Dogapi(options);
dogapi.metric.send('test.metric1', 10);

that way side by side client with different configuration could be used.