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 0.1.6 to 0.1.7

26

lib/api/snapshot.js

@@ -75,2 +75,28 @@ var extend = require('extend');

snapshot_api.prototype.snapshot_status = function(snapshot_url, callback){
/*
* snapshot_api.add_snapshot(snapshot_url, [callback])
*
* method used to check the status of a datadog snapshot.
* https://github.com/DataDog/dogapi/blob/master/src/dogapi/http/snapshot.py#L64
* Snapshot URLs are returned right away, but may be empty if the query or graph is complicated.
* Result will be a json payload, with 403 for incomplete, or 200 for complete.
* Examples:
* * {"status_code":403} - incomplete (still processing, image is empty)
* * {"status_code":200} - image is rendered and ready
*
* `snapshot_url` is a string containing URL returned from a call to add_snapshot or add_snapshot_from_def
*
* `callback` is an optional function for the result
* callback(error, result, status_code)
*/
if(typeof snapshot_url != 'string'){
throw new Error('`snapshot_url` parameter must be a string');
}
url = snapshot_url.split('/snapshot/view/')[1].split('.png')[0]
this.request('GET', '/graph/snapshot_status/'+url, {}, callback);
};
return module.exports = snapshot_api;

2

package.json
{
"name": "dogapi",
"version": "0.1.6",
"version": "0.1.7",
"description": "Datadog API Node.JS Client",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -122,2 +122,4 @@ node-dogapi

* method used to take a snapshot of a datadog graph
* `dogapi.snapshot_status(snapshot_url, [callback])`
* method used to check the status of a datadog snapshot

@@ -124,0 +126,0 @@ ## Sample Usage:

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