Commit 160cea0dc259022cc8c4011f12384065a79a534c
1 parent
69f6e593
Exists in
staging
and in
4 other branches
checking problem related to git and binary files
Showing
18 changed files
with
100 additions
and
0 deletions
Show diff stats
plugins/community_hub/twitter-stream-listener/.bundle/install.log
0 → 100644
... | ... | @@ -0,0 +1,24 @@ |
1 | +# Logfile created on Tue Apr 01 15:04:11 -0300 2014 by logger.rb/1.2.6 | |
2 | +I, [2014-04-01T15:04:11.169252 #3872] INFO -- : 0: addressable (2.3.6) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/addressable-2.3.6.gemspec | |
3 | +I, [2014-04-01T15:04:15.337466 #3872] INFO -- : 0: atomic (1.1.16) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/atomic-1.1.16.gemspec | |
4 | +I, [2014-04-01T15:04:16.238529 #3872] INFO -- : 0: buftok (0.2.0) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/buftok-0.2.0.gemspec | |
5 | +I, [2014-04-01T15:04:17.506979 #3872] INFO -- : 0: cookiejar (0.3.2) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/cookiejar-0.3.2.gemspec | |
6 | +I, [2014-04-01T15:04:19.059662 #3872] INFO -- : 0: daemons (1.1.9) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/daemons-1.1.9.gemspec | |
7 | +I, [2014-04-01T15:04:32.866846 #3872] INFO -- : 0: eventmachine (1.0.3) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/eventmachine-1.0.3.gemspec | |
8 | +I, [2014-04-01T15:04:34.487840 #3872] INFO -- : 0: em-socksify (0.3.0) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/em-socksify-0.3.0.gemspec | |
9 | +I, [2014-04-01T15:04:37.910469 #3872] INFO -- : 0: http_parser.rb (0.6.0) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/http_parser.rb-0.6.0.gemspec | |
10 | +I, [2014-04-01T15:04:40.571077 #3872] INFO -- : 0: em-http-request (1.1.2) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/em-http-request-1.1.2.gemspec | |
11 | +I, [2014-04-01T15:04:41.537112 #3872] INFO -- : 0: simple_oauth (0.2.0) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/simple_oauth-0.2.0.gemspec | |
12 | +I, [2014-04-01T15:04:42.889153 #3872] INFO -- : 0: em-twitter (0.3.3) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/em-twitter-0.3.3.gemspec | |
13 | +I, [2014-04-01T15:04:43.925324 #3872] INFO -- : 0: equalizer (0.0.9) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/equalizer-0.0.9.gemspec | |
14 | +I, [2014-04-01T15:04:44.873338 #3872] INFO -- : 0: multipart-post (2.0.0) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/multipart-post-2.0.0.gemspec | |
15 | +I, [2014-04-01T15:04:47.163595 #3872] INFO -- : 0: faraday (0.9.0) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/faraday-0.9.0.gemspec | |
16 | +I, [2014-04-01T15:04:48.595897 #3872] INFO -- : 0: http (0.5.0) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/http-0.5.0.gemspec | |
17 | +I, [2014-04-01T15:04:48.596578 #3872] INFO -- : 0: json (1.8.1) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/json-1.8.1.gemspec | |
18 | +I, [2014-04-01T15:04:51.014435 #3872] INFO -- : 0: thread_safe (0.3.1) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/thread_safe-0.3.1.gemspec | |
19 | +I, [2014-04-01T15:04:52.128708 #3872] INFO -- : 0: memoizable (0.4.2) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/memoizable-0.4.2.gemspec | |
20 | +I, [2014-04-01T15:04:53.218012 #3872] INFO -- : 0: multi_json (1.9.2) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/multi_json-1.9.2.gemspec | |
21 | +I, [2014-04-01T15:04:54.541761 #3872] INFO -- : 0: naught (1.0.0) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/naught-1.0.0.gemspec | |
22 | +I, [2014-04-01T15:04:57.832182 #3872] INFO -- : 0: twitter (5.8.0) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/twitter-5.8.0.gemspec | |
23 | +I, [2014-04-01T15:04:59.365999 #3872] INFO -- : 0: tweetstream (2.6.1) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374/specifications/tweetstream-2.6.1.gemspec | |
24 | +I, [2014-04-01T15:04:59.366614 #3872] INFO -- : 0: bundler (1.5.1) from /home/80129498572/.rvm/gems/ruby-1.8.7-p374@global/specifications/bundler-1.5.1.gemspec | ... | ... |
plugins/community_hub/twitter-stream-listener/Gemfile.lock
0 → 100644
... | ... | @@ -0,0 +1,37 @@ |
1 | +GEM | |
2 | + remote: http://rubygems.org/ | |
3 | + specs: | |
4 | + addressable (2.3.6) | |
5 | + atomic (1.1.16) | |
6 | + buftok (0.2.0) | |
7 | + equalizer (0.0.9) | |
8 | + faraday (0.9.0) | |
9 | + multipart-post (>= 1.2, < 3) | |
10 | + http (0.5.0) | |
11 | + http_parser.rb | |
12 | + http_parser.rb (0.6.0) | |
13 | + json (1.8.1) | |
14 | + memoizable (0.4.2) | |
15 | + thread_safe (~> 0.3, >= 0.3.1) | |
16 | + multipart-post (2.0.0) | |
17 | + naught (1.0.0) | |
18 | + simple_oauth (0.2.0) | |
19 | + thread_safe (0.3.1) | |
20 | + atomic (>= 1.1.7, < 2) | |
21 | + twitter (5.8.0) | |
22 | + addressable (~> 2.3) | |
23 | + buftok (~> 0.2.0) | |
24 | + equalizer (~> 0.0.9) | |
25 | + faraday (~> 0.9.0) | |
26 | + http (~> 0.5.0) | |
27 | + http_parser.rb (~> 0.6.0) | |
28 | + json (~> 1.8) | |
29 | + memoizable (~> 0.4.0) | |
30 | + naught (~> 1.0) | |
31 | + simple_oauth (~> 0.2.0) | |
32 | + | |
33 | +PLATFORMS | |
34 | + ruby | |
35 | + | |
36 | +DEPENDENCIES | |
37 | ... | ... |
... | ... | @@ -0,0 +1,36 @@ |
1 | + | |
2 | +require 'twitter' | |
3 | +require 'json' | |
4 | + | |
5 | +#client = Twitter::REST::Client.new do |config| | |
6 | + | |
7 | + | |
8 | +client = Twitter::Streaming::Client.new do |config| | |
9 | + config.consumer_key = ENV['TWITTER_CONSUMER_KEY'] | |
10 | + config.consumer_secret = ENV['TWITTER_CONSUMER_SECRET'] | |
11 | + config.oauth_token = ENV['TWITTER_OAUTH_TOKEN'] | |
12 | + config.oauth_token_secret = ENV['TWITTER_OAUTH_TOKEN_SECRET'] | |
13 | +end | |
14 | + | |
15 | +topics = ["#nba"] | |
16 | + | |
17 | +client.filter(:track => topics.join(",")) do |object| | |
18 | + puts object.to_h.to_json if object.is_a?(Twitter::Tweet) | |
19 | +end | |
20 | + | |
21 | + | |
22 | + | |
23 | ||
24 | + | |
25 | +#feed do participa | |
26 | +# precisa do access_token da comunidade participa.br | |
27 | +# com acesso a read_stream | |
28 | +# acessar https://developers.facebook.com/tools/explorer/ e Clicar no botão "Obter token de acesso" | |
29 | +# selecionar na aba Extended Permissions "read_stream" | |
30 | +#https://graph.facebook.com/me/feed?method=GET&format=json&suppress_http_code=1&access_token=ACCESS_TOKEN | |
31 | + | |
32 | +# imagem do usuário que postou: | |
33 | +# http://graph.facebook.com/517267866/picture?type=small | |
34 | +# http://graph.facebook.com/517267866/picture?type=normal | |
35 | +# http://graph.facebook.com/517267866/picture?type=large | |
36 | +# http://graph.facebook.com/517267866/picture?type=square | ... | ... |
plugins/community_hub/twitter-stream-listener/vendor/cache/addressable-2.3.6.gem
0 → 100644
No preview for this file type
plugins/community_hub/twitter-stream-listener/vendor/cache/atomic-1.1.16.gem
0 → 100644
No preview for this file type
plugins/community_hub/twitter-stream-listener/vendor/cache/buftok-0.2.0.gem
0 → 100644
No preview for this file type
plugins/community_hub/twitter-stream-listener/vendor/cache/equalizer-0.0.9.gem
0 → 100644
No preview for this file type
plugins/community_hub/twitter-stream-listener/vendor/cache/faraday-0.9.0.gem
0 → 100644
No preview for this file type
plugins/community_hub/twitter-stream-listener/vendor/cache/http-0.5.0.gem
0 → 100644
No preview for this file type
plugins/community_hub/twitter-stream-listener/vendor/cache/http_parser.rb-0.6.0.gem
0 → 100644
No preview for this file type
plugins/community_hub/twitter-stream-listener/vendor/cache/json-1.8.1.gem
0 → 100644
No preview for this file type
plugins/community_hub/twitter-stream-listener/vendor/cache/memoizable-0.4.2.gem
0 → 100644
No preview for this file type
plugins/community_hub/twitter-stream-listener/vendor/cache/multipart-post-2.0.0.gem
0 → 100644
No preview for this file type
plugins/community_hub/twitter-stream-listener/vendor/cache/naught-1.0.0.gem
0 → 100644
No preview for this file type
plugins/community_hub/twitter-stream-listener/vendor/cache/simple_oauth-0.2.0.gem
0 → 100644
No preview for this file type
plugins/community_hub/twitter-stream-listener/vendor/cache/thread_safe-0.3.1.gem
0 → 100644
No preview for this file type
plugins/community_hub/twitter-stream-listener/vendor/cache/twitter-5.8.0.gem
0 → 100644
No preview for this file type