From: Harmon Date: Sun, 24 Jan 2021 13:38:15 +0000 (-0600) Subject: Remove StreamListener.api X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a5af600f089ad255c24d41e6215c7096b186d215;p=tweepy.git Remove StreamListener.api --- 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']