Skip to content

Tool for getting hacker news posts via the command line

Notifications You must be signed in to change notification settings

RobAntcliff/HackerNewsCLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HackerNewsCLI

This is a command line program that gets hacker news posts and returns them in this string JSON Format

[
  {
    "Title": "Tips from Poland on Old-School Zero Waste (2019)",
    "Uri": "https://culture.pl/en/article/tips-from-poland-on-old-school-zero-waste",
    "Author": "ericdanielski",
    "Points": "60",
    "comments": "42",
    "rank": "1"
  }
]

Dependencies:

How to Run:

  • Make sure you have the dependencies above installed
  • Clone the repo into a local folder on your PC
  • Open the folder with Visual Studio Code
  • If it says "Required assets to build and debug are missing. Add them?", click Yes
  • Open the command line termminal. Terminal -> New Terminal
  • Make sure you're in the HackerNewsConsole directory in the terminal
  • Run the program using the command dotnet run --posts 10 and that will give you the first 10 posts on hacker news in the console.

-To Run tests, go to the HackerNewsConsoleTests directory in the terminal and run dotnet tests

TODO:

  • Write more tests using Moq so that I don't have to make requests when Unit testing. https://github.com/Moq/moq4/wiki/Quickstart
  • Setup with docker. It would be great if Windows didn't require you to have Windows 10 Pro to download the Docker Decktop app though.

About

Tool for getting hacker news posts via the command line

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages