Socket
Socket
Sign inDemoInstall

dogapi

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dogapi - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

lib/api/graph.js

@@ -21,3 +21,3 @@ var client = require("../client");

* var to = dogapi.now();
* var from = from - 3600; // an hour ago
* var from = to - 3600; // an hour ago
* dogapi.graph.snapshot(query, from, to, function(err, res){

@@ -24,0 +24,0 @@ * console.dir(res);

@@ -6,3 +6,2 @@ var extend = require("extend");

/*section: client

@@ -18,2 +17,3 @@ *comment: |

this.app_key = null;
this.proxy_agent = null;
this.api_version = "v1";

@@ -74,5 +74,9 @@ this.api_host = "app.datadoghq.com";

method: method.toUpperCase(),
path: path,
path: path
};
if(this.proxy_agent){
http_options["agent"] = this.proxy_agent;
}
if(["POST", "PUT"].indexOf(http_options["method"]) >= 0){

@@ -79,0 +83,0 @@ http_options["headers"] = {

@@ -14,2 +14,3 @@ require("./api")(module.exports);

* * api_host: the host to call [default: `api.datadoghq.com`]
* * proxy_agent: Optional, A Https Proxy agent.
*example:

@@ -19,5 +20,17 @@ * |

* var dogapi = require("dogapi");
*
* // Optional for Proxy -------8<----------
* // Code from http://blog.vanamco.com/proxy-requests-in-node-js/
* var HttpsProxyAgent = require("./httpsproxyagent");
*
* var agent = new HttpsProxyAgent({
* proxyHost: "MY_PROXY_HOST",
* proxyPort: 3128
* });
* // Optional for Proxy -------->8----------
*
* var options = {
* api_key: "<API_KEY_HERE>",
* app_key: "<APP_KEY_HERE>"
* app_key: "<APP_KEY_HERE>",
* proxy_agent: agent // Optional for Proxy
* };

@@ -24,0 +37,0 @@ * dogapi.initialize(options);

{
"name": "dogapi",
"version": "1.0.0",
"version": "1.0.1",
"description": "Datadog API Node.JS Client",

@@ -28,3 +28,4 @@ "main": "lib/index.js",

"colinjonesx (http://www.thetestpeople.com)",
"dalehamel (http://blog.srvthe.net)"
"dalehamel (http://blog.srvthe.net)",
"egut (https://github.com/egut)"
],

@@ -31,0 +32,0 @@ "license": "MIT",

@@ -44,2 +44,28 @@ node-dogapi

### HTTPS Proxy
If you are behind a proxy you need to a proxy agent. You can use the https proxy agent from
http://blog.vanamco.com/proxy-requests-in-node-js/ if you like.
To configure dogapi with the agent just add it to the options.
```javascript
var dogapi = require("dogapi");
//Code from http://blog.vanamco.com/proxy-requests-in-node-js/
var HttpsProxyAgent = require("./httpsproxyagent");
var agent = new HttpsProxyAgent({
proxyHost: "MY_PROXY_HOST",
proxyPort: 3128
});
var options = {
api_key: "YOUR_KEY_HERE",
app_key: "YOUR_KEY_HERE",
proxy_agent: agent
};
dogapi.initialize(options);
```
## CLI Usage

@@ -46,0 +72,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc