Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RockStars Rest API

This is a solution for the Team RockStars Backend assesment

Technologies used:

  • ASP.NET Core 6
  • Entity Framework Core
  • Response caching (for caching)
  • AutoMapper
  • Docker

Software Development Best Practices and Design Principles used:

  • Clean Code
  • CQS
  • Response caching
  • REST API Naming Conventions

Compile the Solution

Via the command line:

  > msbuild RockStars.sln

Visual Studio:

Open the solution and use the shortcut: Ctrl+Shift+B

Running the application:

Visual Studio:

Press the IISExpress Play button.

Docker:

Run following commands in the Solutions folder:

> cd RockStars.API
> docker build -t rockstars .
> docker run -it --rm -p 5000:80 --name core_rockstars rockstars

Deploy manually

Run following commands in the Solutions folder:

> cd RockStars.API
> dotnet publish -c Release -o published
> dotnet published\RockStars.API.dll

Available Routes

Default port: 51044

GET localhost:{ChosenPort}

  • api/artistcollections/{Ids}
  • api/songcollections{Query}
  • api/artists/{artistId}/songs
  • api/artists/{artistId}/songs/{songId}
  • api/artists
  • api/artists/{artistId}
  • api/artists{Query}

POST localhost:{ChosenPort}

Note: Can be used with any of the .json files or objects in the .json file provided artists.json & songs.json as Body.

  • api/artistcollections
  • api/songcollections
  • api/artists/{artistId}/songs
  • api/artists

PUT localhost:{ChosenPort}

  • api/artists/{artistId}/songs/{songId}

DELETE localhost:{ChosenPort}

  • api/artists/{artistId}
  • api/artists/{artistId}/songs/{songId}

PATCH localhost:{ChosenPort}

  • api/artists/{artistId}/songs/{songId}

Example: This example would update the Name of the chosen {songId}

  [
    {
        "op":"replace",
        "path":"/Name",
        "value": "Patch Test Name"
    }
  ]

Testing the Application

1 - Run the application with the method of your choosing.
2 - Use the routes to add artists OR songs parsed as body. (This can be done copying the provided files as JSON Body):

- api/artistcollections
	OR
- api/songcollections

3 - Use the routes to get songs OR artists with the specific filters of your choosing:

- api/songcollections{Query}
	OR
- api/artists{Query}

4 - Use any of the provided routes to test Creation, Deletion & Update functionalities.

About

This is a solution for the Team RockStars Backend assessment

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages