예제 #1
0
 def __init__(self, name, metadata=None):
     Eventualy.__init__(self)
     self.name = name
     if metadata is None:
         metadata = {}
     self.metadata = metadata
     self.roster = set()
     self.twitter_hash_tags = set()
     self.callbacks = {
         'internal.roster.add': lambda event: self.roster.add(event['from']),
         #'internal.roster.delete': lambda event: self.roster.remove(
         #    event['from']),
         'twitter.hashtag.add': lambda event: self.twitter_hash_tags.add(
             event['metadata']['hashtag'])
     }
예제 #2
0
 def __init__(self, name, start=0, end="never", metadata={}):
     Eventualy.__init__(self)
     self.name = name
     self.start = start
     self.end = end
     self.metadata = metadata
     self.roster = set()
     self.twitter_hash_tags = set()
     self.callbacks = {
         'internal.roster.add': lambda event: self.roster.add(event['from']),
         #'internal.roster.delete': lambda event: self.roster.remove(
         #    event['from']),
         'twitter.hashtag.add': lambda event: self.twitter_hash_tags.add(
             event['metadata']['hashtag'])
     }
예제 #3
0
 def __init__(self, name, start=0, end="never", metadata={}):
     Eventualy.__init__(self)
     self.name = name
     self.start = start
     self.end = end
     self.metadata = metadata
     self.roster = set()
     self.twitter_hash_tags = set()
     self.callbacks = {
         'internal.roster.add':
         lambda event: self.roster.add(event['from']),
         #'internal.roster.delete': lambda event: self.roster.remove(
         #    event['from']),
         'twitter.hashtag.add':
         lambda event: self.twitter_hash_tags.add(event['metadata'][
             'hashtag'])
     }
예제 #4
0
 def __init__(self, uce, uid, sid):
     Eventualy.__init__(self)
     self.ucengine = uce
     self.uid = uid
     self.sid = sid