tweetstream 2.5.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of tweetstream might be problematic. Click here for more details.

@@ -10,7 +10,7 @@ describe TweetStream::Client do
10
10
  end
11
11
  @client = TweetStream::Client.new
12
12
 
13
- @stream = stub("EM::Twitter::Client",
13
+ @stream = double("EM::Twitter::Client",
14
14
  :connect => true,
15
15
  :unbind => true,
16
16
  :each => true,
@@ -22,45 +22,45 @@ describe TweetStream::Client do
22
22
  :on_unauthorized => true,
23
23
  :on_enhance_your_calm => true
24
24
  )
25
- EM.stub!(:run).and_yield
26
- EM::Twitter::Client.stub!(:connect).and_return(@stream)
25
+ allow(EM).to receive(:run).and_yield
26
+ allow(EM::Twitter::Client).to receive(:connect).and_return(@stream)
27
27
  end
28
28
 
29
29
  describe "User Stream support" do
30
30
  context "when calling #userstream" do
31
31
  it "sends the userstream host" do
32
- EM::Twitter::Client.should_receive(:connect).with(hash_including(:host => "userstream.twitter.com")).and_return(@stream)
32
+ expect(EM::Twitter::Client).to receive(:connect).with(hash_including(:host => "userstream.twitter.com")).and_return(@stream)
33
33
  @client.userstream
34
34
  end
35
35
 
36
36
  it "uses the userstream uri" do
37
- @client.should_receive(:start).once.with("/1.1/user.json", an_instance_of(Hash)).and_return(@stream)
37
+ expect(@client).to receive(:start).once.with("/1.1/user.json", an_instance_of(Hash)).and_return(@stream)
38
38
  @client.userstream
39
39
  end
40
40
 
41
41
  it "supports :replies => 'all'" do
42
- @client.should_receive(:start).once.with("/1.1/user.json", hash_including(:replies => 'all')).and_return(@stream)
42
+ expect(@client).to receive(:start).once.with("/1.1/user.json", hash_including(:replies => 'all')).and_return(@stream)
43
43
  @client.userstream(:replies => 'all')
44
44
  end
45
45
 
46
46
  it "supports :stall_warnings => 'true'" do
47
- @client.should_receive(:start).once.with("/1.1/user.json", hash_including(:stall_warnings => 'true')).and_return(@stream)
47
+ expect(@client).to receive(:start).once.with("/1.1/user.json", hash_including(:stall_warnings => 'true')).and_return(@stream)
48
48
  @client.userstream(:stall_warnings => 'true')
49
49
  end
50
50
 
51
51
  it "supports :with => 'followings'" do
52
- @client.should_receive(:start).once.with("/1.1/user.json", hash_including(:with => 'followings')).and_return(@stream)
52
+ expect(@client).to receive(:start).once.with("/1.1/user.json", hash_including(:with => 'followings')).and_return(@stream)
53
53
  @client.userstream(:with => 'followings')
54
54
  end
55
55
 
56
56
  it "supports :with => 'user'" do
57
- @client.should_receive(:start).once.with("/1.1/user.json", hash_including(:with => 'user')).and_return(@stream)
57
+ expect(@client).to receive(:start).once.with("/1.1/user.json", hash_including(:with => 'user')).and_return(@stream)
58
58
  @client.userstream(:with => 'user')
59
59
  end
60
60
 
61
61
  it "supports event callbacks" do
62
62
  event = nil
63
- @stream.should_receive(:each).and_yield(fixture('favorite.json'))
63
+ expect(@stream).to receive(:each).and_yield(fixture('favorite.json'))
64
64
  @client.on_event(:favorite) do |e|
65
65
  event = e
66
66
  end.userstream
@@ -22,7 +22,7 @@ describe TweetStream::Daemon do
22
22
  describe "#start" do
23
23
  it "starts the daemon" do
24
24
  client = TweetStream::Daemon.new
25
- Daemons.should_receive(:run_proc).once
25
+ expect(Daemons).to receive(:run_proc).once
26
26
  client.track('intridea')
27
27
  end
28
28
  end
@@ -1,16 +1,16 @@
1
1
  require 'helper'
2
2
 
3
3
  describe TweetStream::SiteStreamClient do
4
- before do
5
- @keys = TweetStream::Configuration::OAUTH_OPTIONS_KEYS
6
- end
4
+ let(:keys) { TweetStream::Configuration::OAUTH_OPTIONS_KEYS }
5
+ let(:config_uri) { '/2b/site/c/1_1_54e345d655ee3e8df359ac033648530bfbe26c5g' }
6
+ let(:client) { TweetStream::SiteStreamClient.new(config_uri) }
7
7
 
8
8
  describe "initialization" do
9
9
  context "with module configuration" do
10
10
 
11
11
  before do
12
12
  TweetStream.configure do |config|
13
- @keys.each do |key|
13
+ keys.each do |key|
14
14
  config.send("#{key}=", key)
15
15
  end
16
16
  end
@@ -22,15 +22,15 @@ describe TweetStream::SiteStreamClient do
22
22
 
23
23
  it "inherits module configuration" do
24
24
  api = TweetStream::SiteStreamClient.new('/config_uri')
25
- @keys.each do |key|
25
+ keys.each do |key|
26
26
  expect(api.send(key)).to eq(key)
27
27
  end
28
28
  end
29
29
  end
30
30
 
31
31
  context "with class configuration" do
32
- before do
33
- @configuration = {
32
+ let(:configuration) do
33
+ {
34
34
  :consumer_key => 'CK',
35
35
  :consumer_secret => 'CS',
36
36
  :oauth_token => 'AT',
@@ -40,9 +40,9 @@ describe TweetStream::SiteStreamClient do
40
40
 
41
41
  context "during initialization" do
42
42
  it "overrides module configuration" do
43
- api = TweetStream::SiteStreamClient.new('/config_uri', @configuration)
44
- @keys.each do |key|
45
- expect(api.send(key)).to eq(@configuration[key])
43
+ api = TweetStream::SiteStreamClient.new('/config_uri', configuration)
44
+ keys.each do |key|
45
+ expect(api.send(key)).to eq(configuration[key])
46
46
  end
47
47
  end
48
48
  end
@@ -50,11 +50,11 @@ describe TweetStream::SiteStreamClient do
50
50
  context "after initilization" do
51
51
  it "overrides module configuration after initialization" do
52
52
  api = TweetStream::SiteStreamClient.new('/config_uri')
53
- @configuration.each do |key, value|
53
+ configuration.each do |key, value|
54
54
  api.send("#{key}=", value)
55
55
  end
56
- @keys.each do |key|
57
- expect(api.send(key)).to eq(@configuration[key])
56
+ keys.each do |key|
57
+ expect(api.send(key)).to eq(configuration[key])
58
58
  end
59
59
  end
60
60
  end
@@ -63,24 +63,21 @@ describe TweetStream::SiteStreamClient do
63
63
 
64
64
  describe "#on_error" do
65
65
  it "stores the on_error proc" do
66
- @client = TweetStream::SiteStreamClient.new('/config_uri')
67
- @client.on_error { puts 'hi' }
68
- expect(@client.on_error).to be_kind_of(Proc)
66
+ client = TweetStream::SiteStreamClient.new('/config_uri')
67
+ client.on_error { puts 'hi' }
68
+ expect(client.on_error).to be_kind_of(Proc)
69
69
  end
70
70
  end
71
71
 
72
72
  describe "#info" do
73
73
  context "success" do
74
74
  it "returns the information hash" do
75
- @config_uri = '/2b/site/c/1_1_54e345d655ee3e8df359ac033648530bfbe26c5f'
76
- @client = TweetStream::SiteStreamClient.new(@config_uri)
77
-
78
- stub_request(:get, "https://sitestream.twitter.com#{@config_uri}/info.json").
75
+ stub_request(:get, "https://sitestream.twitter.com#{config_uri}/info.json").
79
76
  to_return(:status => 200, :body => fixture('info.json'), :headers => {})
80
77
  stream_info = nil
81
78
 
82
79
  EM.run_block do
83
- @client.info { |info| stream_info = info}
80
+ client.info { |info| stream_info = info}
84
81
  end
85
82
  expect(stream_info).to be_kind_of(Hash)
86
83
  end
@@ -88,16 +85,13 @@ describe TweetStream::SiteStreamClient do
88
85
 
89
86
  context "failure" do
90
87
  it "invokes the on_error callback" do
91
- @config_uri = '/2b/site/c/1_1_54e345d655ee3e8df359ac033648530bfbe26c5g'
92
- @client = TweetStream::SiteStreamClient.new(@config_uri)
93
-
94
- stub_request(:get, "https://sitestream.twitter.com#{@config_uri}/info.json").
88
+ stub_request(:get, "https://sitestream.twitter.com#{config_uri}/info.json").
95
89
  to_return(:status => 401, :body => '', :headers => {})
96
90
  called = false
97
91
 
98
92
  EM.run_block do
99
- @client.on_error { called = true }
100
- @client.info { |info| info }
93
+ client.on_error { called = true }
94
+ client.info { |info| info }
101
95
  end
102
96
  expect(called).to be_true
103
97
  end
@@ -108,15 +102,12 @@ describe TweetStream::SiteStreamClient do
108
102
  describe "#add_user" do
109
103
  context "success" do
110
104
  it "calls a block (if passed one)" do
111
- @config_uri = '/2b/site/c/1_1_54e345d655ee3e8df359ac033648530bfbe26c5f'
112
- @client = TweetStream::SiteStreamClient.new(@config_uri)
113
-
114
- stub_request(:post, "https://sitestream.twitter.com#{@config_uri}/add_user.json").
105
+ stub_request(:post, "https://sitestream.twitter.com#{config_uri}/add_user.json").
115
106
  to_return(:status => 200, :body => '', :headers => {})
116
107
  called = false
117
108
 
118
109
  EM.run_block do
119
- @client.add_user(12345) { called = true }
110
+ client.add_user(12345) { called = true }
120
111
  end
121
112
  expect(called).to be_true
122
113
  end
@@ -124,44 +115,56 @@ describe TweetStream::SiteStreamClient do
124
115
 
125
116
  context "failure" do
126
117
  it "invokes the on_error callback" do
127
- @config_uri = '/2b/site/c/1_1_54e345d655ee3e8df359ac033648530bfbe26c5g'
128
- @client = TweetStream::SiteStreamClient.new(@config_uri)
129
-
130
- stub_request(:post, "https://sitestream.twitter.com#{@config_uri}/add_user.json").
118
+ stub_request(:post, "https://sitestream.twitter.com#{config_uri}/add_user.json").
131
119
  to_return(:status => 401, :body => '', :headers => {})
132
120
  called = false
133
121
 
134
122
  EM.run_block do
135
- @client.on_error { called = true }
136
- @client.add_user(12345) { |info| info }
123
+ client.on_error { called = true }
124
+ client.add_user(12345) { |info| info }
137
125
  end
138
126
  expect(called).to be_true
139
127
  end
140
128
  end
141
129
 
142
130
  it "accepts an array of user_ids" do
143
- @client = TweetStream::SiteStreamClient.new('/config_uri')
144
- conn = stub('Connection')
145
- conn.should_receive(:post).
146
- with(:path => '/config_uri/add_user.json', :body => { 'user_id' => '1234,5678' }).
131
+ conn = double('Connection')
132
+ expect(conn).to receive(:post).
133
+ with(:path => "#{config_uri}/add_user.json", :body => { 'user_id' => '1234,5678' }).
147
134
  and_return(FakeHttp.new)
148
- @client.stub(:connection) { conn }
149
- @client.add_user(['1234','5678'])
135
+ allow(client).to receive(:connection) { conn }
136
+ client.add_user(['1234','5678'])
137
+ end
138
+
139
+ describe "accepts a single user_id as" do
140
+ before :each do
141
+ conn = double('Connection')
142
+ expect(conn).to receive(:post).
143
+ with(:path => "#{config_uri}/add_user.json", :body => { 'user_id' => '1234' }).
144
+ and_return(FakeHttp.new)
145
+ allow(client).to receive(:connection) { conn }
146
+ end
147
+
148
+ it "a string" do
149
+ client.add_user('1234')
150
+ end
151
+
152
+ it "an integer" do
153
+ client.add_user(1234)
154
+ end
150
155
  end
156
+
151
157
  end
152
158
 
153
159
  describe "#remove_user" do
154
160
  context "success" do
155
161
  it "calls a block (if passed one)" do
156
- @config_uri = '/2b/site/c/1_1_54e345d655ee3e8df359ac033648530bfbe26c5f'
157
- @client = TweetStream::SiteStreamClient.new(@config_uri)
158
-
159
- stub_request(:post, "https://sitestream.twitter.com#{@config_uri}/remove_user.json").
162
+ stub_request(:post, "https://sitestream.twitter.com#{config_uri}/remove_user.json").
160
163
  to_return(:status => 200, :body => '', :headers => {})
161
164
  called = false
162
165
 
163
166
  EM.run_block do
164
- @client.remove_user(12345) { called = true }
167
+ client.remove_user(12345) { called = true }
165
168
  end
166
169
  expect(called).to be_true
167
170
  end
@@ -169,44 +172,55 @@ describe TweetStream::SiteStreamClient do
169
172
 
170
173
  context "failure" do
171
174
  it "invokes the on_error callback" do
172
- @config_uri = '/2b/site/c/1_1_54e345d655ee3e8df359ac033648530bfbe26c5g'
173
- @client = TweetStream::SiteStreamClient.new(@config_uri)
174
-
175
- stub_request(:post, "https://sitestream.twitter.com#{@config_uri}/remove_user.json").
175
+ stub_request(:post, "https://sitestream.twitter.com#{config_uri}/remove_user.json").
176
176
  to_return(:status => 401, :body => '', :headers => {})
177
177
  called = false
178
178
 
179
179
  EM.run_block do
180
- @client.on_error { called = true }
181
- @client.remove_user(12345) { |info| info }
180
+ client.on_error { called = true }
181
+ client.remove_user(12345) { |info| info }
182
182
  end
183
183
  expect(called).to be_true
184
184
  end
185
185
  end
186
186
 
187
187
  it "accepts an array of user_ids" do
188
- @client = TweetStream::SiteStreamClient.new('/config_uri')
189
- conn = stub('Connection')
190
- conn.should_receive(:post).
191
- with(:path => '/config_uri/remove_user.json', :body => { 'user_id' => '1234,5678' }).
188
+ conn = double('Connection')
189
+ expect(conn).to receive(:post).
190
+ with(:path => "#{config_uri}/remove_user.json", :body => { 'user_id' => '1234,5678' }).
192
191
  and_return(FakeHttp.new)
193
- @client.stub(:connection) { conn }
194
- @client.remove_user(['1234','5678'])
192
+ allow(client).to receive(:connection) { conn }
193
+ client.remove_user(['1234','5678'])
194
+ end
195
+
196
+ describe "accepts a single user_id as" do
197
+ before :each do
198
+ conn = double('Connection')
199
+ expect(conn).to receive(:post).
200
+ with(:path => "#{config_uri}/remove_user.json", :body => { 'user_id' => '1234' }).
201
+ and_return(FakeHttp.new)
202
+ allow(client).to receive(:connection) { conn }
203
+ end
204
+
205
+ it "a string" do
206
+ client.remove_user('1234')
207
+ end
208
+
209
+ it "an integer" do
210
+ client.remove_user(1234)
211
+ end
195
212
  end
196
213
  end
197
214
 
198
215
  describe "#friends_ids" do
199
216
  context "success" do
200
217
  it "returns the information hash" do
201
- @config_uri = '/2b/site/c/1_1_54e345d655ee3e8df359ac033648530bfbe26c5f'
202
- @client = TweetStream::SiteStreamClient.new(@config_uri)
203
-
204
- stub_request(:post, "https://sitestream.twitter.com#{@config_uri}/friends/ids.json").
218
+ stub_request(:post, "https://sitestream.twitter.com#{config_uri}/friends/ids.json").
205
219
  to_return(:status => 200, :body => fixture('ids.json'), :headers => {})
206
220
  stream_info = nil
207
221
 
208
222
  EM.run_block do
209
- @client.friends_ids(12345) { |info| stream_info = info }
223
+ client.friends_ids(12345) { |info| stream_info = info }
210
224
  end
211
225
  expect(stream_info).to be_kind_of(Hash)
212
226
  end
@@ -214,16 +228,13 @@ describe TweetStream::SiteStreamClient do
214
228
 
215
229
  context "failure" do
216
230
  it "invokes the on_error callback" do
217
- @config_uri = '/2b/site/c/1_1_54e345d655ee3e8df359ac033648530bfbe26c5g'
218
- @client = TweetStream::SiteStreamClient.new(@config_uri)
219
-
220
- stub_request(:post, "https://sitestream.twitter.com#{@config_uri}/friends/ids.json").
231
+ stub_request(:post, "https://sitestream.twitter.com#{config_uri}/friends/ids.json").
221
232
  to_return(:status => 401, :body => '', :headers => {})
222
233
  called = false
223
234
 
224
235
  EM.run_block do
225
- @client.on_error { called = true }
226
- @client.friends_ids(12345) { |info| info }
236
+ client.on_error { called = true }
237
+ client.friends_ids(12345) { |info| info }
227
238
  end
228
239
  expect(called).to be_true
229
240
  end
@@ -4,7 +4,7 @@ describe TweetStream do
4
4
 
5
5
  context "when delegating to a client" do
6
6
  before do
7
- @stream = stub("EM::Twitter::Client",
7
+ @stream = double("EM::Twitter::Client",
8
8
  :connect => true,
9
9
  :unbind => true,
10
10
  :each_item => true,
@@ -16,13 +16,13 @@ describe TweetStream do
16
16
  :on_unauthorized => true,
17
17
  :on_enhance_your_calm => true
18
18
  )
19
- EM.stub!(:run).and_yield
20
- EM::Twitter::Client.stub!(:connect).and_return(@stream)
19
+ allow(EM).to receive(:run).and_yield
20
+ allow(EM::Twitter::Client).to receive(:connect).and_return(@stream)
21
21
  end
22
22
 
23
23
  it "returns the same results as a client" do
24
- Yajl::Parser.should_receive(:parse).twice.and_return({})
25
- @stream.should_receive(:each).and_yield(sample_tweets[0].to_json)
24
+ expect(MultiJson).to receive(:decode).and_return({})
25
+ expect(@stream).to receive(:each).and_yield(sample_tweets[0].to_json)
26
26
  TweetStream.track('abc','def')
27
27
  end
28
28
  end
@@ -11,14 +11,14 @@ Gem::Specification.new do |spec|
11
11
  spec.email = ['michael@intridea.com', 'steve.agalloco@gmail.com']
12
12
  spec.description = %q{TweetStream is a simple wrapper for consuming the Twitter Streaming API.}
13
13
  spec.summary = spec.description
14
- spec.homepage = 'http://github.com/intridea/tweetstream'
14
+ spec.homepage = 'https://github.com/tweetstream/tweetstream'
15
15
  spec.licenses = ['MIT']
16
16
 
17
17
  spec.add_dependency 'daemons', '~> 1.1'
18
- spec.add_dependency 'em-twitter', '~> 0.2'
19
- spec.add_dependency 'em-http-request', '~> 1.0.2'
20
- spec.add_dependency 'twitter', '~> 4.5'
21
- spec.add_dependency 'yajl-ruby', '~> 1.1'
18
+ spec.add_dependency 'em-http-request', '>= 1.1.1'
19
+ spec.add_dependency 'em-twitter', '~> 0.3'
20
+ spec.add_dependency 'twitter', '~> 4.8'
21
+ spec.add_dependency 'multi_json', '~> 1.3'
22
22
  spec.add_development_dependency 'bundler', '~> 1.0'
23
23
 
24
24
  spec.files = %w(.yardopts CHANGELOG.md CONTRIBUTING.md LICENSE.md README.md Rakefile tweetstream.gemspec)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tweetstream
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bleigh
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-24 00:00:00.000000000 Z
12
+ date: 2013-11-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: daemons
@@ -26,61 +26,61 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.1'
28
28
  - !ruby/object:Gem::Dependency
29
- name: em-twitter
29
+ name: em-http-request
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - '>='
33
33
  - !ruby/object:Gem::Version
34
- version: '0.2'
34
+ version: 1.1.1
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - '>='
40
40
  - !ruby/object:Gem::Version
41
- version: '0.2'
41
+ version: 1.1.1
42
42
  - !ruby/object:Gem::Dependency
43
- name: em-http-request
43
+ name: em-twitter
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - ~>
47
47
  - !ruby/object:Gem::Version
48
- version: 1.0.2
48
+ version: '0.3'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ~>
54
54
  - !ruby/object:Gem::Version
55
- version: 1.0.2
55
+ version: '0.3'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: twitter
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - ~>
61
61
  - !ruby/object:Gem::Version
62
- version: '4.5'
62
+ version: '4.8'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: '4.5'
69
+ version: '4.8'
70
70
  - !ruby/object:Gem::Dependency
71
- name: yajl-ruby
71
+ name: multi_json
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ~>
75
75
  - !ruby/object:Gem::Version
76
- version: '1.1'
76
+ version: '1.3'
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - ~>
82
82
  - !ruby/object:Gem::Version
83
- version: '1.1'
83
+ version: '1.3'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: bundler
86
86
  requirement: !ruby/object:Gem::Requirement
@@ -110,10 +110,15 @@ files:
110
110
  - README.md
111
111
  - Rakefile
112
112
  - tweetstream.gemspec
113
+ - lib/tweetstream/arguments.rb
114
+ - lib/tweetstream/callback.rb
113
115
  - lib/tweetstream/client.rb
114
116
  - lib/tweetstream/configuration.rb
115
117
  - lib/tweetstream/daemon.rb
118
+ - lib/tweetstream/middleware/builder.rb
119
+ - lib/tweetstream/middleware/runner.rb
116
120
  - lib/tweetstream/site_stream_client.rb
121
+ - lib/tweetstream/util/parameter.rb
117
122
  - lib/tweetstream/version.rb
118
123
  - lib/tweetstream.rb
119
124
  - spec/fixtures/delete.json
@@ -135,7 +140,7 @@ files:
135
140
  - spec/tweetstream/daemon_spec.rb
136
141
  - spec/tweetstream/site_stream_client_spec.rb
137
142
  - spec/tweetstream_spec.rb
138
- homepage: http://github.com/intridea/tweetstream
143
+ homepage: https://github.com/tweetstream/tweetstream
139
144
  licenses:
140
145
  - MIT
141
146
  metadata: {}
@@ -155,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
160
  version: '0'
156
161
  requirements: []
157
162
  rubyforge_project:
158
- rubygems_version: 2.0.0
163
+ rubygems_version: 2.0.3
159
164
  signing_key:
160
165
  specification_version: 4
161
166
  summary: TweetStream is a simple wrapper for consuming the Twitter Streaming API.