
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
A wrapper for the api of https://news.ycombinator.com also known as Hackernews
A wrapper for the hackernews api (https://news.ycombinator.com), to get the stories, links and more
GetNewStories()
, GetTopStories()
and GetBestStories()
you get Id-Lists, containing the storiesGetNewStoriesWithDetails()
, GetTopStoriesWithDetails()
and GetBestStoriesWithDetails()
you get Story-lists, which contain the stories and their dataHackernewsClient hnc = new();
/*
* Get the New-, Top- and Beststories as Id-Lists, you can then use GetNewStoryDetails,
* GetTopStoryDetails or GetBestStoryDetails to get the data of certain stories
*/
List<long> NewStories = await hnc.GetNewStories();
List<long> TopStories = await hnc.GetTopStories();
List<long> BestStories = await hnc.GetBestStories();
/*
* But you can also use GetNewStoriesWithDetails, GetTopStoriesWithDetails or
* GetBestStoriesWithDetails to get stories as Story-Lists containing everything
* Also using the TimeAsDate-method, you can get the Unixtime converted to a DateTime-object
*/
List<Story> NewStoriesWithDetails = await hnc.GetNewStoriesWithDetails();
Console.WriteLine($"New-DateTime: {NewStoriesWithDetails[0].TimeAsDate().ToString("dd.MM.yyyy HH:mm")}");
List<Story> TopStoriesWithDetails = await hnc.GetTopStoriesWithDetails();
Console.WriteLine($"Top-DateTime: {TopStoriesWithDetails[0].TimeAsDate().ToString("dd.MM.yyyy HH:mm")}");
List<Story> BestStoriesWithDetails = await hnc.GetBestStoriesWithDetails();
Console.WriteLine($"Best-DateTime: {BestStoriesWithDetails[0].TimeAsDate().ToString("dd.MM.yyyy HH:mm")}");
Console.WriteLine("\nTop-Stories:");
TopStoriesWithDetails.ForEach(stt => Console.WriteLine($"{stt}\n"));
Console.WriteLine("\nNew-Stories:");
NewStoriesWithDetails.ForEach(stn => Console.WriteLine($"{stn}\n"));
Console.WriteLine("\nBest-Stories:");
BestStoriesWithDetails.ForEach(stb => Console.WriteLine($"{stb}\n"));
I'm citing the HackerNews-GitHub account here "There is currently no rate limit." - https://github.com/HackerNews/API#uri-and-versioning
Currently this wrapper does not differentiate between Stories, Jobs, Polls or anything, I will implement this but for now theoretically a story under New, Top or Best could also be a poll or job-posting rather than an story and therefore the data might not be accurate.
Software: HackernewsNet
The api and data belongs to YCombinator! - liebki (me) or this project isn’t endorsed by YCombinator and doesn’t reflect the views or opinions of YCombinator or anyone officially involved in managing it.
FAQs
A wrapper for the api of https://news.ycombinator.com also known as Hackernews
We found that hackernewsnet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.