New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cove-api

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cove-api - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

9

lib/cove-api.js

@@ -173,5 +173,8 @@ var request = require('request'),

if (!res || res.statusCode !== 200) {
var msg = {error: "unexpected statusCode"};
if (res) {
msg.statusCode = res.statusCode;
var msg = {
error : "unexpected statusCode",
statusCode : res.statusCode
};
if (res && body) {
msg.error = body;
}

@@ -178,0 +181,0 @@ return deferred.reject(msg);

{
"name": "cove-api",
"version": "0.1.5",
"version": "0.1.6",
"description": "A node.js module for accessing the PBS COVE V1 API",

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

@@ -146,2 +146,21 @@ var demand = require('must'),

});
it("Should return a COVE error on a bad request (Async)", function (finished){
var url = 'http://api.pbs.org/cove/v1/programs/?order_by=-available_datetime&filter_availability_status=Available&filter_title=Nova';
coveAPI.setAuth(sandbox_options);
var options = {};
coveAPI.request_async(url, options, function(err, data){
if (err) {
err.statusCode.must.be(500);
err.must.be.an.object();
err.statusCode.must.be.a.number();
finished();
} else {
data.must.not.be.an.object();
finished();
}
});
});
});
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