Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
tweepy
Commits
9bec365a
Commit
9bec365a
authored
Nov 29, 2009
by
Joshua
Browse files
Allow passing custom API instance into stream listener.
parent
f85201f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
tweepy/streaming.py
View file @
9bec365a
...
@@ -29,8 +29,8 @@ STREAM_VERSION = 1
...
@@ -29,8 +29,8 @@ STREAM_VERSION = 1
class
StreamListener
(
object
):
class
StreamListener
(
object
):
def
__init__
(
self
):
def
__init__
(
self
,
api
=
None
):
self
.
api
=
API
()
self
.
api
=
api
or
API
()
def
on_data
(
self
,
data
):
def
on_data
(
self
,
data
):
"""Called when raw data is received from connection.
"""Called when raw data is received from connection.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment