HugoLAMOUREUX / Spotidata

Web application linked to Spotify that shows some statistics about your music tastes and miscellaneous informations
MIT License
4 stars 5 forks source link

New backend functionnality : GetTopTrends #2

Closed SharkyFlou closed 1 year ago

SharkyFlou commented 1 year ago

Start Date

03/22/2023

Implementation PR

No response

Reference Issues

No response

Summary

Adding a route, and a controller for getting the top trends on the spotify api. To do that we can call the getPlaylistTracks on the spotify playlist of the "Top 50 - Global" https://open.spotify.com/playlist/37i9dQZEVXbMDoHDwVN2tF

Basic Example

The function will be called like that : getTopTrends(string:acces_token){...} And return a JSON looking like this : { Tracks: [ { id: 1, title: "Scared to be lonely", titleId:"6oh6pyBUaJWZbhQKsq0iAm", img: "", artist: "Martin Garrix",artistId:"0Riv2KnFcLZA3JSVryRg4y"}, { id: 1, title: "Scared to be lonely", titleId:"6oh6pyBUaJWZbhQKsq0iAm", img: "", artist: "Martin Garrix",artistId:"0Riv2KnFcLZA3JSVryRg4y" }], Artists: [ { id: 1, img: "", artist: "Martin Garrix",artistId:"0Riv2KnFcLZA3JSVryRg4y"}, { id: 2, img: "", artist: "Martin Garrix",artistId:"0Riv2KnFcLZA3JSVryRg4y" }, ], Albums: [ { id: 1, title: "Montagnes Russes", albumId:"",img: "", artist: "Lujipeka", artistId:""}, ], }

Drawbacks

Would allows to display the global top trends.

Unresolved questions

No response