Skip to content

edsondiasalves/hackernewsapi

Repository files navigation

Open in Gitpod

.NET Core Coverage Status

This is the HackerNewsApi

The hacker new api, is a service that returns the last news from https://news.ycombinator.com/

How to run the app

- mkdir hackernewsapi
- git clone https://github.com/edsondiasalves/hackernewsapi.git
- dotnet run --project hackernewsapi/hackernewsapi.csproj 

How to run the unit tests

- dotnet test

How to get the data

- curl GET 'http://localhost:5000/hackernews'

Cache

The default request use in memory cache to avoid get again the same stories, to disable it use: - curl GET 'http://localhost:5000/hackernews' --header 'DisableCache: true'

For cache cleaning - curl GET 'http://localhost:5000/clean'

Changelog

Check the Changelog file to see how I evolved the code since the beginner, there is a few tagged version and a short description

Next features

There is a bunch of features and good practices to enhance the service, I will add them as soon as posible, the main improvement points are:

  • Global exception handler: Implement a single point of treatment for exceptions (Global Filter)

  • Input validation: Implement a single point for treat mandatory fields in the request

About

A dotnet core web api that gest data from hackernewsapi using C# best practices

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages