jesperancinha / rockstars-manager

This simple project is a website to manage Rockstars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rockstars Manager


Twitter URL Generic badge GitHub License

RSM Build, Test, Coverage and Report RSM Build on PR

Codacy Badge

Codacy Badge Coverage Status codecov

GitHub language count GitHub top language GitHub top language


Introduction

---- Under Construction ----

This application is a Rockstars manager

Stable releases

RESTfull requests

GET Requests

  • Get artist by name
curl http://localhost:8080/rockstars/artists/200
curl http://localhost:8080/rockstars/artists/filter/name/3%20Doors%20Down
  • Get song by name
curl http://localhost:8080/rockstars/songs/1901
curl http://localhost:8080/rockstars/songs/filter/name/666

POST requests

  • Post artist
curl -H "Content-Type: application/json" -X POST --data "{\"Name\": \"Ariana Grande\"}" http://localhost:8080/rockstars/artists
  • Post song
curl -H "Content-Type: application/json" -X POST --data "{\"Name\": \"God is a woman\",\"Year\": 2018,\"Artist\": \"Ariana Grande\", \"Shortname\": \"godisawoman\",\"Bpm\": 145,\"Duration\": 197000,\"Genre\": \"Pop\",\"Album\": \"Sweetener\"}" http://localhost:8080/rockstars/artists

PUT requests

  • Put artist
curl -H "Content-Type: application/json" -X PUT --data "{\"Name\": \"Ariana Grande\"}" http://localhost:8080/rockstars/artists/200
  • Put song
curl -H "Content-Type: application/json" -X PUT --data "{\"Name\": \"God is a woman\",\"Year\": 2018,\"Artist\": \"Ariana Grande\", \"Shortname\": \"godisawoman\",\"Bpm\": 145,\"Duration\": 197000,\"Genre\": \"Pop\",\"Album\": \"Sweetener\"}" http://localhost:8080/rockstars/songs/1901

DELETE requests

  • Delete artist
curl -X DELETE http://localhost:8080/rockstars/artists/200
  • Delete
curl -X DELETE http://localhost:8080/rockstars/songs/1901

OAUTH

curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=password&username=jofisaes@gmail.com&password=123&client_id=rockstars-client&client_secret=rockstars&scope=read&redirect_uri=http://localhost:8080/oauth" http://localhost:8080/rockstars/oauth/token
curl -H "Authorization: Bearer TOKEN" http://localhost:8080/rockstars/artists/200

Running everything

Please have docker desktop running. Finally run:

./build.sh

References

About me

alt text GitHub followers Generic badge Generic badge Generic badge

About

This simple project is a website to manage Rockstars

License:Apache License 2.0


Languages

Language:Kotlin 94.4%Language:Shell 3.5%Language:Dockerfile 1.1%Language:Gherkin 0.8%Language:Makefile 0.1%