stackexchange
Advanced tools
Comparing version 0.4.0 to 1.0.0-0
@@ -7,5 +7,3 @@ 'use strict'; | ||
var query = require('../query') | ||
, post = require('../post') | ||
, Logger = require('devnull') | ||
, log = new Logger({ timestamp: false }); | ||
, post = require('../post'); | ||
@@ -38,3 +36,3 @@ | ||
if(!criteria['key'] || !criteria['access_token']) { | ||
return log.error('answers.upvote lacks key and/or access token as criteria'); | ||
return callback(new Error('answers.upvote lacks key and/or access token as criteria')); | ||
} | ||
@@ -57,3 +55,3 @@ undo = undo? "/undo" : ""; | ||
if(!criteria['key'] || !criteria['access_token']) { | ||
return log.error('answers.upvote lacks key and/or access token as criteria'); | ||
return callback(new Error('answers.upvote lacks key and/or access token as criteria')); | ||
} | ||
@@ -60,0 +58,0 @@ undo = undo? "/undo" : ""; |
@@ -7,5 +7,3 @@ 'use strict'; | ||
var query = require('../query') | ||
, post = require('../post') | ||
, Logger = require('devnull') | ||
, log = new Logger({ timestamp: false }); | ||
, post = require('../post'); | ||
@@ -35,3 +33,3 @@ | ||
function answers (criteria, callback, ids) { | ||
if (!ids || !ids.length) return log.error('questions.answers lacks IDs to query'); | ||
if (!ids || !ids.length) return callback(new Error('questions.answers lacks IDs to query')); | ||
query('questions/' + ids.join(';') + '/answers', criteria, callback); | ||
@@ -52,3 +50,3 @@ } | ||
if(!criteria['key'] || !criteria['access_token']) { | ||
return log.error('questions.upvote lacks key and/or access token as criteria'); | ||
return callback(new Error('questions.upvote lacks key and/or access token as criteria')); | ||
} | ||
@@ -71,3 +69,3 @@ undo = undo? "/undo" : ""; | ||
if(!criteria['key'] || !criteria['access_token']) { | ||
return log.error('questions.upvote lacks key and/or access token as criteria'); | ||
return callback(new Error('questions.upvote lacks key and/or access token as criteria')); | ||
} | ||
@@ -74,0 +72,0 @@ undo = undo? "/undo" : ""; |
@@ -6,5 +6,3 @@ 'use strict'; | ||
*/ | ||
var query = require('../query') | ||
, Logger = require('devnull') | ||
, log = new Logger({ timestamp: false }); | ||
var query = require('../query'); | ||
@@ -20,3 +18,3 @@ /** | ||
function answers (criteria, ids, callback) { | ||
if (!ids || !ids.length) return log.error('users.answers lacks IDs to query'); | ||
if (!ids || !ids.length) return callback(new Error('users.answers lacks IDs to query')); | ||
query('users/' + ids.join(';') + '/answers', criteria, callback); | ||
@@ -23,0 +21,0 @@ } |
@@ -6,5 +6,3 @@ 'use strict'; | ||
, request = require('request') | ||
, url = require('url') | ||
, Logger = require('devnull') | ||
, log = new Logger({ timestamp: false }); | ||
, url = require('url'); | ||
@@ -21,3 +19,3 @@ | ||
module.exports = function post (destination, data, callback) { | ||
if (!callback) return log.critical('No callback supplied for: ' + destination); | ||
if (!callback) throw new Error('No callback supplied for: ' + destination); | ||
@@ -24,0 +22,0 @@ // Query against the predefined website and construct the endpoint. |
@@ -6,5 +6,3 @@ 'use strict'; | ||
, request = require('request') | ||
, url = require('url') | ||
, Logger = require('devnull') | ||
, log = new Logger({ timestamp: false }); | ||
, url = require('url'); | ||
@@ -20,3 +18,3 @@ /** | ||
module.exports = function query (destination, criteria, callback) { | ||
if (!callback) return log.critical('No callback supplied for: ' + destination); | ||
if (!callback) throw new Error('No callback supplied for: ' + destination); | ||
@@ -23,0 +21,0 @@ // Query against the predefined website and construct the endpoint. |
{ | ||
"name": "stackexchange", | ||
"version": "0.4.0", | ||
"version": "1.0.0-0", | ||
"description": "Node.js implementation of the stackexchange/stackoverflow API", | ||
@@ -15,12 +15,10 @@ "main": "./lib/stackexchange", | ||
"nconf": "0.8.x", | ||
"request": "2.72.x", | ||
"devnull": "0.0.x", | ||
"request": "^2.87.0", | ||
"utile": "0.3.x" | ||
}, | ||
"devDependencies": { | ||
"mocha": "2.5.x", | ||
"chai": "3.5.x", | ||
"sinon": "1.17.x", | ||
"sinon-chai": "2.8.x", | ||
"pre-commit": "1.1.x" | ||
"chai": "^4.1.2", | ||
"mocha": "^5.2.0", | ||
"sinon": "^4.5.0", | ||
"sinon-chai": "^3.1.0" | ||
}, | ||
@@ -27,0 +25,0 @@ "keywords": [ |
@@ -7,2 +7,2 @@ global.chai = require('chai'); | ||
global.chai.use(global.sinonChai); | ||
global.chai.Assertion.includeStack = true; | ||
global.chai.config.includeStack = true; |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
3
4
24007
16
751
1
+ Addedajv@6.12.6(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedpsl@1.10.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addeduuid@3.4.0(transitive)
- Removeddevnull@0.0.x
- Removedansi-styles@2.2.1(transitive)
- Removedassert-plus@0.2.0(transitive)
- Removedasync@2.6.4(transitive)
- Removedaws-sign2@0.6.0(transitive)
- Removedbl@1.1.2(transitive)
- Removedboom@2.10.1(transitive)
- Removedcaseless@0.11.0(transitive)
- Removedchalk@1.1.3(transitive)
- Removedcolors@0.6.2(transitive)
- Removedcommander@2.20.3(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedcryptiles@2.0.5(transitive)
- Removeddevnull@0.0.12(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedform-data@1.0.1(transitive)
- Removedgenerate-function@2.3.1(transitive)
- Removedgenerate-object-property@1.2.0(transitive)
- Removedhar-validator@2.0.6(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhawk@3.1.3(transitive)
- Removedhoek@2.16.3(transitive)
- Removedhttp-signature@1.1.1(transitive)
- Removedis-my-ip-valid@1.0.1(transitive)
- Removedis-my-json-valid@2.20.6(transitive)
- Removedis-property@1.0.2(transitive)
- Removedisarray@1.0.0(transitive)
- Removedjsonpointer@5.0.1(transitive)
- Removedlodash@4.17.21(transitive)
- Removednode-uuid@1.4.8(transitive)
- Removedoauth-sign@0.8.2(transitive)
- Removedpinkie@2.0.4(transitive)
- Removedpinkie-promise@2.0.1(transitive)
- Removedprocess-nextick-args@1.0.7(transitive)
- Removedqs@6.1.2(transitive)
- Removedreadable-stream@2.0.6(transitive)
- Removedrequest@2.72.0(transitive)
- Removedsntp@1.0.9(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedstringstream@0.0.6(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedtough-cookie@2.2.2(transitive)
- Removedtunnel-agent@0.4.3(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedxtend@4.0.2(transitive)
Updatedrequest@^2.87.0