/CD_netCore_RApi_Rap_Api

Coding Dojo .netCore and C# fundamentals, RApi assignment.

Primary LanguageC#

CD_netCore_RApi_Rap_Api

Troy Center troycenter1@gmail.com August 2017 Coding Dojo .net Core and C# fundamentals.

RApi, The Rapper Api

Now that we are able to serve back JSON responses to web requests, we can do something interesting. In the previous section we worked with some records for artists and groups when practicing our LINQ knowledge. We are going to use those same collections again, but now we will provide endpoints for various requests for information from these data sets. What we are essentially doing is building our own external API from these collections. For this assignment we will be actively reinforcing our knowledge on LINQ, ASP.NET Core Method routing, and serving back JSON responses. Once again we will also provide a starter project from which to build from which can be downloaded by clicking the button below

Download Assignment Skeleton Ver. 1.1

For this assignment the follow things are required:

  • Create a route for /artists that returns all artists as JSON
  • Create a route /artists/name/{name} that returns all artists that match the provided name
  • Create a route /artists/realname/{name} that returns all artists who real names match the provided name
  • Create a route /artists/hometown/{town} that returns all artists who are from the provided town
  • Create a route /artists/groupid/{id} that returns all artists who have a GroupId that matches id
  • Create a route /groups that returns all groups as JSON
  • Create a route /groups/name/{name} that returns all groups that match the provided name
  • Create a route /groups/id/{id} that returns all groups with the provided Id value
  • (Optional) Add an extra boolean parameter to the group routes called displayArtists that will include members for all Group JSON responses