Skip to content

[Interview] Use Spotify's API to list their featured playlists.

Notifications You must be signed in to change notification settings

danidanimoraes/playlists

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpotIfood

Use Spotify's API to list their featured playlists. Each playlist includes their image, title, owner, description and a link for it on Spotify Web.

It is possible to search playlists by their name. It also features API filter options:

  • Filter by Country
  • Filter by locale (Language)
  • Limit results per page
  • Go to next or previous page, if available

It uses the system's date and time to filter by timestamp and provide playlists relevant to current time.

The API filter available options are consumed by a given API.

Spotify's API is called again every 30 seconds to maintain the results fresh.

Developer's Warning

On the given API mentioned, the country that should represent United States has a value of "en_US", which is the locale. This raises an error 400 on the API. I left as it is instead of correcting it hard-coded because that's what the API provides. But I changed country and locale labels to more user-friendly ones.

Usage

To make the code work, clone it and run

npm install

You should have a client ID and a client secret provided by Spotify. Create a ".env" file on the root of the project and include them, as following:

REACT_APP_PRIVATE_KEY=abcdefgh123

REACT_APP_PUBLIC_KEY=abcdefgh123

Don't change these names. Then, run

npm start

Gh-pages

It is served here: https://danidanimoraes.github.io/playlists/

Images

The landing page, containing featured playlists with their respective links to Spotify

Landing

Filters that can be applied

Filters

Pagination shows Next and Previous page

Pagination

About

[Interview] Use Spotify's API to list their featured playlists.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published