Commit 9bec365a authored by Joshua's avatar Joshua
Browse files

Allow passing custom API instance into stream listener.

parent f85201f4
......@@ -29,8 +29,8 @@ STREAM_VERSION = 1
class StreamListener(object):
def __init__(self):
self.api = API()
def __init__(self, api=None):
self.api = api or API()
def on_data(self, data):
"""Called when raw data is received from connection.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment