Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "twiser", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Twitter API via Chrome Browser", | ||
"main": "index.js", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"test": "mocha", | ||
"docs": "./node_modules/.bin/docco index.js" | ||
"docs": "./node_modules/.bin/docco-husky -name 'Twiser.js' lib/index.js lib/streaming.js" | ||
}, | ||
@@ -31,4 +31,5 @@ "repository": { | ||
"devDependencies": { | ||
"docco": "^0.7.0" | ||
"docco-husky-plus": "^0.4.5", | ||
"docco-ng": "^0.1.0" | ||
} | ||
} |
@@ -1,4 +0,5 @@ | ||
/* eslint no-space-before-semi:0, camelcase: 0 */ | ||
var Client = require('../index'); | ||
/* eslint no-space-before-semi:0, camelcase: 0, no-process-exit:0 */ | ||
var Client = require('../lib/index'); | ||
var path = require('path'); | ||
var fs = require('fs'); | ||
@@ -19,2 +20,10 @@ if (!process.env.TWITTER_USERNAME || !process.env.TWITTER_PASSWORD) { | ||
api | ||
.url('https://twitter.com/search?f=realtime&q=js&src=typd') | ||
.getTweets(function(err, tweets) { | ||
if (err) { | ||
throw err; | ||
} | ||
console.log('Got ' + tweets.length + ' tweets.'); | ||
}) | ||
.changeNotificationsSettings({ send_favorited_email: false }) | ||
@@ -63,1 +72,17 @@ .changeNotificationsSettings({ send_favorited_email: true }) | ||
; | ||
process.on('uncaughtException', function (err) { | ||
console.log(err); | ||
client.api.saveScreenshot('./exception.png') | ||
.source('body', function(err, res) { | ||
if (err) { | ||
console.log(err); | ||
} | ||
fs.writeFileSync('./exception.html', res.value); | ||
}) | ||
.call(function() { | ||
process.exit(1); | ||
}); | ||
}); |
@@ -1,3 +0,4 @@ | ||
/* eslint no-space-before-semi:0, camelcase: 0 */ | ||
var Client = require('../index'); | ||
/* eslint no-space-before-semi:0, camelcase: 0, no-process-exit: 0 */ | ||
var Client = require('../lib/index'); | ||
var fs = require('fs'); | ||
@@ -13,4 +14,5 @@ if (!process.env.TWITTER_USERNAME || !process.env.TWITTER_PASSWORD) { | ||
client.api.url('https://twitter.com/search?f=realtime&q=js&src=typd') | ||
.call(function() { client.stream(); }); | ||
client.stream('https://twitter.com/search?f=realtime&q=js&src=typd'); | ||
client.stream('https://twitter.com/search?f=realtime&q=php&src=typd'); | ||
client.stream('https://twitter.com/search?f=realtime&q=java&src=typd'); | ||
@@ -30,5 +32,21 @@ setTimeout(function() { | ||
setTimeout(function() { | ||
client.stopStream(); | ||
client.stopStreamingAll(); | ||
client.api.shutdown(); | ||
console.log('stopped'); | ||
}, 120000); | ||
process.on('uncaughtException', function (err) { | ||
console.log(err); | ||
client.api.saveScreenshot('./exception.png') | ||
.source('body', function(err, res) { | ||
if (err) { | ||
console.log(err); | ||
} | ||
fs.writeFileSync('./exception.html', res.value); | ||
}) | ||
.call(function() { | ||
process.exit(1); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
3115
315740
2
18
3
11
1