Skip to content

Commit

Permalink
corrected soi examples syntax + added comments and stringifyed query …
Browse files Browse the repository at this point in the history
…result outputs
  • Loading branch information
mef committed Jan 19, 2012
1 parent 190cd9a commit 91faa36
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions example.js
Original file line number Diff line number Diff line change
@@ -1,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);
console.log('getKloutScore:', JSON.stringify(data));
console.log('.....................');
});

klout.show(['smurthasmith', 'jeremie'], function(err, data) {
console.log('getKloutScore:', data);
console.log('getKloutProfile:', JSON.stringify(data));
console.log('.....................');
});

klout.topics(['smurthasmith', 'jeremie'], function(err, data) {
console.log('getKloutScore:', data);
console.log('getKloutTopics:', JSON.stringify(data));
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(['smurthasmith', 'jeremie'], function(err, data) {
console.log('getKloutInfluencers:', JSON.stringify(data));
console.log('.....................');
});

klout.influencerOf(['smurthasmith', 'jeremie'], function(data) {
console.log('getKloutScore:', data);
});*/
klout.influencerOf(['smurthasmith', 'jeremie'], function(err, data) {
console.log('getKloutInfluencees:', JSON.stringify(data));
console.log('.....................');
});

0 comments on commit 91faa36

Please sign in to comment.