Comparing version 0.2.31 to 0.2.32
@@ -66,3 +66,3 @@ var stream = require('stream') | ||
this.subscribe( data, function(err,res){ | ||
console.log('++++++++ instagram',res.body); | ||
// console.log('++++++++ instagram',res.body); | ||
}); | ||
@@ -79,3 +79,3 @@ } | ||
this.unsubscribe( request.tags[i].toString().replace('#',''), function(err,res){ | ||
console.log('++++++++ instagram',res.headers); | ||
// console.log('++++++++ instagram',res.headers); | ||
}); | ||
@@ -150,29 +150,35 @@ } | ||
}, function(){ | ||
console.log('unsubscribe instagram', type, arguments) | ||
// console.log('unsubscribe instagram', type, arguments) | ||
}); | ||
break; | ||
default: | ||
var self = this; | ||
this.subscriptions( function(err,res){ | ||
if( type&&type.length){ | ||
data = res.body.data; | ||
data = data instanceof Array ? data : [data]; | ||
type = type instanceof Array ? type : [type]; | ||
var self = this; | ||
this.subscriptions( function(err,res){ | ||
console.log('unsubscribing tags', type,data); | ||
data = res.body.data; | ||
data = data instanceof Array ? data : [data]; | ||
type = type instanceof Array ? type : [type]; | ||
for(var i in data) { | ||
d = data[ i]; | ||
if( type.indexOf(d.object_id) !== -1 ){ | ||
self._apiRequest( 'subscriptions', 'DELETE', { | ||
client_id: self.clientId, | ||
client_secret: self.clientSecret, | ||
id: d.id | ||
}, function(err,res){ | ||
console.log('unsubscribe instagram', err, d.object_id, res.body); | ||
}); | ||
} | ||
}; | ||
}); | ||
console.log('unsubscribing tags', type,data); | ||
for(var i in data) { | ||
d = data[ i]; | ||
if( d && type.indexOf(d.object_id) !== -1 ){ | ||
self._apiRequest( 'subscriptions', 'DELETE', { | ||
client_id: self.clientId, | ||
client_secret: self.clientSecret, | ||
id: d.id | ||
}, function(err,res){ | ||
// console.log('unsubscribe instagram', err, d.object_id, res.body); | ||
}); | ||
} | ||
}; | ||
}); | ||
} | ||
// else{ | ||
// console.log('nothing to unsubscribe instagram', type); | ||
// } | ||
break; | ||
@@ -179,0 +185,0 @@ } |
{ | ||
"name": "socializr", | ||
"version": "0.2.31", | ||
"version": "0.2.32", | ||
"description": "Read data streams from several social networks.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
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
53700
1918