From a5af600f089ad255c24d41e6215c7096b186d215 Mon Sep 17 00:00:00 2001 From: Harmon Date: Sun, 24 Jan 2021 07:38:15 -0600 Subject: [PATCH] Remove StreamListener.api --- tweepy/streaming.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tweepy/streaming.py b/tweepy/streaming.py index a000745..48dd2c8 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -15,7 +15,6 @@ import requests from requests_oauthlib import OAuth1 import urllib3 -from tweepy.api import API from tweepy.error import TweepError from tweepy.models import Status @@ -24,9 +23,6 @@ log = logging.getLogger(__name__) class StreamListener: - def __init__(self, api=None): - self.api = api or API() - def on_connect(self): """Called once connected to streaming server. @@ -62,7 +58,7 @@ class StreamListener: data = json.loads(raw_data) if 'in_reply_to_status_id' in data: - status = Status.parse(self.api, data) + status = Status.parse(None, data) return self.on_status(status) if 'delete' in data: delete = data['delete']['status'] -- 2.25.1