def comment_word(time_period): # Retrieve highest-frequency words used in comments from specified Hacker # News scrapes ('hour', 'day', 'week', 'all'); optional count query param # specifies number of highest-frequency words to return if request.method == 'GET': return hacker_news.get_most_frequent_comment_words( hacker_news.get_feeds(time_period))
def user_most_words(time_period): # Retrieve users with most words in comments from specified Hacker News # scrapes ('hour', 'day', 'week', 'all'); optional count query param # specifies number of users to return if request.method == 'GET': return hacker_news.get_users_with_most_words_in_comments( hacker_news.get_feeds(time_period))
def highest_word_count(time_period): # Retrieve comments with highest word counts from specified Hacker News # scrapes ('hour', 'day', 'week', 'all'); optional count query param # specifies number of comments to return if request.method == 'GET': return hacker_news.get_comments_with_highest_word_counts( hacker_news.get_feeds(time_period))
def user_most_posts(time_period): # Retrieve users with most posts from specified Hacker News scrapes # ('hour', 'day', 'week', 'all'); optional count query param specifies # number of users to return if request.method == 'GET': return hacker_news.get_users_with_most_posts( hacker_news.get_feeds(time_period))
def title_word(time_period): # Retrieve highest frequency word useds in post titles from specified # Hacker News scrapes ('hour', 'day', 'week', 'all'); optional count query # param specifies number of words to return if request.method == 'GET': return hacker_news.get_most_frequent_title_words( hacker_news.get_feeds(time_period))
def deepest_comment_tree(time_period): # Retrieve deepest comment tree from specified Hacker News scrapes ('hour', # 'day', 'week', 'all') if request.method == 'GET': return hacker_news.get_deepest_comment_tree( hacker_news.get_feeds(time_period))
def average_point_count(time_period): # Retrieve average point count from specified Hacker News scrapes ('hour', # 'day', 'week', 'all') if request.method == 'GET': return hacker_news.get_average_point_count(hacker_news.get_feeds( time_period))
def average_word_count(time_period): # Retrieve average comment word count from specified Hacker News scrapes # ('hour', 'day', 'week', 'all') if request.method == 'GET': return hacker_news.get_average_comment_word_count( hacker_news.get_feeds(time_period))
def top_website(time_period): # Retrieve top websites that posts were posted from from specified Hacker # News scrapes ('hour', 'day', 'week', 'all'); optional count query param # specifies number of websites to return if request.method == 'GET': return hacker_news.get_top_websites(hacker_news.get_feeds(time_period))
def top_posts(time_period): # Retrieve top ranked posts from specified Hacker News scrapes ('hour', # 'day', 'week', 'all'); optional count query param specifies number of # posts to return if request.method == 'GET': return hacker_news.get_top_posts(hacker_news.get_feeds(time_period))
def post_types(time_period): # Retrieve count of each type of post from specified Hacker News scrapes # ('hour', 'day', 'week', 'all') if request.method == 'GET': return hacker_news.get_post_types(hacker_news.get_feeds(time_period))