nleroy917 / spottydata-api

Backend and Web API for spottydata.com
MIT License
7 stars 0 forks source link

New Endpoint: <playlist_id>/analysis/lyrics #11

Open nleroy917 opened 4 years ago

nleroy917 commented 4 years ago

Create a new endpoint to conduct the lyrical analysis fo the songs. This will be utilizing the LyricsGenius project. The idea is to take a track, identify the artist, scrape the lyrics, and then return a JSON object that has each word (or the top few) sung in the songs, with associated counts for each word.

Required Params: Spotify Playlist ID Number Headers: Authorization: <access_token> Route: <playlist_id>/analysis/lyrics Return Type: JSON Object Format: {word1: 40, word2: 19, word3: 87, ... }

This word count object can then be coupled to the tag-cloud package from npm that integrates nicely with React.

nleroy917 commented 4 years ago

Endpoint added with commit 38e829fe403438789ea9e1e534b37db6ed7ba4dd. However, the front-end doesnt want to display the data like I want, so I might need to change the formatting of the return payload from the API. Will keep open for now.

nleroy917 commented 4 years ago

Got front end to display lyrics nicely. It can be slow, however, and I know for a fact it wont hold up if may users are requesting at once - I need to find a better solution.

I found this API/Database that might help me out https://developer.musixmatch.com/documentation/api-reference/track-lyrics-get