Key Technologies Needed: Javascript | NodeJS/Express | CSS
PokePlaylist utilizes two APIs to provide users with a custom playlist based on their favorite Pokemon:
- PokeAPI - this API is the leader in collecting information related to the popular game/tv franchise of Pokemon.
- SpotifyAPI - Spotify's API allows developers to perform a variety of tasks related to Spotify songs, playlists, and more.
By combining the efforts of these two tools, PokePlaylist is able to take a user's chosen Pokemon, identify search terms based on PokeAPI results, and locate songs to add to their Spotify playlist.
- Using OAuth 2.0 authentication, PokePlaylist will ask the user to allow Spotify access:
- User enters name of a Pokemon they want a playlist for:
- PokePlaylist will contact PokeAPI for information related to that Pokemon, then present a confirmation screen to the user:
- After confirmation, PokePlaylist will contact Spotify to create a playlist, search for songs based on the Pokemon selected, then add songs to the created playlist. Once complete, the user will be provided the opportunity to go to their Spotify page and see the playlist:
Feel free to borrow this code and play with it yourself! This was an early project of mine, so there's probably ways to improve it.
In order to use PokeAPI and SpotifyAPI, you'll need to check out their documentation for policies and access:
- PokeAPI: https://pokeapi.co/docs/v2
- SpotifyAPI: https://developer.spotify.com/ Note: I've recently discovered that while testing Spotify, you'll be running the app in "developer mode" which means anyone testing your app has to be individually added as an authorized user. See the documentation and developer hub for more details.