| @ -0,0 +1,36 @@ | |||
| var util = require('util'); | |||
| var alert_api = function(){ | |||
| }; | |||
| alert_api.prototype.add_alert = function(){ | |||
| }; | |||
| alert_api.prototype.update_alert = function(){ | |||
| }; | |||
| alert_api.prototype.get_alert = function(alert_id, callback){ | |||
| this.request('GET', util.format('/alert/%s', alert_id), callback) | |||
| }; | |||
| alert_api.prototype.delete_alert = function(){ | |||
| this.request('DELETE', util.format('/alert/%s', alert_id), callback) | |||
| }; | |||
| alert_api.prototype.get_all_alerts = function(){ | |||
| this.request('GET', '/alert', callback) | |||
| }; | |||
| alert_api.prototype.mute_alerts = function(callback){ | |||
| this.request('POST', '/mute_alerts', callback) | |||
| }; | |||
| alert_api.prototype.unmute_alerts = function(callback){ | |||
| this.request('POST', '/unmute_alerts', callback) | |||
| }; | |||
| return module.exports = alert_api; | |||
| @ -0,0 +1,11 @@ | |||
| var https = require('https'); | |||
| var client = function(options){ | |||
| options = (options)? options : {}; | |||
| }; | |||
| client.prototype.request = function(callback){ | |||
| }; | |||
| return module.exports = client; | |||
| @ -0,0 +1,25 @@ | |||
| var dash_api = function(){ | |||
| }; | |||
| dash_api.prototype.get_dashboard = function(dash_id, callback){ | |||
| this.request('GET', util.format('/dash/%s', dash_id), callback) | |||
| }; | |||
| dash_api.prototype.get_all_dashboards = function(callback){ | |||
| this.request('GET', '/dash', callback) | |||
| }; | |||
| dash_api.prototype.create_dashboard = function(){ | |||
| }; | |||
| dash_api.prototype.update_dashboard = function(){ | |||
| }; | |||
| dash_api.prototype.delete_dashboard = function(dash_id, callback){ | |||
| this.request('DELETE', util.format('/dash/%s', dash_id), callback) | |||
| }; | |||
| return module.exports = dash_api; | |||
| @ -0,0 +1,30 @@ | |||
| var event_api = function(){ | |||
| }; | |||
| event_api.prototype.stream = function(start, end, callback, options){ | |||
| }; | |||
| event_api.prototype.get_event = function(id, callback){ | |||
| }; | |||
| event_api.prototype.add_event = function(){ | |||
| }; | |||
| event_api.prototype.add_comment = function(){ | |||
| }; | |||
| event_api.prototype.update_comment = function(){ | |||
| }; | |||
| event_api.prototype.delete_comment = function(){ | |||
| }; | |||
| return module.exports = event_api; | |||
| @ -0,0 +1,29 @@ | |||
| var infrastructure_api = function(){ | |||
| }; | |||
| infrastructure_api.prototype.search = function(query, callback){ | |||
| this.request('GET', '/search', query, callback); | |||
| }; | |||
| infrastructure_api.prototype.all_tags = function(){ | |||
| }; | |||
| infrastructure_api.prototype.host_tags = function(){ | |||
| }; | |||
| infrastructure_api.prototype.add_tags = function(){ | |||
| }; | |||
| infrastructure_api.prototype.change_tags = function(){ | |||
| }; | |||
| infrastructure_api.prototype.detach_tags = function(){ | |||
| }; | |||
| return module.exports = infrastructure_api; | |||
| @ -0,0 +1,13 @@ | |||
| var metric_api = function(){ | |||
| }; | |||
| metric_api.prototype.add_metric = function(){ | |||
| }; | |||
| metric_api.prototype.add_metrics = function(){ | |||
| }; | |||
| return module.exports = metric_api; | |||
| @ -0,0 +1,22 @@ | |||
| var extend = require('extend'); | |||
| var BaseClient = require('./BaseClient.js'); | |||
| var AlertApi = require('./AlertApi.js'); | |||
| var DashApi = require('./DashApi.js'); | |||
| var EventApi = require('./EventApi.js'); | |||
| var InfrastructureApi = require('./InfrastructureApi.js'); | |||
| var MetricApi = require('./MetricApi.js'); | |||
| var DogHttpApi = function(options){ | |||
| BaseClient.call(this, options); | |||
| }; | |||
| extend(DogHttpApi.prototype, | |||
| BaseClient.prototype, | |||
| AlertApi.prototype, | |||
| DashApi.prototype, | |||
| EventApi.prototype, | |||
| InfrastructureApi.prototype, | |||
| MetricApi.prototype); | |||
| return module.exports = DogHttpApi; | |||
| @ -0,0 +1 @@ | |||
| test | |||
| @ -0,0 +1,43 @@ | |||
| # extend() for Node.js | |||
| `node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true. | |||
| ## Installation | |||
| This package is available on [NPM](https://npmjs.org/) as: `extend` | |||
| ``` sh | |||
| npm install extend | |||
| ``` | |||
| ## Usage | |||
| **Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)** | |||
| *Extend one object with one or more others, returning the modified object.* | |||
| Keep in mind that the target object will be modified, and will be returned from extend(). | |||
| If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s). | |||
| Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over. | |||
| ### Arguments | |||
| * `deep` *Boolean* (optional) | |||
| If set, the merge becomes recursive (i.e. deep copy). | |||
| * `target` *Object* | |||
| The object to extend. | |||
| * `object1` *Object* | |||
| The object that will be merged into the first. | |||
| * `objectN` *Object* (Optional) | |||
| More objects to merge into the first. | |||
| ## License | |||
| `node-extend` is licensed under the [MIT License](http://opensource.org/licenses/MIT). | |||
| ## Acknowledgements | |||
| All credit to the jQuery authors for perfecting this amazing utility. | |||
| Ported to Node.js by [Stefan Thomas](https://github.com/justmoon) with contributions by [Jonathan Buchanan](https://github.com/insin). | |||
| @ -0,0 +1,77 @@ | |||
| var hasOwn = Object.prototype.hasOwnProperty; | |||
| function isPlainObject(obj) { | |||
| if (!obj || toString.call(obj) !== '[object Object]' || obj.nodeType || obj.setInterval) | |||
| return false; | |||
| var has_own_constructor = hasOwnProperty.call(obj, 'constructor'); | |||
| var has_is_property_of_method = hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'); | |||
| // Not own constructor property must be Object | |||
| if (obj.constructor && !has_own_constructor && !has_is_property_of_method) | |||
| return false; | |||
| // Own properties are enumerated firstly, so to speed up, | |||
| // if last one is own, then all properties are own. | |||
| var key; | |||
| for ( key in obj ) {} | |||
| return key === undefined || hasOwn.call( obj, key ); | |||
| }; | |||
| module.exports = function extend() { | |||
| var options, name, src, copy, copyIsArray, clone, | |||
| target = arguments[0] || {}, | |||
| i = 1, | |||
| length = arguments.length, | |||
| deep = false; | |||
| // Handle a deep copy situation | |||
| if ( typeof target === "boolean" ) { | |||
| deep = target; | |||
| target = arguments[1] || {}; | |||
| // skip the boolean and the target | |||
| i = 2; | |||
| } | |||
| // Handle case when target is a string or something (possible in deep copy) | |||
| if ( typeof target !== "object" && typeof target !== "function") { | |||
| target = {}; | |||
| } | |||
| for ( ; i < length; i++ ) { | |||
| // Only deal with non-null/undefined values | |||
| if ( (options = arguments[ i ]) != null ) { | |||
| // Extend the base object | |||
| for ( name in options ) { | |||
| src = target[ name ]; | |||
| copy = options[ name ]; | |||
| // Prevent never-ending loop | |||
| if ( target === copy ) { | |||
| continue; | |||
| } | |||
| // Recurse if we're merging plain objects or arrays | |||
| if ( deep && copy && ( isPlainObject(copy) || (copyIsArray = Array.isArray(copy)) ) ) { | |||
| if ( copyIsArray ) { | |||
| copyIsArray = false; | |||
| clone = src && Array.isArray(src) ? src : []; | |||
| } else { | |||
| clone = src && isPlainObject(src) ? src : {}; | |||
| } | |||
| // Never move original objects, clone them | |||
| target[ name ] = extend( deep, clone, copy ); | |||
| // Don't bring in undefined values | |||
| } else if ( copy !== undefined ) { | |||
| target[ name ] = copy; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| // Return the modified object | |||
| return target; | |||
| }; | |||
| @ -0,0 +1,31 @@ | |||
| { | |||
| "name": "extend", | |||
| "version": "1.1.3", | |||
| "description": "Port of jQuery.extend for Node.js", | |||
| "main": "./index", | |||
| "keywords": [ | |||
| "extend", | |||
| "clone", | |||
| "merge" | |||
| ], | |||
| "author": { | |||
| "name": "Stefan Thomas", | |||
| "email": "justmoon@members.fsf.org", | |||
| "url": "http://www.justmoon.net" | |||
| }, | |||
| "repository": { | |||
| "type": "git", | |||
| "url": "https://github.com/justmoon/node-extend.git" | |||
| }, | |||
| "devDependencies": { | |||
| "buster": "*" | |||
| }, | |||
| "readme": "# extend() for Node.js\n\n`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.\n\n## Installation\n\nThis package is available on [NPM](https://npmjs.org/) as: `extend`\n\n``` sh\nnpm install extend\n```\n\n## Usage\n\n**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)** \n\n*Extend one object with one or more others, returning the modified object.*\n\nKeep in mind that the target object will be modified, and will be returned from extend().\n\nIf a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s).\nUndefined properties are not copied. However, properties inherited from the object's prototype will be copied over.\n\n### Arguments\n\n* `deep` *Boolean* (optional) \nIf set, the merge becomes recursive (i.e. deep copy).\n* `target`\t*Object* \nThe object to extend.\n* `object1`\t*Object* \nThe object that will be merged into the first.\n* `objectN` *Object* (Optional) \nMore objects to merge into the first.\n\n## License\n\n`node-extend` is licensed under the [MIT License](http://opensource.org/licenses/MIT).\n\n## Acknowledgements\n\nAll credit to the jQuery authors for perfecting this amazing utility.\n\nPorted to Node.js by [Stefan Thomas](https://github.com/justmoon) with contributions by [Jonathan Buchanan](https://github.com/insin).\n", | |||
| "readmeFilename": "README.md", | |||
| "_id": "extend@1.1.3", | |||
| "dist": { | |||
| "shasum": "5ab5cabda761d0e40a0ac6e0abae985fbcfd9fcb" | |||
| }, | |||
| "_from": "extend@", | |||
| "_resolved": "https://registry.npmjs.org/extend/-/extend-1.1.3.tgz" | |||
| } | |||
| @ -0,0 +1,29 @@ | |||
| { | |||
| "name": "node-dogapi", | |||
| "version": "0.1.0", | |||
| "description": "Datadog API Node.JS Client", | |||
| "main": "lib/index.js", | |||
| "scripts": { | |||
| "test": "echo \"Error: no test specified\" && exit 1" | |||
| }, | |||
| "repository": { | |||
| "type": "git", | |||
| "url": "git://github.com/brettlangdon/node-dogapi.git" | |||
| }, | |||
| "keywords": [ | |||
| "datadog", | |||
| "api", | |||
| "datadog", | |||
| "api", | |||
| "dog", | |||
| "dog", | |||
| "api" | |||
| ], | |||
| "author": "Brett Langdon <brett@blangdon.com> (http://brett.is)", | |||
| "license": "MIT", | |||
| "readmeFilename": "README.md", | |||
| "gitHead": "f388635a5ab4f4da25702dc0999385d437bdf2bc", | |||
| "dependencies": { | |||
| "extend": "~1.1.3" | |||
| } | |||
| } | |||