From 9bec365a93dd0cd4e5f0dde26aa22dd917a33fa0 Mon Sep 17 00:00:00 2001 From: Joshua Date: Sun, 29 Nov 2009 23:19:31 -0600 Subject: [PATCH] Allow passing custom API instance into stream listener. --- tweepy/streaming.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 98d7057..bd871c6 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -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. -- 2.25.1