Comparing version 1.0.2 to 1.0.3
var client = require("../client"); | ||
var json = require("../json"); | ||
var util = require("util"); | ||
@@ -221,7 +222,7 @@ | ||
var description = args._[5]; | ||
var graphs = JSON.parse(args._[6]); | ||
var graphs = json.parse(args._[6]); | ||
var options = {}; | ||
if(args["tmpvars"]){ | ||
options.templateVariables = JSON.parse(args["tmpvars"]); | ||
options.templateVariables = json.parse(args["tmpvars"]); | ||
} | ||
@@ -228,0 +229,0 @@ if(args["width"]){ |
var client = require("../client"); | ||
var json = require("../json"); | ||
var util = require("util"); | ||
@@ -168,3 +169,3 @@ | ||
function remove(dashId, callback){ | ||
client.request("DELETE", util.format("/dash/%s", dashId), params, callback); | ||
client.request("DELETE", util.format("/dash/%s", dashId), {}, callback); | ||
} | ||
@@ -190,3 +191,3 @@ | ||
function getAll(callback){ | ||
client.request("GET", "/dash", params, callback); | ||
client.request("GET", "/dash", {}, callback); | ||
} | ||
@@ -213,3 +214,3 @@ | ||
function get(dashId, callback){ | ||
client.request("GET", util.format("/dash/%s", dashId), params, callback); | ||
client.request("GET", util.format("/dash/%s", dashId), {}, callback); | ||
} | ||
@@ -255,6 +256,6 @@ | ||
var description = args._[5]; | ||
var graphs = JSON.parse(args._[6]); | ||
var graphs = json.parse(args._[6]); | ||
var templateVariables = []; | ||
if(args["tmpvars"]){ | ||
templateVariables = JSON.parse(args["tmpvars"]); | ||
templateVariables = json.parse(args["tmpvars"]); | ||
} | ||
@@ -267,6 +268,6 @@ | ||
var description = args._[6]; | ||
var graphs = JSON.parse(args._[7]); | ||
var graphs = json.parse(args._[7]); | ||
var templateVariables = []; | ||
if(args["tmpvars"]){ | ||
templateVariables = JSON.parse(args["tmpvars"]); | ||
templateVariables = json.parse(args["tmpvars"]); | ||
} | ||
@@ -273,0 +274,0 @@ |
var extend = require("extend"); | ||
var https = require("https"); | ||
var json = require("./json"); | ||
var url = require("url"); | ||
@@ -53,3 +54,3 @@ var util = require("util"); | ||
params = params || {}; | ||
var body = (typeof params["body"] === "object")? JSON.stringify(params["body"]) : params["body"]; | ||
var body = (typeof params["body"] === "object")? json.stringify(params["body"]) : params["body"]; | ||
var query = { | ||
@@ -101,3 +102,3 @@ "api_key": this.api_key, | ||
var error = null; | ||
try{ data = JSON.parse(data); }catch(e){} | ||
try{ data = json.parse(data); }catch(e){} | ||
if(data["errors"]){ | ||
@@ -104,0 +105,0 @@ error = data["errors"]; |
{ | ||
"name": "dogapi", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Datadog API Node.JS Client", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"test": "./node_modules/.bin/mocha ./test", | ||
"docs": "node ./docs/create.js > index.html" | ||
@@ -36,2 +36,3 @@ }, | ||
"extend": "^2.0.0", | ||
"json-bigint": "^0.1.4", | ||
"minimist": "^1.1.1", | ||
@@ -41,7 +42,9 @@ "rc": "^1.0.0" | ||
"devDependencies": { | ||
"bignumber.js": "^2.0.7", | ||
"docast": "^0.1.1", | ||
"glob": "^5.0.3", | ||
"js-yaml": "^3.2.7", | ||
"marked": "^0.3.3" | ||
"marked": "^0.3.3", | ||
"mocha": "^2.2.5" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
146133
26
2638
1
4
6
+ Addedjson-bigint@^0.1.4
+ Addedbignumber.js@1.1.1(transitive)
+ Addedjson-bigint@0.1.4(transitive)