An Asp.Net Core Web API that provides access to games stored on a Mongo DB local instance.
The different branches I made, describe the different features and stage of work I was on
The entire JSON array collection used in the app, is displayed here:
https://raw.githubusercontent.com/logotie/GamesApi/master/GamesApi/defaultjson.json
Please clone the code and open the solution 'GamesApi.sln' using Visual Studio. I used Visual Studio 2019
There is a project for the API and another project for the XUnit tests.
APIs:
localhost:8080/games/{id}
Displays the game object with the id.
localhost:8080/games/?
Accepts any of the following query strings and returns a list of game objects
- likesGreater - games that have a greater amount of likes than the specified number
- platform - games that are publised on the platform
- publisher - games that were published by a certain company
- publishedAfter - games that were published after a certain epoch time (in seconds)
- minAge - games that have a higher age rating than the specified number
- maxAge - games that are have a lower age rating than the specified number
localhost:8080/games/report
Displays a report similar to https://gist.github.com/divya051988/cfe18cbd24bbeec62eb2444ff55f3c34
On starting the web app:
- The JSON array is converted from JSON into a list of game objects
- The game objects are stored in a local temporary MongoDb instance
- The game objects are exposed via different APIs
External libraries used:
- Microsoft.AspNetCore.App
- Microsoft.AspNetCore.Mvc.Core
- Microsoft.Net.Test.Sdk
- Microsoft.AspNetCore.Razor.Design
- Mongo2Go - Local instance for debugging
- MongoCSharpDriver - Mongo DB driver
- MongoDB.Driver - Mongo DB driver
- Moq - For mocking objects when testing
- Newtonsoft.Json - Json manipulation
- xunit - creating unit tests
- xunit.runner.visualstudio - displaying the unit tests in Visual studio