Comparing version 0.0.2 to 0.0.3
@@ -0,23 +1,29 @@ | ||
// example usage of klout-js - queries one existing and one missing klout profiles | ||
// call providing your Klout API key as argument | ||
// eg. node example.js 1234abc | ||
var klout = require('./klout-js.js')(process.argv[2]); | ||
klout.klout(['smurthasmith', 'jeremie'], function(err, data) { | ||
console.log('getKloutScore:', data); | ||
klout.klout(['smurthas', 'jeremie'], function(err, data) { | ||
console.log('getKloutScore:\n', JSON.stringify(data, true, 4)); | ||
console.log('.....................'); | ||
}); | ||
klout.show(['smurthasmith', 'jeremie'], function(err, data) { | ||
console.log('getKloutScore:', data); | ||
klout.show(['smurthas', 'jeremie'], function(err, data) { | ||
console.log('getKloutProfile:\n', JSON.stringify(data, true, 4)); | ||
console.log('.....................'); | ||
}); | ||
klout.topics(['smurthasmith', 'jeremie'], function(err, data) { | ||
console.log('getKloutScore:', data); | ||
klout.topics(['smurthas', 'jeremie'], function(err, data) { | ||
console.log('getKloutTopics:\n', JSON.stringify(data, true, 4)); | ||
console.log('.....................'); | ||
}); | ||
//these endpoints don't seem to work, if anyone can get them to work, please help!! | ||
/* | ||
klout.influencedBy(['smurthasmith', 'jeremie'], function(data) { | ||
console.log('getKloutScore:', data); | ||
klout.influencedBy(['smurthas', 'jeremie'], function(err, data) { | ||
console.log('getKloutInfluencers:\n', JSON.stringify(data, true, 4)); | ||
console.log('.....................'); | ||
}); | ||
klout.influencerOf(['smurthasmith', 'jeremie'], function(data) { | ||
console.log('getKloutScore:', data); | ||
});*/ | ||
klout.influencerOf(['smurthas', 'jeremie'], function(err, data) { | ||
console.log('getKloutInfluencees:\n', JSON.stringify(data, true, 4)); | ||
console.log('.....................'); | ||
}); |
@@ -9,3 +9,3 @@ var request = require('request'); | ||
function makeRequest(endpoint, usernames, callback) { | ||
request.get({uri:BASE + endpoint + '.json?key=' + client.API_KEY + '&users=' + usernames}, | ||
request.get({uri:BASE + endpoint + '.json?key=' + client.API_KEY + '&users=' + usernames, json:true}, | ||
function(err, resp, body) { | ||
@@ -15,3 +15,3 @@ if(err) | ||
else | ||
callback(null, JSON.parse(body)); | ||
callback(null, body); | ||
}); | ||
@@ -29,9 +29,8 @@ } | ||
}; | ||
//these endpoints don't seem to work, if anyone can get them to work, please help!! | ||
/* client.influencedBy = function (usernames, callback) { | ||
client.influencedBy = function (usernames, callback) { | ||
makeRequest('soi/influenced_by', usernames, callback); | ||
}; | ||
client.influencerOf = function (usernames, callback) { | ||
makeRequest('soi/influenced_of', usernames, callback); | ||
};*/ | ||
makeRequest('soi/influencer_of', usernames, callback); | ||
}; | ||
@@ -38,0 +37,0 @@ return client; |
@@ -5,3 +5,3 @@ { | ||
"main":"klout-js.js", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"author": "Simon Murtha-Smith <simon@murtha-smith.com>", | ||
@@ -15,4 +15,4 @@ "keywords": ["klout"], | ||
"dependencies": { | ||
"request" : "=1.9.5" | ||
"request" : ">=2.2.0" | ||
} | ||
} |
@@ -31,4 +31,2 @@ # klout-js | ||
Follow [@smurthasmith](http://twitter.com/smurthasmith) for updates! | ||
Also, the SOI endpoints don't seem to be working, anyone know why? | ||
Follow [@smurthasmith](http://twitter.com/smurthasmith) for updates! |
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
3572
53
0
31
1
+ Addedajv@6.12.6(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@1.0.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcore-util-is@1.0.2(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedpsl@1.15.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedverror@1.10.0(transitive)
Updatedrequest@>=2.2.0