A web application providing access to numbers of bike thefts reported in selected cities/areas.
dotnet build
dotnet test
dotnet run --project '.\src\WebUi\WebUi.csproj'
- Make a PR!
-
I was unsure whether the requirement was to show statistics for all candidate locations at the same time (in a table) or whether it was required one by one (selected by a dropdown). I took the decision to use a dropdown as it was simpler, however I've left abstractions in place that will make it easy to change this.
-
I noticed while looking at the responses from the target API in Postman that it returns a 'Total' header so that a client knows how many results are available and thus how many pages exist for this query. As the requirement was only to show the number of thefts, we only need get page 1 and get the Total header value rather than page through all the results. Again, abstractions are in place to allow this to be changed easily.
-
I extracted an Exception type for the Bikewise API but I have not specifically caught it; if it's thrown during a request to the API, the user will simply be bounced to the site-wide exception page.
- Extract a value type for Location so it's not just a string.