Skip to content

Commit

Permalink
Remove StreamListener.api
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Jan 24, 2021
1 parent e92aaaa commit a5af600
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tweepy/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from requests_oauthlib import OAuth1
import urllib3

from tweepy.api import API
from tweepy.error import TweepError
from tweepy.models import Status

Expand All @@ -24,9 +23,6 @@

class StreamListener:

def __init__(self, api=None):
self.api = api or API()

def on_connect(self):
"""Called once connected to streaming server.
Expand Down Expand Up @@ -62,7 +58,7 @@ def on_data(self, raw_data):
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']
Expand Down

0 comments on commit a5af600

Please sign in to comment.