fetch-tweets
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -1,1 +0,1 @@ | ||
(function(){var t,e,n;n=require("request"),e=require("querystring"),t=function(){function t(t,e){this.credentials=t,this.shouldFormatResults=null!=e?e:!0,c=this.shouldFormatResults}var o,r,a,c;return c=null,r=function(t,e,o){var r;return r={callback:"/",consumer_key:e.consumer_key,consumer_secret:e.consumer_secret},n({url:t,json:!0,oauth:r},function(t,e,n){return t||200!==e.statusCode?void 0:o(n)})},o=function(t){var e,n,o,r,u;if(!c)return t;for(u=[],r=t.statuses,e=0,n=r.length;n>e;e++)o=r[e],u.push({date:o.created_at,body:o.text,location:a(o),"retweet-count":o.retweet_count,"favorited-count":o.favorite_count,lang:o.lang});return u},a=function(t){var e;return e={place_name:"_",location:{lat:0,lng:0}},null!=t.coordinates?(e.location.lat=t.coordinates.coordinates[1],e.location.lng=t.coordinates.coordinates[0]):null!=t.geo&&(e.location.lat=t.geo.coordinates[0],e.location.lng=t.geo.coordinates[1]),null!=t.place?e.place_name=t.place.name:null!=t.user&&(e.place_name=t.user.location),e},t.prototype.byTopic=function(t,n){var a,c;return null==t&&(t=""),"string"==typeof t?c="q="+t+"&count=100":"object"==typeof t&&(c=e.stringify(t)),a="https://api.twitter.com/1.1/search/tweets.json?"+c,r(a,this.credentials,function(t){return n(o(t))})},t}(),module.exports=t}).call(this); | ||
(function(){var t,e,n;n=require("request"),e=require("querystring"),t=function(){function t(t,e){this.credentials=t,this.shouldFormatResults=null!=e?e:!0,c=this.shouldFormatResults}var o,r,u,a,c;return c=null,u=function(t,e,o){var r;return r={callback:"/",consumer_key:e.consumer_key,consumer_secret:e.consumer_secret},n({url:t,json:!0,oauth:r},function(t,e,n){return t||200!==e.statusCode?void 0:o(n)})},o=function(t){var e,n,o,r,u;if(!c)return t;for(u=[],r=t.statuses,e=0,n=r.length;n>e;e++)o=r[e],u.push({date:o.created_at,body:o.text,location:a(o),"retweet-count":o.retweet_count,"favorited-count":o.favorite_count,lang:o.lang});return u},a=function(t){var e;return e={place_name:"_",location:{lat:0,lng:0}},null!=t.coordinates?(e.location.lat=t.coordinates.coordinates[1],e.location.lng=t.coordinates.coordinates[0]):null!=t.geo&&(e.location.lat=t.geo.coordinates[0],e.location.lng=t.geo.coordinates[1]),null!=t.place?e.place_name=t.place.name:null!=t.user&&(e.place_name=t.user.location),e},r=function(t){var e,n,o,r,u;for(u=[],r=t[0].trends,e=0,o=r.length;o>e;e++)n=r[e],u.push({trend:n.name,volume:n.tweet_volume});return u},t.prototype.byTopic=function(t,n){var r,a;return null==t&&(t=""),"string"==typeof t?a="q="+t+"&count=100":"object"==typeof t&&(a=e.stringify(t)),r="https://api.twitter.com/1.1/search/tweets.json?"+a,u(r,this.credentials,function(t){return n(o(t))})},t.prototype.trending=function(t,e){var n;return n="https://api.twitter.com/1.1/trends/place.json?id="+t,u(n,this.credentials,function(t){return e(r(t))})},t}(),module.exports=t}).call(this); |
{ | ||
"name": "fetch-tweets", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "A node module that fetches tweets from Twitter based on topic, location, timeframe or combination", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
27434