Commit 9a959513 authored by kjwon15's avatar kjwon15
Browse files

Handling message "friends" on streaming.

parent c9a7ba3d
......@@ -58,6 +58,9 @@ class StreamListener(object):
status = Status.parse(self.api, data)
if self.on_direct_message(status) is False:
return False
elif 'friends' in data:
if self.on_friends(data['friends']) is False:
return False
elif 'limit' in data:
if self.on_limit(data['limit']['track']) is False:
return False
......@@ -87,6 +90,13 @@ class StreamListener(object):
"""Called when a new direct message arrives"""
return
def on_friends(self, friends):
"""Called when a friends list arrives.
friends is a list that contains user_id
"""
return
def on_limit(self, track):
"""Called when a limitation notice arrvies"""
return
......
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