ILikeToasts-Sonder

Albums page

alt text

What is it?

This page will list all of my favorite albums. There is a maximum of 8 albums per page. The user can also filter the albums based on albums genres and scroll through the different pages.

The user can also click on an album cover which will redirect them to the page of the specific album.

External APIs used

Album’s page

Let’s take Mac Miller’s Circles album as an example : alt text

The page contains three sections from left to right :

Details :

To add an album

To add an album to the database, I have to look for it’s Spotify unique ID which you can find either on the Spotify web app or the Spotify Desktop app.

Here is an example : alt text

https://open.spotify.com/album/5sY6UIQ32GqwMLAfSNEaXb?si=e6wnnyuyTom3r3atceq5Cg

In this case, the unique ID is : 5sY6UIQ32GqwMLAfSNEaXb

I then have a Swagger page where I paste the Spotify unique ID which triggers my import_album endpoint.

Here are some other endpoints that I use for albums :

alt text

How it works on the technical side

Right now when adding an album here are the different things happening in the background :

  1. Retrieve the songs, album’s cover, artists info (name, follower count, popularity, profile picture) from the Spotify Web API
  2. Call the album, artist and track endpoints of lastFM to retrieve additional information about each of these. (Summaries, Genres)
  3. Create the different objects in the database. (Album, Songs, Artists, Genres)