Skip to content

raphaelbluteau/cashback

Repository files navigation

Cashback API using Spotify Web API

Build Status Coverage Status BCH compliance

This Spring Boot API collects some data from Spotify Web API and provides endpoints to sell albums and calculate cashback over every operation.

To build and run the project, use Gradle:

gradlew bootRun

If you feel the need to run this application without hitting Spotify API for test purposes, you can use the mock profile:

gradlew bootRun -Dspring.profiles.active=mock

You can also run the project in a Docker container:

gradlew docker
docker run -p 8080:8080 com.github.raphaelbluteau/cashback

Endpoints usage examples:

Getting albums by genre

GET /albums?genre=ROCK& size=10& page=1 HTTP/1.1

Host: localhost:8080

Content-Type: application/json

cache-control: no-cache

Postman-Token: 40550238-841f-4cc8-85a0-3d38960de3c6

Getting album by id

GET /albums/545 HTTP/1.1

Host: localhost:8080

cache-control: no-cache

Selling albums (album ids required)

POST /orders HTTP/1.1

Host: localhost:8080

Content-Type: application/json

cache-control: no-cache

[

{

	"id": 696
	
}

]

Getting order by id

GET /orders/321 HTTP/1.1

Host: localhost:8080

cache-control: no-cache

Getting orders by period

GET /orders?begin=2019-01-01T01:30:00.000-02:00& end=2019-02-10T10:59:00.000-02:00& size=1& page=1 HTTP/1.1

Host: localhost:8080

cache-control: no-cache

About

Example of Spring Boot application that collects albums from Spotify Web API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors