def print_followers(channel, count_following=None, limit=None, direction=None, return_lines=None, **kwargs): __set_caching(**kwargs) direction = direction or 'DESC' c = Channel.get(channel) for f in c.list_followers(direction=direction.upper(), limit=limit): u = f.user d = [ u.name, channel, to_timestamp(u.created_at), to_timestamp(f.created_at), subtime(u.created_at, f.created_at), 0, ] if count_following: d.append(u.count_following()) if return_lines: return d tab_print(*d)
def print_following(channel, count_following=None, limit=None, direction=None, return_lines=None, **kwargs): __set_caching(**kwargs) direction = direction or 'DESC' u = User.get(channel) if count_following: following = u.count_following() for f in u.list_following(direction=direction.upper(), limit=limit): c = f.channel d = [ u.name, c.name, to_timestamp(u.created_at), to_timestamp(f.created_at), subtime(u.created_at, f.created_at), c.followers, ] if count_following: d.append(following) if return_lines: return d tab_print(*d)
def loots_streams(channel=None, limit=None, direction=None, **kwargs): __assert_args(channel) __set_caching(**kwargs) channel = Channel.get(channel) for stream in channel.loots_streams(limit=limit, direction=direction): tab_print(stream.t_start, stream.t_end)
def following(channel=None, **kwargs): __assert_args(channel) __set_caching(**kwargs) channel = User(name=channel) tab_print(channel.name, channel.count_following())
def created(channel=None, **kwargs): __assert_args(channel) __set_caching(**kwargs) channel = Channel.get(channel) tab_print(channel.name, to_timestamp(channel.created_at))
def followers(channel=None, **kwargs): __assert_args(channel) __set_caching(**kwargs) channel = Channel.get(channel) tab_print(channel.name, channel.followers)