Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of http://github.com/kompozer/twitter-node

  • Loading branch information...
commit a6844ed23b684936de3691c6f3fffa1710116d0d 2 parents 7c800ec + 58a234d
@technoweenie technoweenie authored
Showing with 12 additions and 5 deletions.
  1. +12 −5 lib/index.js
View
17 lib/index.js
@@ -4,6 +4,15 @@ var sys = require('sys'),
query = require('querystring'),
parser = require('./streaming_json_parser')
+// process.mixin is gone, a function for replacement
+function extend(a, b) {
+ var prop;
+ for (prop in Object.keys(b)) {
+ a[prop] = b[prop];
+ }
+ return a;
+}
+
// Creates a streaming connection with twitter, and pushes any incoming
// statuses to a tweet event.
//
@@ -40,8 +49,7 @@ var TwitterNode = exports.TwitterNode = function(options) {
this.parser = new parser.instance();
this.parser.addListener('object', this.processJSONObject(this))
if(options.headers) {
- // FIXME: process.mixin depreciating
- process.mixin(this.headers, options.headers)
+ extend(this.headers, options.headers)
}
}
@@ -87,9 +95,8 @@ TwitterNode.prototype.location = function(lng1, lat1, lng2, lat2) {
}
TwitterNode.prototype.stream = function() {
- // FIXME: process.mixin depreciating
var client = this.createClient(this.port, this.host),
- headers = process.mixin({}, this.headers),
+ headers = extend({}, this.headers),
twit = this,
request;
@@ -179,7 +186,7 @@ TwitterNode.prototype.requestUrl = function() {
// Returns URI encoded string: "?track=LOST"
TwitterNode.prototype.buildParams = function() {
var options = {}
- process.mixin(options, this.params)
+ extend(options, this.params)
if(this.trackKeywords.length > 0)
options.track = this.trackKeywords.join(",")
if(this.following.length > 0)

0 comments on commit a6844ed

Please sign in to comment.
Something went wrong with that request. Please try again.