A command line utility that pulls the top posts.
hackernews was built in .net core 2.1, therefore .net core will need to be install, version 2.1 or higher which can be found here
- Navigate to the solution folder, open a command line and run
dotnet build
- To run the code from the framwork, run
dotnet run -- --posts <p>
(the first--
escapes args sent to the dotnet runtime) - Alternatively, build an executable by running
dotnet publish -c Release -r <rid>
, then navigate to build directory and runhackernews --posts <p>
(RIDs can be found here
- System.CommandLine - To help handle CLI parameters
- NewtonSoft.Json - To handle JSON serialization
- Unit Tests aren't exhaustive, but cover the general functionality of the code and (hopefully) illustrate logic behind a more complete coverage.