Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mean-comscore-api

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mean-comscore-api - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

2

package.json
{
"name": "mean-comscore-api",
"version": "0.0.7",
"version": "0.0.8",
"description": "Loads ComScore reports from the ComScore API",

@@ -5,0 +5,0 @@ "author": {

@@ -35,3 +35,5 @@ # ComScore API

startdate: 20141001,
parameters: 'parameterName:parameterValue'
parameters: {
parameterName: parameterValue
}
})

@@ -25,3 +25,8 @@ 'use strict';

if (req.query.parameters) {
options.parameters = req.query.parameters;
parameters = req.query.parameters.split('|');
options.parameters = {};
for (var i in parameters) {
var parameter = parameters[i].split(':');
options.parameters[parameter[0]] = parameter[1];
}
}

@@ -28,0 +33,0 @@ return options;

@@ -12,8 +12,6 @@ 'use strict';

var url = 'parameters=';
parameters = parameters.split('|');
var encodedParameters = [];
for (var i in parameters) {
var parameter = parameters[i].split(':');
encodedParameters.push(encodeURIComponent(parameter[0]) + ':' + encodeURIComponent(parameter[1]));
}
_.forOwn(parameters, function(parameterValue, parameterName) {
encodedParameters.push(encodeURIComponent(parameterName) + ':' + encodeURIComponent(parameterValue));
});
url += encodedParameters.join('|');

@@ -52,2 +50,3 @@ url += '&';

var json = '';
console.log(url);
https.get(url, function(comScoreResponse) {

@@ -58,2 +57,3 @@ comScoreResponse.on('data', function(chunk) {

comScoreResponse.on('end', function() {
console.log(json);
json = JSON.parse(json);

@@ -60,0 +60,0 @@ if (typeof json.ERROR !== 'undefined') {

@@ -30,3 +30,5 @@ 'use strict';

startdate: 20141001,
parameters: 'page:*'
parameters: {
page: '*'
}
};

@@ -78,3 +80,5 @@ mock.comscoreReport(params, 200, fixtures.report('valid'));

startdate: 20141001,
parameters: 'page:*'
parameters: {
page: '*'
}
};

@@ -81,0 +85,0 @@ var expectedData = [{

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