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

chirp-stream

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chirp-stream - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

5

example.js

@@ -21,2 +21,7 @@ var ChirpStream = require('./');

userstream.on('response', function(res) {
console.log('response');
console.log(res);
});
userstream.on('json', function(json) {

@@ -23,0 +28,0 @@ console.log('json');

34

index.js

@@ -1,4 +0,3 @@

var debug = require('debug')('chirp-stream');
var request = require('request');
var OAuth = require('oauth-1.0a');
var debug = require('debug')('chirp-stream');
var OAuth = require('oauth-request');

@@ -24,3 +23,4 @@ module.exports = ChirpStream;

this.oauth = OAuth({
consumer: this.consumer
consumer: this.consumer,
token: this.token
});

@@ -53,16 +53,18 @@ }

var readable;
var request_data = {
url: url,
method: method,
data: param
};
if(method === 'GET') {
readable = self.oauth.get({
url: url,
qs: param,
encoding: 'utf8'
});
} else {
readable = self.oauth.post({
url: url,
form: param,
encoding: 'utf8'
});
}
var readable = request({
url: request_data.url,
method: request_data.method,
qs: self.oauth.authorize(request_data, self.token),
encoding: 'utf8'
});
var incomplete_json = [];

@@ -69,0 +71,0 @@

{
"name": "chirp-stream",
"version": "1.0.0",
"version": "1.0.1",
"description": "twitter streaming apis in nodejs",

@@ -27,4 +27,3 @@ "main": "index.js",

"debug": "^0.8.1",
"oauth-1.0a": "^0.1.0",
"request": "^2.36.0"
"oauth-request": "0.0.1"
},

@@ -31,0 +30,0 @@ "devDependencies": {

@@ -59,5 +59,3 @@ chirp-stream [![Build Status](https://travis-ci.org/ddo/chirp-stream.svg)](https://travis-ci.org/ddo/chirp-stream)

var filterstream = twitter.stream('https://stream.twitter.com/1.1/statuses/filter.json', {
data: {
follow: 61260444 //me :)
}
follow: 61260444 //me :)
});

@@ -64,0 +62,0 @@ //listen to events...

@@ -65,4 +65,2 @@ var expect = require('chai').expect;

https://stream.twitter.com/1.1/statuses/filter.json
describe("invalid init", function() {

@@ -69,0 +67,0 @@ it("should throw error", function() {

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