Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Build stage
FROM maven:3.9.8-eclipse-temurin-17 AS build
WORKDIR /app

COPY pom.xml .
COPY src ./src


RUN mvn clean package -DskipTests


FROM eclipse-temurin:17-jre
WORKDIR /app


COPY --from=build /app/target/*.jar app.jar


ENTRYPOINT ["java", "-jar", "app.jar"]
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,19 @@ This is the most recent coverage in the repository. The marked endpoints may not
- - [x] Get a User's Profile


# 🐳 Docker Setup Guide

This project supports Docker, allowing the Java application to run in a containerized environment.

---

## 📦 1. Build the Docker Image
docker build -t spotify-web-api-wrapper .

## 🚀 2. Run the Docker Container
docker run -it --rm -p 8080:8080 spotify-web-api-wrapper

## 🐳 3. Optional: Using Docker Compose
docker compose up --build
## 🐳 4.Stop the application:
docker compose down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: "3.8"
services:
app:
build: .
container_name: spotify-wrapper
ports:
- "8080:8080"
environment:
- JAVA_OPTS=-Xms512m -Xmx1g
8 changes: 8 additions & 0 deletions target/classes/log4j.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
log4j.rootLogger=TRACE, A1

log4j.appender.A1=org.apache.log4j.ConsoleAppender

log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

log4j.logger.spotify=INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"error": "invalid_client",
"error_description": "Invalid client"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"access_token": "taHZ2SdB-bPA3FsK3D7ZN5npZS47cMy-IEySVEGttOhXmqaVAIo0ESvTCLjLBifhHOHOIuhFUKPW1WMDP7w6dj3MAZdWT8CLI2MkZaXbYLTeoDvXesf2eeiLYPBGdx8tIwQJKgV8XdnzH_DONk",
"token_type": "Bearer",
"scope": "user-read-birthdate user-read-email",
"expires_in": 3600,
"refresh_token": "b0KuPuLw77Z0hQhCsK-GTHoEx_kethtn357V7iqwEpCTIsLgqbBC_vQBTGC6M5rINl0FrqHK-D3cbOsMOlfyVKuQPvpyGcLcxAoLOTpYXc28nVwB7iBq2oKj9G9lHkFOUKn"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"access_token": "taHZ2SdB-bPA3FsK3D7ZN5npZS47cMy-IEySVEGttOhXmqaVAIo0ESvTCLjLBifhHOHOIuhFUKPW1WMDP7w6dj3MAZdWT8CLI2MkZaXbYLTeoDvXesf2eeiLYPBGdx8tIwQJKgV8XdnzH_DONk",
"token_type": "Bearer",
"scope": "user-read-birthdate user-read-email",
"expires_in": 3600
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"access_token": "9Cysa896KySJLrEcasloD1Gufy9iSq7Wa-K2SbSKwK3rXfizi4GwIS2RCrBmCMsKfkTDm82ez9m47WZ8egFCuRPs4BgEHw",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "PoO04alC_uRJoyd2MLhN53hHv2-sDAJs5mULPPzLW0lgdXXAvZAWEJrBqqd6NfCE4FZo7TcuKXp4grmE-9fKyMaP6zl6g",
"scope": "user-follow-modify"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"access_token": "taHZ2SdB-bPA3FsK3D7ZN5npZS47cMy-IEySVEGttOhXmqaVAIo0ESvTCLjLBifhHOHOIuhFUKPW1WMDP7w6dj3MAZdWT8CLI2MkZaXbYLTeoDvXesf2eeiLYPBGdx8tIwQJKgV8XdnzH_DONk",
"token_type": "Bearer",
"expires_in": 3600
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
{
"album_type": "album",
"artists": [
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY"
},
"href": "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY",
"id": "2BTZIqw0ntH9MvilQ3ewNY",
"name": "Cyndi Lauper",
"type": "artist",
"uri": "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY"
}
],
"available_markets": [
"AD",
"AR",
"AT",
"AU",
"BE",
"BG",
"BO",
"BR",
"CA",
"CH",
"CL",
"CO",
"CR",
"CY",
"CZ",
"DE",
"DK",
"DO",
"EC",
"EE",
"ES",
"FI",
"FR",
"GB",
"GR",
"GT",
"HK",
"HN",
"HU",
"IE",
"IS",
"IT",
"LI",
"LT",
"LU",
"LV",
"MC",
"MT",
"MX",
"MY",
"NI",
"NL",
"NO",
"NZ",
"PA",
"PE",
"PH",
"PT",
"PY",
"RO",
"SE",
"SG",
"SI",
"SK",
"SV",
"TW",
"UY"
],
"copyrights": [
{
"text": "(P) 2000 Sony Music Entertainment Inc.",
"type": "P"
}
],
"external_ids": {
"upc": "5099749994324"
},
"external_urls": {
"spotify": "https://open.spotify.com/album/0sNOF9WDwhWunNAHPD3Baj"
},
"genres": [],
"href": "https://api.spotify.com/v1/albums/0sNOF9WDwhWunNAHPD3Baj",
"id": "0sNOF9WDwhWunNAHPD3Baj",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/07c323340e03e25a8e5dd5b9a8ec72b69c50089d",
"width": 640
},
{
"height": 300,
"url": "https://i.scdn.co/image/8b662d81966a0ec40dc10563807696a8479cd48b",
"width": 300
},
{
"height": 64,
"url": "https://i.scdn.co/image/54b3222c8aaa77890d1ac37b3aaaa1fc9ba630ae",
"width": 64
}
],
"name": "She's So Unusual",
"popularity": 39,
"release_date": "1983",
"release_date_precision": "year",
"tracks": {
"href": "https://api.spotify.com/v1/albums/0sNOF9WDwhWunNAHPD3Baj/tracks?offset=0&limit=50",
"items": [
{
"artists": [
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY"
},
"href": "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY",
"id": "2BTZIqw0ntH9MvilQ3ewNY",
"name": "Cyndi Lauper",
"type": "artist",
"uri": "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY"
}
],
"available_markets": [
"AD",
"AR",
"AT",
"AU",
"BE",
"BG",
"BO",
"BR",
"CA",
"CH",
"CL",
"CO",
"CR",
"CY",
"CZ",
"DE",
"DK",
"DO",
"EC",
"EE",
"ES",
"FI",
"FR",
"GB",
"GR",
"GT",
"HK",
"HN",
"HU",
"IE",
"IS",
"IT",
"LI",
"LT",
"LU",
"LV",
"MC",
"MT",
"MX",
"MY",
"NI",
"NL",
"NO",
"NZ",
"PA",
"PE",
"PH",
"PT",
"PY",
"RO",
"SE",
"SG",
"SI",
"SK",
"SV",
"TW",
"UY"
],
"disc_number": 1,
"duration_ms": 305560,
"explicit": false,
"external_urls": {
"spotify": "https://open.spotify.com/track/3f9zqUnrnIq0LANhmnaF0V"
},
"href": "https://api.spotify.com/v1/tracks/3f9zqUnrnIq0LANhmnaF0V",
"id": "3f9zqUnrnIq0LANhmnaF0V",
"name": "Money Changes Everything",
"preview_url": "https://p.scdn.co/mp3-preview/01bb2a6c9a89c05a4300aea427241b1719a26b06",
"track_number": 1,
"type": "track",
"uri": "spotify:track:3f9zqUnrnIq0LANhmnaF0V"
}
],
"limit": 50,
"next": null,
"offset": 0,
"previous": null,
"total": 13
},
"type": "album",
"uri": "spotify:album:0sNOF9WDwhWunNAHPD3Baj"
}
Loading