karan/HackerNewsAPI — pull request #28 by ueg1990 (2014-03-09 18:03:49+00:00)
Title: Added functionality to get leaders in the Hacker News table

Was reading and understanding the code and thought it was useful to pull request something simple first. This pull request gets the leaders in the HackerNews table from https://news.ycombinator.com/leaders. Right now i return a list of the top leaders in the HackerNews table (with a default limit of 10). If you find this useful, i can added more functions to get information from the following link: https://news.ycombinator.com/lists
This will allow your API to get the best links, most active discussions, best comments, submissions from new accounts and comments from new accounts.
As you will see in the code, i defined a function to get the leaders of the Hacker News table that returns a list of the results where each index is a list containing rank, user, total points, and average. If this structure is accepted, i can use it to define functions to get the remaining stats. Let me know what you think :)

Aside: In my code, when importing libraries, i had to remove the . from constants and utils as i was not able to compile otherwise if it works for you, then you can added the . back