diff --git a/.air.toml b/.air.toml new file mode 100644 index 0000000..5f2d84f --- /dev/null +++ b/.air.toml @@ -0,0 +1,46 @@ +root = "." +testdata_dir = "testdata" +tmp_dir = "bin" + +[build] + args_bin = [] + bin = "bin\\app.exe" + cmd = "templ generate && go build -o bin/app.exe cmd/main.go" + delay = 1000 + exclude_dir = ["assets", "bin", "tmp", "vendor", "testdata"] + exclude_file = ["output.html"] + exclude_regex = [".*_templ.go"] + exclude_unchanged = false + follow_symlink = false + full_bin = "" + include_dir = [] + include_ext = ["go", "tpl", "templ", "tmpl", "html", "css"] + include_file = [] + kill_delay = "0s" + log = "build-errors.log" + poll = false + poll_interval = 0 + post_cmd = [] + pre_cmd = [] + rerun = false + rerun_delay = 500 + send_interrupt = false + stop_on_error = false + +[color] + app = "" + build = "yellow" + main = "magenta" + runner = "green" + watcher = "cyan" + +[log] + main_only = false + time = false + +[misc] + clean_on_exit = false + +[screen] + clear_on_rebuild = false + keep_scroll = true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0836636 --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +all: templ + @go build -o bin/app.exe cmd/main.go + @./bin/app.exe + +templ: + @templ generate + +test: + @go test -v ./... + +tailwind: + @tailwind -i view/input.css -o static/output.css --watch + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ace0f63 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# SpotifAI + diff --git a/bin/app.exe b/bin/app.exe new file mode 100644 index 0000000..7533834 Binary files /dev/null and b/bin/app.exe differ diff --git a/bin/build-errors.log b/bin/build-errors.log new file mode 100644 index 0000000..c7ba232 --- /dev/null +++ b/bin/build-errors.log @@ -0,0 +1 @@ +exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1 \ No newline at end of file diff --git a/bruh.html b/bruh.html new file mode 100644 index 0000000..ed2a36c --- /dev/null +++ b/bruh.html @@ -0,0 +1,92 @@ + + + + + Login - Spotify + + + + + + + + +
+
+ + + + + +
+
+ + \ No newline at end of file diff --git a/cmd/main.go b/cmd/main.go new file mode 100644 index 0000000..669ee7f --- /dev/null +++ b/cmd/main.go @@ -0,0 +1,152 @@ +package main + +import ( + "encoding/base64" + "encoding/json" + "fmt" + "io" + "log" + "net/http" + "net/url" + "strings" + + "github.com/JaiiR320/SpotifAI/model" + "github.com/JaiiR320/SpotifAI/view" + "github.com/a-h/templ" + "github.com/labstack/echo/v4" +) + +var client_id = `04c4fff349274db8b607e7a927f2ca5a` +var client_secret = `a97b3bed058d4a1ea4502654bcf554f6` + +func main() { + router := echo.New() + + router.Static("/static", "/static") + + router.GET("/", HandleShowHome) + router.GET("/login", HandleSpotifyAuth) + + router.GET("/callback", HandleSpotifyCallback) + + // scripts.ParsePlaylist("example.json") + + log.Fatal(router.Start(":3000")) +} + +func HandleShowHome(c echo.Context) error { + return Render(c, view.Home()) +} + +func HandleSpotifyAuth(c echo.Context) error { + urlStr := `https://accounts.spotify.com/authorize` + + data := url.Values{} + data.Set("response_type", "code") + data.Set("client_id", client_id) + data.Set("scope", "user-read-private user-library-read") + data.Set("redirect_uri", "http://localhost:3000/callback") + + urlStr = fmt.Sprintf("%s?%s", urlStr, data.Encode()) + + return c.Redirect(http.StatusTemporaryRedirect, urlStr) +} + +func HandleSpotifyCallback(c echo.Context) error { + err := getToken(c) + if err != nil { + return err + } + + err = getUser() + if err != nil { + log.Println("GET USER ", err) + return err + } + + c.QueryParams().Del("code") + + return c.Redirect(http.StatusFound, "/") +} + +type TokenResponse struct { + AccessToken string `json:"access_token"` +} + +func getToken(c echo.Context) error { + code := c.QueryParam("code") + + data := url.Values{} + data.Set("grant_type", "authorization_code") + data.Set("code", code) + data.Set("redirect_uri", "http://localhost:3000/callback") + + req, err := http.NewRequest("POST", "https://accounts.spotify.com/api/token", strings.NewReader(data.Encode())) + if err != nil { + return err + } + + req.Header.Set("Content-Type", "application/x-www-form-urlencoded") + req.Header.Set("Authorization", "Basic "+client_id) + req.Header.Set("Authorization", + "Basic "+base64.StdEncoding.EncodeToString([]byte(client_id+":"+client_secret))) + + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + if err != nil { + return err + } + + var tokenResponse TokenResponse + err = json.Unmarshal(body, &tokenResponse) + if err != nil { + return err + } + + model.AccessToken = tokenResponse.AccessToken + log.Println(model.AccessToken) + return nil +} + +func getUser() error { + req, err := http.NewRequest("GET", "https://api.spotify.com/v1/me", nil) + if err != nil { + return err + } + + req.Header.Set("Authorization", "Bearer "+model.AccessToken) + + client := &http.Client{} + + resp, err := client.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + if err != nil { + return err + } + + var user model.User + + err = json.Unmarshal(body, &user) + + if err != nil { + return err + } + + model.CurrentUser = user + return nil +} + +func Render(c echo.Context, component templ.Component) error { + return component.Render(c.Request().Context(), c.Response()) +} diff --git a/cmd/util.go b/cmd/util.go new file mode 100644 index 0000000..cca6d78 --- /dev/null +++ b/cmd/util.go @@ -0,0 +1,13 @@ +package main + +import ( + "encoding/json" + + "github.com/labstack/echo/v4" +) + +func WriteJSON(c echo.Context, status int, v any) error { + c.Response().Header().Set("Content-Type", "application/json") + c.Response().WriteHeader(status) + return json.NewEncoder(c.Response()).Encode(v) +} diff --git a/example.json b/example.json new file mode 100644 index 0000000..0106a4c --- /dev/null +++ b/example.json @@ -0,0 +1,1810 @@ +{ + "href": "https://api.spotify.com/v1/me/tracks?offset=0&limit=20&locale=en-US,en;q=0.5&market=US", + "items": [ + { + "added_at": "2024-02-05T20:53:00Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/6l3HvQ5sa6mXTsMTB19rO5" + }, + "href": "https://api.spotify.com/v1/artists/6l3HvQ5sa6mXTsMTB19rO5", + "id": "6l3HvQ5sa6mXTsMTB19rO5", + "name": "J. Cole", + "type": "artist", + "uri": "spotify:artist:6l3HvQ5sa6mXTsMTB19rO5" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/0UMMIkurRUmkruZ3KGBLtG" + }, + "href": "https://api.spotify.com/v1/albums/0UMMIkurRUmkruZ3KGBLtG", + "id": "0UMMIkurRUmkruZ3KGBLtG", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b273c6e0948bbb0681ff29cdbae8", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e02c6e0948bbb0681ff29cdbae8", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d00004851c6e0948bbb0681ff29cdbae8", + "width": 64 + } + ], + "is_playable": true, + "name": "2014 Forest Hills Drive", + "release_date": "2014-12-09", + "release_date_precision": "day", + "total_tracks": 13, + "type": "album", + "uri": "spotify:album:0UMMIkurRUmkruZ3KGBLtG" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/6l3HvQ5sa6mXTsMTB19rO5" + }, + "href": "https://api.spotify.com/v1/artists/6l3HvQ5sa6mXTsMTB19rO5", + "id": "6l3HvQ5sa6mXTsMTB19rO5", + "name": "J. Cole", + "type": "artist", + "uri": "spotify:artist:6l3HvQ5sa6mXTsMTB19rO5" + } + ], + "disc_number": 1, + "duration_ms": 242697, + "explicit": true, + "external_ids": { + "isrc": "USQX91402591" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/6LBpGdlukUARutol7VgWIS" + }, + "href": "https://api.spotify.com/v1/tracks/6LBpGdlukUARutol7VgWIS", + "id": "6LBpGdlukUARutol7VgWIS", + "is_local": false, + "is_playable": true, + "name": "January 28th", + "popularity": 71, + "preview_url": "https://p.scdn.co/mp3-preview/621453533d023db4a76680ed6690a8f63f171879?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 2, + "type": "track", + "uri": "spotify:track:6LBpGdlukUARutol7VgWIS" + } + }, + { + "added_at": "2024-02-04T19:08:02Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/6l3HvQ5sa6mXTsMTB19rO5" + }, + "href": "https://api.spotify.com/v1/artists/6l3HvQ5sa6mXTsMTB19rO5", + "id": "6l3HvQ5sa6mXTsMTB19rO5", + "name": "J. Cole", + "type": "artist", + "uri": "spotify:artist:6l3HvQ5sa6mXTsMTB19rO5" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/0UMMIkurRUmkruZ3KGBLtG" + }, + "href": "https://api.spotify.com/v1/albums/0UMMIkurRUmkruZ3KGBLtG", + "id": "0UMMIkurRUmkruZ3KGBLtG", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b273c6e0948bbb0681ff29cdbae8", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e02c6e0948bbb0681ff29cdbae8", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d00004851c6e0948bbb0681ff29cdbae8", + "width": 64 + } + ], + "is_playable": true, + "name": "2014 Forest Hills Drive", + "release_date": "2014-12-09", + "release_date_precision": "day", + "total_tracks": 13, + "type": "album", + "uri": "spotify:album:0UMMIkurRUmkruZ3KGBLtG" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/6l3HvQ5sa6mXTsMTB19rO5" + }, + "href": "https://api.spotify.com/v1/artists/6l3HvQ5sa6mXTsMTB19rO5", + "id": "6l3HvQ5sa6mXTsMTB19rO5", + "name": "J. Cole", + "type": "artist", + "uri": "spotify:artist:6l3HvQ5sa6mXTsMTB19rO5" + } + ], + "disc_number": 1, + "duration_ms": 264213, + "explicit": true, + "external_ids": { + "isrc": "USQX91402593" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/11qa6plS660rrrkf6VJ3cX" + }, + "href": "https://api.spotify.com/v1/tracks/11qa6plS660rrrkf6VJ3cX", + "id": "11qa6plS660rrrkf6VJ3cX", + "is_local": false, + "is_playable": true, + "name": "03’ Adolescence", + "popularity": 67, + "preview_url": "https://p.scdn.co/mp3-preview/f654da06231b6b479f21857a0e341f52112b4191?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 4, + "type": "track", + "uri": "spotify:track:11qa6plS660rrrkf6VJ3cX" + } + }, + { + "added_at": "2024-02-04T08:49:41Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/6l3HvQ5sa6mXTsMTB19rO5" + }, + "href": "https://api.spotify.com/v1/artists/6l3HvQ5sa6mXTsMTB19rO5", + "id": "6l3HvQ5sa6mXTsMTB19rO5", + "name": "J. Cole", + "type": "artist", + "uri": "spotify:artist:6l3HvQ5sa6mXTsMTB19rO5" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/0fhmJYVhW0e4i33pCLPA5i" + }, + "href": "https://api.spotify.com/v1/albums/0fhmJYVhW0e4i33pCLPA5i", + "id": "0fhmJYVhW0e4i33pCLPA5i", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b27399da48a530f6ca2ef86da3cc", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e0299da48a530f6ca2ef86da3cc", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d0000485199da48a530f6ca2ef86da3cc", + "width": 64 + } + ], + "is_playable": true, + "name": "Cole World: The Sideline Story", + "release_date": "2011-09-27", + "release_date_precision": "day", + "total_tracks": 16, + "type": "album", + "uri": "spotify:album:0fhmJYVhW0e4i33pCLPA5i" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/6l3HvQ5sa6mXTsMTB19rO5" + }, + "href": "https://api.spotify.com/v1/artists/6l3HvQ5sa6mXTsMTB19rO5", + "id": "6l3HvQ5sa6mXTsMTB19rO5", + "name": "J. Cole", + "type": "artist", + "uri": "spotify:artist:6l3HvQ5sa6mXTsMTB19rO5" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/2wIVse2owClT7go1WT98tk" + }, + "href": "https://api.spotify.com/v1/artists/2wIVse2owClT7go1WT98tk", + "id": "2wIVse2owClT7go1WT98tk", + "name": "Missy Elliott", + "type": "artist", + "uri": "spotify:artist:2wIVse2owClT7go1WT98tk" + } + ], + "disc_number": 1, + "duration_ms": 190653, + "explicit": true, + "external_ids": { + "isrc": "USQX91101086" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/6Nw1WHydftZy2joT2nTiCR" + }, + "href": "https://api.spotify.com/v1/tracks/6Nw1WHydftZy2joT2nTiCR", + "id": "6Nw1WHydftZy2joT2nTiCR", + "is_local": false, + "is_playable": true, + "name": "Nobody's Perfect", + "popularity": 70, + "preview_url": "https://p.scdn.co/mp3-preview/b69735f66f2d323118ab795885c8743d33fbc5f0?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 11, + "type": "track", + "uri": "spotify:track:6Nw1WHydftZy2joT2nTiCR" + } + }, + { + "added_at": "2024-02-02T22:46:49Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/3hteYQFiMFbJY7wS0xDymP" + }, + "href": "https://api.spotify.com/v1/artists/3hteYQFiMFbJY7wS0xDymP", + "id": "3hteYQFiMFbJY7wS0xDymP", + "name": "Gesaffelstein", + "type": "artist", + "uri": "spotify:artist:3hteYQFiMFbJY7wS0xDymP" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/0JA38Ekhsv43y2lBj5GQkQ" + }, + "href": "https://api.spotify.com/v1/albums/0JA38Ekhsv43y2lBj5GQkQ", + "id": "0JA38Ekhsv43y2lBj5GQkQ", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b2735be1cdff67258e3d1e588e71", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e025be1cdff67258e3d1e588e71", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d000048515be1cdff67258e3d1e588e71", + "width": 64 + } + ], + "is_playable": true, + "name": "Hyperion", + "release_date": "2019-03-08", + "release_date_precision": "day", + "total_tracks": 10, + "type": "album", + "uri": "spotify:album:0JA38Ekhsv43y2lBj5GQkQ" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/3hteYQFiMFbJY7wS0xDymP" + }, + "href": "https://api.spotify.com/v1/artists/3hteYQFiMFbJY7wS0xDymP", + "id": "3hteYQFiMFbJY7wS0xDymP", + "name": "Gesaffelstein", + "type": "artist", + "uri": "spotify:artist:3hteYQFiMFbJY7wS0xDymP" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/1Xyo4u8uXC1ZmMpatF05PJ" + }, + "href": "https://api.spotify.com/v1/artists/1Xyo4u8uXC1ZmMpatF05PJ", + "id": "1Xyo4u8uXC1ZmMpatF05PJ", + "name": "The Weeknd", + "type": "artist", + "uri": "spotify:artist:1Xyo4u8uXC1ZmMpatF05PJ" + } + ], + "disc_number": 1, + "duration_ms": 202093, + "explicit": true, + "external_ids": { + "isrc": "USQX91803314" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/2vXKRlJBXyOcvZYTdNeckS" + }, + "href": "https://api.spotify.com/v1/tracks/2vXKRlJBXyOcvZYTdNeckS", + "id": "2vXKRlJBXyOcvZYTdNeckS", + "is_local": false, + "is_playable": true, + "name": "Lost in the Fire", + "popularity": 86, + "preview_url": "https://p.scdn.co/mp3-preview/d5e5adc04a0da97852782c7c4a49807a3f5a0262?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 3, + "type": "track", + "uri": "spotify:track:2vXKRlJBXyOcvZYTdNeckS" + } + }, + { + "added_at": "2024-02-02T22:30:44Z", + "track": { + "album": { + "album_type": "single", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/5ZS223C6JyBfXasXxrRqOk" + }, + "href": "https://api.spotify.com/v1/artists/5ZS223C6JyBfXasXxrRqOk", + "id": "5ZS223C6JyBfXasXxrRqOk", + "name": "Jhené Aiko", + "type": "artist", + "uri": "spotify:artist:5ZS223C6JyBfXasXxrRqOk" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/0NC1AcoK5y2cBLwzej6tqE" + }, + "href": "https://api.spotify.com/v1/albums/0NC1AcoK5y2cBLwzej6tqE", + "id": "0NC1AcoK5y2cBLwzej6tqE", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b273a71bcd27b13633a3916f219e", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e02a71bcd27b13633a3916f219e", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d00004851a71bcd27b13633a3916f219e", + "width": 64 + } + ], + "is_playable": true, + "name": "P*$$Y Fairy (OTW)", + "release_date": "2020-01-17", + "release_date_precision": "day", + "total_tracks": 1, + "type": "album", + "uri": "spotify:album:0NC1AcoK5y2cBLwzej6tqE" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/5ZS223C6JyBfXasXxrRqOk" + }, + "href": "https://api.spotify.com/v1/artists/5ZS223C6JyBfXasXxrRqOk", + "id": "5ZS223C6JyBfXasXxrRqOk", + "name": "Jhené Aiko", + "type": "artist", + "uri": "spotify:artist:5ZS223C6JyBfXasXxrRqOk" + } + ], + "disc_number": 1, + "duration_ms": 181860, + "explicit": true, + "external_ids": { + "isrc": "USUM72000367" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/48KXAIruJ07kJVCWOGohMV" + }, + "href": "https://api.spotify.com/v1/tracks/48KXAIruJ07kJVCWOGohMV", + "id": "48KXAIruJ07kJVCWOGohMV", + "is_local": false, + "is_playable": true, + "name": "P*$$Y Fairy (OTW)", + "popularity": 71, + "preview_url": "https://p.scdn.co/mp3-preview/8823580e4eb9a076c845e5d42212470739aa34d5?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 1, + "type": "track", + "uri": "spotify:track:48KXAIruJ07kJVCWOGohMV" + } + }, + { + "added_at": "2024-02-02T22:24:31Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/5ZS223C6JyBfXasXxrRqOk" + }, + "href": "https://api.spotify.com/v1/artists/5ZS223C6JyBfXasXxrRqOk", + "id": "5ZS223C6JyBfXasXxrRqOk", + "name": "Jhené Aiko", + "type": "artist", + "uri": "spotify:artist:5ZS223C6JyBfXasXxrRqOk" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/5jlE1zlhT3mEWw0mRpN920" + }, + "href": "https://api.spotify.com/v1/albums/5jlE1zlhT3mEWw0mRpN920", + "id": "5jlE1zlhT3mEWw0mRpN920", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b273b87ac71d440973d20f4c8473", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e02b87ac71d440973d20f4c8473", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d00004851b87ac71d440973d20f4c8473", + "width": 64 + } + ], + "is_playable": true, + "name": "Chilombo", + "release_date": "2020-03-06", + "release_date_precision": "day", + "total_tracks": 20, + "type": "album", + "uri": "spotify:album:5jlE1zlhT3mEWw0mRpN920" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/5ZS223C6JyBfXasXxrRqOk" + }, + "href": "https://api.spotify.com/v1/artists/5ZS223C6JyBfXasXxrRqOk", + "id": "5ZS223C6JyBfXasXxrRqOk", + "name": "Jhené Aiko", + "type": "artist", + "uri": "spotify:artist:5ZS223C6JyBfXasXxrRqOk" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/3Y7RZ31TRPVadSFVy1o8os" + }, + "href": "https://api.spotify.com/v1/artists/3Y7RZ31TRPVadSFVy1o8os", + "id": "3Y7RZ31TRPVadSFVy1o8os", + "name": "H.E.R.", + "type": "artist", + "uri": "spotify:artist:3Y7RZ31TRPVadSFVy1o8os" + } + ], + "disc_number": 1, + "duration_ms": 212866, + "explicit": true, + "external_ids": { + "isrc": "USUM72003259" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/63wx9vdskaXbYxyDx4oJCZ" + }, + "href": "https://api.spotify.com/v1/tracks/63wx9vdskaXbYxyDx4oJCZ", + "id": "63wx9vdskaXbYxyDx4oJCZ", + "is_local": false, + "is_playable": true, + "name": "B.S. (feat. H.E.R.)", + "popularity": 72, + "preview_url": "https://p.scdn.co/mp3-preview/11e6c2f5309329b2b48c41db715f535578647f60?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 5, + "type": "track", + "uri": "spotify:track:63wx9vdskaXbYxyDx4oJCZ" + } + }, + { + "added_at": "2024-02-02T22:24:09Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/5ZS223C6JyBfXasXxrRqOk" + }, + "href": "https://api.spotify.com/v1/artists/5ZS223C6JyBfXasXxrRqOk", + "id": "5ZS223C6JyBfXasXxrRqOk", + "name": "Jhené Aiko", + "type": "artist", + "uri": "spotify:artist:5ZS223C6JyBfXasXxrRqOk" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/7CAAClnSiXdMibPT1oyl4k" + }, + "href": "https://api.spotify.com/v1/albums/7CAAClnSiXdMibPT1oyl4k", + "id": "7CAAClnSiXdMibPT1oyl4k", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b2737ccc8005498d9f75b03333c2", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e027ccc8005498d9f75b03333c2", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d000048517ccc8005498d9f75b03333c2", + "width": 64 + } + ], + "is_playable": true, + "name": "Trip", + "release_date": "2017-09-22", + "release_date_precision": "day", + "total_tracks": 22, + "type": "album", + "uri": "spotify:album:7CAAClnSiXdMibPT1oyl4k" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/5ZS223C6JyBfXasXxrRqOk" + }, + "href": "https://api.spotify.com/v1/artists/5ZS223C6JyBfXasXxrRqOk", + "id": "5ZS223C6JyBfXasXxrRqOk", + "name": "Jhené Aiko", + "type": "artist", + "uri": "spotify:artist:5ZS223C6JyBfXasXxrRqOk" + } + ], + "disc_number": 1, + "duration_ms": 236160, + "explicit": true, + "external_ids": { + "isrc": "USUM71705478" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/4mL59LVbKgOpEACxraGYdr" + }, + "href": "https://api.spotify.com/v1/tracks/4mL59LVbKgOpEACxraGYdr", + "id": "4mL59LVbKgOpEACxraGYdr", + "is_local": false, + "is_playable": true, + "name": "While We're Young", + "popularity": 75, + "preview_url": "https://p.scdn.co/mp3-preview/271b536daecc2ff0ea74f3c8cf357f9a16f70a57?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 3, + "type": "track", + "uri": "spotify:track:4mL59LVbKgOpEACxraGYdr" + } + }, + { + "added_at": "2024-02-02T22:22:14Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/5ZS223C6JyBfXasXxrRqOk" + }, + "href": "https://api.spotify.com/v1/artists/5ZS223C6JyBfXasXxrRqOk", + "id": "5ZS223C6JyBfXasXxrRqOk", + "name": "Jhené Aiko", + "type": "artist", + "uri": "spotify:artist:5ZS223C6JyBfXasXxrRqOk" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/73TNMu44lT0m1h1Nn6Bfiq" + }, + "href": "https://api.spotify.com/v1/albums/73TNMu44lT0m1h1Nn6Bfiq", + "id": "73TNMu44lT0m1h1Nn6Bfiq", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b273a0fa057b8ad3f3c4969f0c97", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e02a0fa057b8ad3f3c4969f0c97", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d00004851a0fa057b8ad3f3c4969f0c97", + "width": 64 + } + ], + "is_playable": true, + "name": "Sail Out", + "release_date": "2013-01-01", + "release_date_precision": "day", + "total_tracks": 7, + "type": "album", + "uri": "spotify:album:73TNMu44lT0m1h1Nn6Bfiq" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/5ZS223C6JyBfXasXxrRqOk" + }, + "href": "https://api.spotify.com/v1/artists/5ZS223C6JyBfXasXxrRqOk", + "id": "5ZS223C6JyBfXasXxrRqOk", + "name": "Jhené Aiko", + "type": "artist", + "uri": "spotify:artist:5ZS223C6JyBfXasXxrRqOk" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/73sIBHcqh3Z3NyqHKZ7FOL" + }, + "href": "https://api.spotify.com/v1/artists/73sIBHcqh3Z3NyqHKZ7FOL", + "id": "73sIBHcqh3Z3NyqHKZ7FOL", + "name": "Childish Gambino", + "type": "artist", + "uri": "spotify:artist:73sIBHcqh3Z3NyqHKZ7FOL" + } + ], + "disc_number": 1, + "duration_ms": 256079, + "explicit": true, + "external_ids": { + "isrc": "USUM71312343" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/5Ck3e6z1bcSCes5gdo0Ddt" + }, + "href": "https://api.spotify.com/v1/tracks/5Ck3e6z1bcSCes5gdo0Ddt", + "id": "5Ck3e6z1bcSCes5gdo0Ddt", + "is_local": false, + "is_playable": true, + "name": "Bed Peace", + "popularity": 79, + "preview_url": "https://p.scdn.co/mp3-preview/50f8eadb0bf7d3512f26fd27a7b27cde1ade01db?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 2, + "type": "track", + "uri": "spotify:track:5Ck3e6z1bcSCes5gdo0Ddt" + } + }, + { + "added_at": "2024-02-01T06:50:30Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/5lJqux7orBlA1QzyiBGti1" + }, + "href": "https://api.spotify.com/v1/albums/5lJqux7orBlA1QzyiBGti1", + "id": "5lJqux7orBlA1QzyiBGti1", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b273548f7ec52da7313de0c5e4a0", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e02548f7ec52da7313de0c5e4a0", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d00004851548f7ec52da7313de0c5e4a0", + "width": 64 + } + ], + "is_playable": true, + "name": "YHLQMDLG", + "release_date": "2020-02-29", + "release_date_precision": "day", + "total_tracks": 20, + "type": "album", + "uri": "spotify:album:5lJqux7orBlA1QzyiBGti1" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/0Q8NcsJwoCbZOHHW63su5S" + }, + "href": "https://api.spotify.com/v1/artists/0Q8NcsJwoCbZOHHW63su5S", + "id": "0Q8NcsJwoCbZOHHW63su5S", + "name": "Mora", + "type": "artist", + "uri": "spotify:artist:0Q8NcsJwoCbZOHHW63su5S" + } + ], + "disc_number": 1, + "duration_ms": 232496, + "explicit": true, + "external_ids": { + "isrc": "QM4TX2030960" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/5J7teKIJGtqVypgYI6sqXj" + }, + "href": "https://api.spotify.com/v1/tracks/5J7teKIJGtqVypgYI6sqXj", + "id": "5J7teKIJGtqVypgYI6sqXj", + "is_local": false, + "is_playable": true, + "name": "Una Vez", + "popularity": 80, + "preview_url": "https://p.scdn.co/mp3-preview/9d629fd859597481c275671317abb1182176f220?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 13, + "type": "track", + "uri": "spotify:track:5J7teKIJGtqVypgYI6sqXj" + } + }, + { + "added_at": "2024-02-01T06:29:04Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/2d9BCZeAAhiZWPpbX9aPCW" + }, + "href": "https://api.spotify.com/v1/albums/2d9BCZeAAhiZWPpbX9aPCW", + "id": "2d9BCZeAAhiZWPpbX9aPCW", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b273005ee342f4eef2cc6e8436ab", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e02005ee342f4eef2cc6e8436ab", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d00004851005ee342f4eef2cc6e8436ab", + "width": 64 + } + ], + "is_playable": true, + "name": "EL ÚLTIMO TOUR DEL MUNDO", + "release_date": "2020-11-27", + "release_date_precision": "day", + "total_tracks": 16, + "type": "album", + "uri": "spotify:album:2d9BCZeAAhiZWPpbX9aPCW" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + } + ], + "disc_number": 1, + "duration_ms": 217768, + "explicit": true, + "external_ids": { + "isrc": "QMFME2066843" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/26QApq0cuO9brJigr0C0W4" + }, + "href": "https://api.spotify.com/v1/tracks/26QApq0cuO9brJigr0C0W4", + "id": "26QApq0cuO9brJigr0C0W4", + "is_local": false, + "is_playable": true, + "name": "HACIENDO QUE ME AMAS", + "popularity": 75, + "preview_url": "https://p.scdn.co/mp3-preview/43df8ff1f39191d9e55648e23c9c3cab4be0cb36?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 8, + "type": "track", + "uri": "spotify:track:26QApq0cuO9brJigr0C0W4" + } + }, + { + "added_at": "2024-02-01T05:46:26Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/5ZS223C6JyBfXasXxrRqOk" + }, + "href": "https://api.spotify.com/v1/artists/5ZS223C6JyBfXasXxrRqOk", + "id": "5ZS223C6JyBfXasXxrRqOk", + "name": "Jhené Aiko", + "type": "artist", + "uri": "spotify:artist:5ZS223C6JyBfXasXxrRqOk" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/73TNMu44lT0m1h1Nn6Bfiq" + }, + "href": "https://api.spotify.com/v1/albums/73TNMu44lT0m1h1Nn6Bfiq", + "id": "73TNMu44lT0m1h1Nn6Bfiq", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b273a0fa057b8ad3f3c4969f0c97", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e02a0fa057b8ad3f3c4969f0c97", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d00004851a0fa057b8ad3f3c4969f0c97", + "width": 64 + } + ], + "is_playable": true, + "name": "Sail Out", + "release_date": "2013-01-01", + "release_date_precision": "day", + "total_tracks": 7, + "type": "album", + "uri": "spotify:album:73TNMu44lT0m1h1Nn6Bfiq" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/5ZS223C6JyBfXasXxrRqOk" + }, + "href": "https://api.spotify.com/v1/artists/5ZS223C6JyBfXasXxrRqOk", + "id": "5ZS223C6JyBfXasXxrRqOk", + "name": "Jhené Aiko", + "type": "artist", + "uri": "spotify:artist:5ZS223C6JyBfXasXxrRqOk" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/2YZyLoL8N0Wb9xBt1NhZWg" + }, + "href": "https://api.spotify.com/v1/artists/2YZyLoL8N0Wb9xBt1NhZWg", + "id": "2YZyLoL8N0Wb9xBt1NhZWg", + "name": "Kendrick Lamar", + "type": "artist", + "uri": "spotify:artist:2YZyLoL8N0Wb9xBt1NhZWg" + } + ], + "disc_number": 1, + "duration_ms": 382760, + "explicit": true, + "external_ids": { + "isrc": "USUM71312344" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/5nkUIVKqOqdpB6ApKgEMkv" + }, + "href": "https://api.spotify.com/v1/tracks/5nkUIVKqOqdpB6ApKgEMkv", + "id": "5nkUIVKqOqdpB6ApKgEMkv", + "is_local": false, + "is_playable": true, + "name": "Stay Ready (What A Life)", + "popularity": 81, + "preview_url": "https://p.scdn.co/mp3-preview/0422233b01e96c740ab79ed11af76ab4a86a5710?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 3, + "type": "track", + "uri": "spotify:track:5nkUIVKqOqdpB6ApKgEMkv" + } + }, + { + "added_at": "2024-01-28T19:11:17Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/1mcTU81TzQhprhouKaTkpq" + }, + "href": "https://api.spotify.com/v1/artists/1mcTU81TzQhprhouKaTkpq", + "id": "1mcTU81TzQhprhouKaTkpq", + "name": "Rauw Alejandro", + "type": "artist", + "uri": "spotify:artist:1mcTU81TzQhprhouKaTkpq" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/6E7Awtyx6opYTbPXx6ApzB" + }, + "href": "https://api.spotify.com/v1/albums/6E7Awtyx6opYTbPXx6ApzB", + "id": "6E7Awtyx6opYTbPXx6ApzB", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b273f79b1ab5cd74db6a2d7c1fda", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e02f79b1ab5cd74db6a2d7c1fda", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d00004851f79b1ab5cd74db6a2d7c1fda", + "width": 64 + } + ], + "is_playable": true, + "name": "PLAYA SATURNO", + "release_date": "2023-07-07", + "release_date_precision": "day", + "total_tracks": 14, + "type": "album", + "uri": "spotify:album:6E7Awtyx6opYTbPXx6ApzB" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/1mcTU81TzQhprhouKaTkpq" + }, + "href": "https://api.spotify.com/v1/artists/1mcTU81TzQhprhouKaTkpq", + "id": "1mcTU81TzQhprhouKaTkpq", + "name": "Rauw Alejandro", + "type": "artist", + "uri": "spotify:artist:1mcTU81TzQhprhouKaTkpq" + } + ], + "disc_number": 1, + "duration_ms": 242819, + "explicit": true, + "external_ids": { + "isrc": "USSD12300293" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/110wwp2SRousmXjvx8zIoI" + }, + "href": "https://api.spotify.com/v1/tracks/110wwp2SRousmXjvx8zIoI", + "id": "110wwp2SRousmXjvx8zIoI", + "is_local": false, + "is_playable": true, + "name": "AL CALLAO'", + "popularity": 78, + "preview_url": "https://p.scdn.co/mp3-preview/460484a67256b48bcde4c5ef5f1cbad9a280b7fd?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 3, + "type": "track", + "uri": "spotify:track:110wwp2SRousmXjvx8zIoI" + } + }, + { + "added_at": "2024-01-23T21:43:40Z", + "track": { + "album": { + "album_type": "single", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4SsVbpTthjScTS7U2hmr1X" + }, + "href": "https://api.spotify.com/v1/artists/4SsVbpTthjScTS7U2hmr1X", + "id": "4SsVbpTthjScTS7U2hmr1X", + "name": "Arcángel", + "type": "artist", + "uri": "spotify:artist:4SsVbpTthjScTS7U2hmr1X" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/12yPsAPzZ5584HxpItKBUn" + }, + "href": "https://api.spotify.com/v1/albums/12yPsAPzZ5584HxpItKBUn", + "id": "12yPsAPzZ5584HxpItKBUn", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b2739bf23abed0a1e730a90d3490", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e029bf23abed0a1e730a90d3490", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d000048519bf23abed0a1e730a90d3490", + "width": 64 + } + ], + "is_playable": true, + "name": "Tu No Vive Asi (feat. Mambo Kingz & DJ Luian)", + "release_date": "2016-09-30", + "release_date_precision": "day", + "total_tracks": 1, + "type": "album", + "uri": "spotify:album:12yPsAPzZ5584HxpItKBUn" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4SsVbpTthjScTS7U2hmr1X" + }, + "href": "https://api.spotify.com/v1/artists/4SsVbpTthjScTS7U2hmr1X", + "id": "4SsVbpTthjScTS7U2hmr1X", + "name": "Arcángel", + "type": "artist", + "uri": "spotify:artist:4SsVbpTthjScTS7U2hmr1X" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/2T1aUibqR2QC2sINIDQOAK" + }, + "href": "https://api.spotify.com/v1/artists/2T1aUibqR2QC2sINIDQOAK", + "id": "2T1aUibqR2QC2sINIDQOAK", + "name": "Mambo Kingz", + "type": "artist", + "uri": "spotify:artist:2T1aUibqR2QC2sINIDQOAK" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/64aJYyrXljOodnUG6jvhRD" + }, + "href": "https://api.spotify.com/v1/artists/64aJYyrXljOodnUG6jvhRD", + "id": "64aJYyrXljOodnUG6jvhRD", + "name": "DJ Luian", + "type": "artist", + "uri": "spotify:artist:64aJYyrXljOodnUG6jvhRD" + } + ], + "disc_number": 1, + "duration_ms": 264000, + "explicit": true, + "external_ids": { + "isrc": "TCACS1630643" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/6NSMQFKgjpQb0KkjMDYIK0" + }, + "href": "https://api.spotify.com/v1/tracks/6NSMQFKgjpQb0KkjMDYIK0", + "id": "6NSMQFKgjpQb0KkjMDYIK0", + "is_local": false, + "is_playable": true, + "name": "Tu No Vive Asi (feat. Mambo Kingz & DJ Luian)", + "popularity": 80, + "preview_url": "https://p.scdn.co/mp3-preview/6b40c25c6775d3104a6ba2ce9a1c184ce70279c3?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 1, + "type": "track", + "uri": "spotify:track:6NSMQFKgjpQb0KkjMDYIK0" + } + }, + { + "added_at": "2024-01-23T21:41:26Z", + "track": { + "album": { + "album_type": "single", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/1i8SpTcr7yvPOmcqrbnVXY" + }, + "href": "https://api.spotify.com/v1/artists/1i8SpTcr7yvPOmcqrbnVXY", + "id": "1i8SpTcr7yvPOmcqrbnVXY", + "name": "Ozuna", + "type": "artist", + "uri": "spotify:artist:1i8SpTcr7yvPOmcqrbnVXY" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/2T1aUibqR2QC2sINIDQOAK" + }, + "href": "https://api.spotify.com/v1/artists/2T1aUibqR2QC2sINIDQOAK", + "id": "2T1aUibqR2QC2sINIDQOAK", + "name": "Mambo Kingz", + "type": "artist", + "uri": "spotify:artist:2T1aUibqR2QC2sINIDQOAK" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/64aJYyrXljOodnUG6jvhRD" + }, + "href": "https://api.spotify.com/v1/artists/64aJYyrXljOodnUG6jvhRD", + "id": "64aJYyrXljOodnUG6jvhRD", + "name": "DJ Luian", + "type": "artist", + "uri": "spotify:artist:64aJYyrXljOodnUG6jvhRD" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/27Exjl2H0oI6X0WCzZd7Bk" + }, + "href": "https://api.spotify.com/v1/albums/27Exjl2H0oI6X0WCzZd7Bk", + "id": "27Exjl2H0oI6X0WCzZd7Bk", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b273bc739e4f39cb4d5c253fcb64", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e02bc739e4f39cb4d5c253fcb64", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d00004851bc739e4f39cb4d5c253fcb64", + "width": 64 + } + ], + "is_playable": true, + "name": "Solita", + "release_date": "2018-01-19", + "release_date_precision": "day", + "total_tracks": 1, + "type": "album", + "uri": "spotify:album:27Exjl2H0oI6X0WCzZd7Bk" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/1i8SpTcr7yvPOmcqrbnVXY" + }, + "href": "https://api.spotify.com/v1/artists/1i8SpTcr7yvPOmcqrbnVXY", + "id": "1i8SpTcr7yvPOmcqrbnVXY", + "name": "Ozuna", + "type": "artist", + "uri": "spotify:artist:1i8SpTcr7yvPOmcqrbnVXY" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/2T1aUibqR2QC2sINIDQOAK" + }, + "href": "https://api.spotify.com/v1/artists/2T1aUibqR2QC2sINIDQOAK", + "id": "2T1aUibqR2QC2sINIDQOAK", + "name": "Mambo Kingz", + "type": "artist", + "uri": "spotify:artist:2T1aUibqR2QC2sINIDQOAK" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/64aJYyrXljOodnUG6jvhRD" + }, + "href": "https://api.spotify.com/v1/artists/64aJYyrXljOodnUG6jvhRD", + "id": "64aJYyrXljOodnUG6jvhRD", + "name": "DJ Luian", + "type": "artist", + "uri": "spotify:artist:64aJYyrXljOodnUG6jvhRD" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/3E6xrwgnVfYCrCs0ePERDz" + }, + "href": "https://api.spotify.com/v1/artists/3E6xrwgnVfYCrCs0ePERDz", + "id": "3E6xrwgnVfYCrCs0ePERDz", + "name": "Wisin", + "type": "artist", + "uri": "spotify:artist:3E6xrwgnVfYCrCs0ePERDz" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/6P6GTRTigHBp8ZesNtpCKH" + }, + "href": "https://api.spotify.com/v1/artists/6P6GTRTigHBp8ZesNtpCKH", + "id": "6P6GTRTigHBp8ZesNtpCKH", + "name": "Almighty", + "type": "artist", + "uri": "spotify:artist:6P6GTRTigHBp8ZesNtpCKH" + } + ], + "disc_number": 1, + "duration_ms": 311726, + "explicit": false, + "external_ids": { + "isrc": "QZ7B81700005" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/7rwX0O3RlxqqIjQM8evm5E" + }, + "href": "https://api.spotify.com/v1/tracks/7rwX0O3RlxqqIjQM8evm5E", + "id": "7rwX0O3RlxqqIjQM8evm5E", + "is_local": false, + "is_playable": true, + "name": "Solita", + "popularity": 76, + "preview_url": "https://p.scdn.co/mp3-preview/8e5d5889595f3b1d06670856cdf97d7727ec504b?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 1, + "type": "track", + "uri": "spotify:track:7rwX0O3RlxqqIjQM8evm5E" + } + }, + { + "added_at": "2024-01-23T21:37:05Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/0GM7qgcRCORpGnfcN2tCiB" + }, + "href": "https://api.spotify.com/v1/artists/0GM7qgcRCORpGnfcN2tCiB", + "id": "0GM7qgcRCORpGnfcN2tCiB", + "name": "Tainy", + "type": "artist", + "uri": "spotify:artist:0GM7qgcRCORpGnfcN2tCiB" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/2X6WyzpxY70eUn3lnewB7d" + }, + "href": "https://api.spotify.com/v1/albums/2X6WyzpxY70eUn3lnewB7d", + "id": "2X6WyzpxY70eUn3lnewB7d", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b273f885fb64a381318a1c9c14e4", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e02f885fb64a381318a1c9c14e4", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d00004851f885fb64a381318a1c9c14e4", + "width": 64 + } + ], + "is_playable": true, + "name": "DATA", + "release_date": "2023-06-29", + "release_date_precision": "day", + "total_tracks": 20, + "type": "album", + "uri": "spotify:album:2X6WyzpxY70eUn3lnewB7d" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/0GM7qgcRCORpGnfcN2tCiB" + }, + "href": "https://api.spotify.com/v1/artists/0GM7qgcRCORpGnfcN2tCiB", + "id": "0GM7qgcRCORpGnfcN2tCiB", + "name": "Tainy", + "type": "artist", + "uri": "spotify:artist:0GM7qgcRCORpGnfcN2tCiB" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + } + ], + "disc_number": 1, + "duration_ms": 232131, + "explicit": true, + "external_ids": { + "isrc": "USA2P2331985" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/46YjJXVXWHlQ21odKktg5e" + }, + "href": "https://api.spotify.com/v1/tracks/46YjJXVXWHlQ21odKktg5e", + "id": "46YjJXVXWHlQ21odKktg5e", + "is_local": false, + "is_playable": true, + "name": "MOJABI GHOST", + "popularity": 84, + "preview_url": "https://p.scdn.co/mp3-preview/a6d8180d52b759c3e3db9aa78e841ffc06e26c17?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 5, + "type": "track", + "uri": "spotify:track:46YjJXVXWHlQ21odKktg5e" + } + }, + { + "added_at": "2024-01-23T20:49:54Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/5XJDexmWFLWOkjOEjOVX3e" + }, + "href": "https://api.spotify.com/v1/artists/5XJDexmWFLWOkjOEjOVX3e", + "id": "5XJDexmWFLWOkjOEjOVX3e", + "name": "Eladio Carrion", + "type": "artist", + "uri": "spotify:artist:5XJDexmWFLWOkjOEjOVX3e" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/2JwUsV3QP7FMWx1Fzt6dHQ" + }, + "href": "https://api.spotify.com/v1/albums/2JwUsV3QP7FMWx1Fzt6dHQ", + "id": "2JwUsV3QP7FMWx1Fzt6dHQ", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b273ff62e603fe8ea1813b4ff5a8", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e02ff62e603fe8ea1813b4ff5a8", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d00004851ff62e603fe8ea1813b4ff5a8", + "width": 64 + } + ], + "is_playable": true, + "name": "Sauce Boyz", + "release_date": "2020-01-31", + "release_date_precision": "day", + "total_tracks": 16, + "type": "album", + "uri": "spotify:album:2JwUsV3QP7FMWx1Fzt6dHQ" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/5XJDexmWFLWOkjOEjOVX3e" + }, + "href": "https://api.spotify.com/v1/artists/5XJDexmWFLWOkjOEjOVX3e", + "id": "5XJDexmWFLWOkjOEjOVX3e", + "name": "Eladio Carrion", + "type": "artist", + "uri": "spotify:artist:5XJDexmWFLWOkjOEjOVX3e" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + } + ], + "disc_number": 1, + "duration_ms": 152960, + "explicit": true, + "external_ids": { + "isrc": "QM6P41995367" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/4jhHaLksdP8DJZzxYAjOSz" + }, + "href": "https://api.spotify.com/v1/tracks/4jhHaLksdP8DJZzxYAjOSz", + "id": "4jhHaLksdP8DJZzxYAjOSz", + "is_local": false, + "is_playable": true, + "name": "Kemba Walker", + "popularity": 77, + "preview_url": "https://p.scdn.co/mp3-preview/673e97c7d6f395adb7cc1556d2b5a675263070bd?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 9, + "type": "track", + "uri": "spotify:track:4jhHaLksdP8DJZzxYAjOSz" + } + }, + { + "added_at": "2024-01-22T04:37:00Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/4FftCsAcXXD1nFO9RFUNFO" + }, + "href": "https://api.spotify.com/v1/albums/4FftCsAcXXD1nFO9RFUNFO", + "id": "4FftCsAcXXD1nFO9RFUNFO", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b2737b1fc51ff3257b5286a1ecec", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e027b1fc51ff3257b5286a1ecec", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d000048517b1fc51ff3257b5286a1ecec", + "width": 64 + } + ], + "is_playable": true, + "name": "nadie sabe lo que va a pasar mañana", + "release_date": "2023-10-13", + "release_date_precision": "day", + "total_tracks": 22, + "type": "album", + "uri": "spotify:album:4FftCsAcXXD1nFO9RFUNFO" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + } + ], + "disc_number": 1, + "duration_ms": 256000, + "explicit": true, + "external_ids": { + "isrc": "QMFME2364195" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/5qzLdvRViHUrRNdkpakG7C" + }, + "href": "https://api.spotify.com/v1/tracks/5qzLdvRViHUrRNdkpakG7C", + "id": "5qzLdvRViHUrRNdkpakG7C", + "is_local": false, + "is_playable": true, + "name": "BATICANO", + "popularity": 76, + "preview_url": "https://p.scdn.co/mp3-preview/13a94ee985fa4a93f9d37feb5491d3c14c44d64f?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 15, + "type": "track", + "uri": "spotify:track:5qzLdvRViHUrRNdkpakG7C" + } + }, + { + "added_at": "2024-01-22T04:36:56Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/4FftCsAcXXD1nFO9RFUNFO" + }, + "href": "https://api.spotify.com/v1/albums/4FftCsAcXXD1nFO9RFUNFO", + "id": "4FftCsAcXXD1nFO9RFUNFO", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b2737b1fc51ff3257b5286a1ecec", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e027b1fc51ff3257b5286a1ecec", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d000048517b1fc51ff3257b5286a1ecec", + "width": 64 + } + ], + "is_playable": true, + "name": "nadie sabe lo que va a pasar mañana", + "release_date": "2023-10-13", + "release_date_precision": "day", + "total_tracks": 22, + "type": "album", + "uri": "spotify:album:4FftCsAcXXD1nFO9RFUNFO" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + } + ], + "disc_number": 1, + "duration_ms": 266171, + "explicit": true, + "external_ids": { + "isrc": "QMFME2364194" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/3mRF0YNsDdFKFnxwg16hSz" + }, + "href": "https://api.spotify.com/v1/tracks/3mRF0YNsDdFKFnxwg16hSz", + "id": "3mRF0YNsDdFKFnxwg16hSz", + "is_local": false, + "is_playable": true, + "name": "VUELVE CANDY B", + "popularity": 76, + "preview_url": "https://p.scdn.co/mp3-preview/b8ee097e2e3bb44b4f7c84ac617132d6b069e404?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 14, + "type": "track", + "uri": "spotify:track:3mRF0YNsDdFKFnxwg16hSz" + } + }, + { + "added_at": "2024-01-22T04:36:48Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/4FftCsAcXXD1nFO9RFUNFO" + }, + "href": "https://api.spotify.com/v1/albums/4FftCsAcXXD1nFO9RFUNFO", + "id": "4FftCsAcXXD1nFO9RFUNFO", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b2737b1fc51ff3257b5286a1ecec", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e027b1fc51ff3257b5286a1ecec", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d000048517b1fc51ff3257b5286a1ecec", + "width": 64 + } + ], + "is_playable": true, + "name": "nadie sabe lo que va a pasar mañana", + "release_date": "2023-10-13", + "release_date_precision": "day", + "total_tracks": 22, + "type": "album", + "uri": "spotify:album:4FftCsAcXXD1nFO9RFUNFO" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + }, + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4aSlfXDn9R60UlbZEboBUy" + }, + "href": "https://api.spotify.com/v1/artists/4aSlfXDn9R60UlbZEboBUy", + "id": "4aSlfXDn9R60UlbZEboBUy", + "name": "YOVNGCHIMI", + "type": "artist", + "uri": "spotify:artist:4aSlfXDn9R60UlbZEboBUy" + } + ], + "disc_number": 1, + "duration_ms": 202635, + "explicit": true, + "external_ids": { + "isrc": "QMFME2364192" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/3TYOH7ta0101NYssoH5GlU" + }, + "href": "https://api.spotify.com/v1/tracks/3TYOH7ta0101NYssoH5GlU", + "id": "3TYOH7ta0101NYssoH5GlU", + "is_local": false, + "is_playable": true, + "name": "MERCEDES CAROTA", + "popularity": 81, + "preview_url": "https://p.scdn.co/mp3-preview/cbf1ce9d83d3f22a728378fe5f16c8ff470950ec?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 12, + "type": "track", + "uri": "spotify:track:3TYOH7ta0101NYssoH5GlU" + } + }, + { + "added_at": "2024-01-22T04:33:12Z", + "track": { + "album": { + "album_type": "album", + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + } + ], + "external_urls": { + "spotify": "https://open.spotify.com/album/4FftCsAcXXD1nFO9RFUNFO" + }, + "href": "https://api.spotify.com/v1/albums/4FftCsAcXXD1nFO9RFUNFO", + "id": "4FftCsAcXXD1nFO9RFUNFO", + "images": [ + { + "height": 640, + "url": "https://i.scdn.co/image/ab67616d0000b2737b1fc51ff3257b5286a1ecec", + "width": 640 + }, + { + "height": 300, + "url": "https://i.scdn.co/image/ab67616d00001e027b1fc51ff3257b5286a1ecec", + "width": 300 + }, + { + "height": 64, + "url": "https://i.scdn.co/image/ab67616d000048517b1fc51ff3257b5286a1ecec", + "width": 64 + } + ], + "is_playable": true, + "name": "nadie sabe lo que va a pasar mañana", + "release_date": "2023-10-13", + "release_date_precision": "day", + "total_tracks": 22, + "type": "album", + "uri": "spotify:album:4FftCsAcXXD1nFO9RFUNFO" + }, + "artists": [ + { + "external_urls": { + "spotify": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X" + }, + "href": "https://api.spotify.com/v1/artists/4q3ewBCX7sLwd24euuV69X", + "id": "4q3ewBCX7sLwd24euuV69X", + "name": "Bad Bunny", + "type": "artist", + "uri": "spotify:artist:4q3ewBCX7sLwd24euuV69X" + } + ], + "disc_number": 1, + "duration_ms": 240773, + "explicit": true, + "external_ids": { + "isrc": "QMFME2364191" + }, + "external_urls": { + "spotify": "https://open.spotify.com/track/3NhstUmrlhaN1M6hP8zMbb" + }, + "href": "https://api.spotify.com/v1/tracks/3NhstUmrlhaN1M6hP8zMbb", + "id": "3NhstUmrlhaN1M6hP8zMbb", + "is_local": false, + "is_playable": true, + "name": "BABY NUEVA", + "popularity": 82, + "preview_url": "https://p.scdn.co/mp3-preview/9355baae7d43a607ecc8e42a24215776c9e33116?cid=f99877953bc142d2aad8e1e5b470893c", + "track_number": 11, + "type": "track", + "uri": "spotify:track:3NhstUmrlhaN1M6hP8zMbb" + } + } + ], + "limit": 20, + "next": "https://api.spotify.com/v1/me/tracks?offset=20&limit=20&locale=en-US,en;q=0.5&market=US", + "offset": 0, + "previous": null, + "total": 901 + } \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..e5dfc95 --- /dev/null +++ b/go.mod @@ -0,0 +1,20 @@ +module github.com/JaiiR320/SpotifAI + +go 1.21.5 + +require ( + github.com/a-h/templ v0.2.543 + github.com/labstack/echo/v4 v4.11.4 +) + +require ( + github.com/labstack/gommon v0.4.2 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/valyala/bytebufferpool v1.0.0 // indirect + github.com/valyala/fasttemplate v1.2.2 // indirect + golang.org/x/crypto v0.17.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..46264fc --- /dev/null +++ b/go.sum @@ -0,0 +1,35 @@ +github.com/a-h/templ v0.2.543 h1:8YyLvyUtf0/IE2nIwZ62Z/m2o2NqwhnMynzOL78Lzbk= +github.com/a-h/templ v0.2.543/go.mod h1:jP908DQCwI08IrnTalhzSEH9WJqG/Q94+EODQcJGFUA= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/labstack/echo/v4 v4.11.4 h1:vDZmA+qNeh1pd/cCkEicDMrjtrnMGQ1QFI9gWN1zGq8= +github.com/labstack/echo/v4 v4.11.4/go.mod h1:noh7EvLwqDsmh/X/HWKPUl1AjzJrhyptRyEbQJfxen8= +github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0= +github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/model/globals.go b/model/globals.go new file mode 100644 index 0000000..5c3369c --- /dev/null +++ b/model/globals.go @@ -0,0 +1,4 @@ +package model + +var AccessToken string +var CurrentUser User diff --git a/model/types.go b/model/types.go new file mode 100644 index 0000000..501d272 --- /dev/null +++ b/model/types.go @@ -0,0 +1,15 @@ +package model + +type User struct { + DisplayName string `json:"display_name"` + ExternalUrls struct { + Spotify string `json:"spotify"` + } `json:"external_urls"` + Href string `json:"href"` + Id string `json:"id"` + Images []struct { + Url string `json:"url"` + Height int `json:"height"` + Width int `json:"width"` + } `json:"images"` +} diff --git a/scripts/getToken.go b/scripts/getToken.go new file mode 100644 index 0000000..c7456d8 --- /dev/null +++ b/scripts/getToken.go @@ -0,0 +1,14 @@ +package scripts + +func GetToken() { +} + +func GetUserAuth() { + // client_id := "" + + // state := 0 + // scope := "user-read-private user-library-read" + + // query := "https://accounts.spotify.com/authorize?" + +} diff --git a/scripts/parsePlaylist.go b/scripts/parsePlaylist.go new file mode 100644 index 0000000..348ef20 --- /dev/null +++ b/scripts/parsePlaylist.go @@ -0,0 +1,47 @@ +package scripts + +import ( + "encoding/json" + "io" + "log" + "os" +) + +type Track struct { + Name string `json:"name"` + Album struct { + Artists []struct { + Name string `json:"name"` + } `json:"artists"` + Name string `json:"name"` + } `json:"album"` +} + +type Item struct { + Track `json:"track"` +} + +type Playlist struct { + Items []Item `json:"items"` +} + +func ParsePlaylist(path string) { + log.Println("Parsing playlist...") + file, err := os.Open(path) + if err != nil { + log.Panic(err) + } + defer file.Close() + + byteValue, _ := io.ReadAll(file) + + var playlist Playlist + json.Unmarshal(byteValue, &playlist) + + for index, item := range playlist.Items { + log.Println(index, " ", item.Track.Name) + for _, artist := range item.Track.Album.Artists { + log.Println(" By: ", artist.Name) + } + } +} diff --git a/static/output.css b/static/output.css new file mode 100644 index 0000000..79c78dc --- /dev/null +++ b/static/output.css @@ -0,0 +1,833 @@ +/* +! tailwindcss v3.4.0 | MIT License | https://tailwindcss.com +*/ + +/* +1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) +2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) +*/ + +*, +::before, +::after { + box-sizing: border-box; + /* 1 */ + border-width: 0; + /* 2 */ + border-style: solid; + /* 2 */ + border-color: #e5e7eb; + /* 2 */ +} + +::before, +::after { + --tw-content: ''; +} + +/* +1. Use a consistent sensible line-height in all browsers. +2. Prevent adjustments of font size after orientation changes in iOS. +3. Use a more readable tab size. +4. Use the user's configured `sans` font-family by default. +5. Use the user's configured `sans` font-feature-settings by default. +6. Use the user's configured `sans` font-variation-settings by default. +7. Disable tap highlights on iOS +*/ + +html, +:host { + line-height: 1.5; + /* 1 */ + -webkit-text-size-adjust: 100%; + /* 2 */ + -moz-tab-size: 4; + /* 3 */ + -o-tab-size: 4; + tab-size: 4; + /* 3 */ + font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + /* 4 */ + font-feature-settings: normal; + /* 5 */ + font-variation-settings: normal; + /* 6 */ + -webkit-tap-highlight-color: transparent; + /* 7 */ +} + +/* +1. Remove the margin in all browsers. +2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. +*/ + +body { + margin: 0; + /* 1 */ + line-height: inherit; + /* 2 */ +} + +/* +1. Add the correct height in Firefox. +2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) +3. Ensure horizontal rules are visible by default. +*/ + +hr { + height: 0; + /* 1 */ + color: inherit; + /* 2 */ + border-top-width: 1px; + /* 3 */ +} + +/* +Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; +} + +/* +Remove the default font size and weight for headings. +*/ + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/* +Reset links to optimize for opt-in styling instead of opt-out. +*/ + +a { + color: inherit; + text-decoration: inherit; +} + +/* +Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/* +1. Use the user's configured `mono` font-family by default. +2. Use the user's configured `mono` font-feature-settings by default. +3. Use the user's configured `mono` font-variation-settings by default. +4. Correct the odd `em` font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + /* 1 */ + font-feature-settings: normal; + /* 2 */ + font-variation-settings: normal; + /* 3 */ + font-size: 1em; + /* 4 */ +} + +/* +Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/* +Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* +1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) +2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +3. Remove gaps between table borders by default. +*/ + +table { + text-indent: 0; + /* 1 */ + border-color: inherit; + /* 2 */ + border-collapse: collapse; + /* 3 */ +} + +/* +1. Change the font styles in all browsers. +2. Remove the margin in Firefox and Safari. +3. Remove default padding in all browsers. +*/ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; + /* 1 */ + font-feature-settings: inherit; + /* 1 */ + font-variation-settings: inherit; + /* 1 */ + font-size: 100%; + /* 1 */ + font-weight: inherit; + /* 1 */ + line-height: inherit; + /* 1 */ + color: inherit; + /* 1 */ + margin: 0; + /* 2 */ + padding: 0; + /* 3 */ +} + +/* +Remove the inheritance of text transform in Edge and Firefox. +*/ + +button, +select { + text-transform: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Remove default button styles. +*/ + +button, +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; + /* 1 */ + background-color: transparent; + /* 2 */ + background-image: none; + /* 2 */ +} + +/* +Use the modern Firefox focus style for all focusable elements. +*/ + +:-moz-focusring { + outline: auto; +} + +/* +Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + +:-moz-ui-invalid { + box-shadow: none; +} + +/* +Add the correct vertical alignment in Chrome and Firefox. +*/ + +progress { + vertical-align: baseline; +} + +/* +Correct the cursor style of increment and decrement buttons in Safari. +*/ + +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +} + +/* +1. Correct the odd appearance in Chrome and Safari. +2. Correct the outline style in Safari. +*/ + +[type='search'] { + -webkit-appearance: textfield; + /* 1 */ + outline-offset: -2px; + /* 2 */ +} + +/* +Remove the inner padding in Chrome and Safari on macOS. +*/ + +::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Change font properties to `inherit` in Safari. +*/ + +::-webkit-file-upload-button { + -webkit-appearance: button; + /* 1 */ + font: inherit; + /* 2 */ +} + +/* +Add the correct display in Chrome and Safari. +*/ + +summary { + display: list-item; +} + +/* +Removes the default spacing and border for appropriate elements. +*/ + +blockquote, +dl, +dd, +h1, +h2, +h3, +h4, +h5, +h6, +hr, +figure, +p, +pre { + margin: 0; +} + +fieldset { + margin: 0; + padding: 0; +} + +legend { + padding: 0; +} + +ol, +ul, +menu { + list-style: none; + margin: 0; + padding: 0; +} + +/* +Reset default styling for dialogs. +*/ + +dialog { + padding: 0; +} + +/* +Prevent resizing textareas horizontally by default. +*/ + +textarea { + resize: vertical; +} + +/* +1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +2. Set the default placeholder color to the user's configured gray 400 color. +*/ + +input::-moz-placeholder, textarea::-moz-placeholder { + opacity: 1; + /* 1 */ + color: #9ca3af; + /* 2 */ +} + +input::placeholder, +textarea::placeholder { + opacity: 1; + /* 1 */ + color: #9ca3af; + /* 2 */ +} + +/* +Set the default cursor for buttons. +*/ + +button, +[role="button"] { + cursor: pointer; +} + +/* +Make sure disabled buttons don't get the pointer cursor. +*/ + +:disabled { + cursor: default; +} + +/* +1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) +2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; + /* 1 */ + vertical-align: middle; + /* 2 */ +} + +/* +Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + +img, +video { + max-width: 100%; + height: auto; +} + +/* Make elements with the HTML hidden attribute stay hidden by default */ + +[hidden] { + display: none; +} + +*, ::before, ::after { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; +} + +::backdrop { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; +} + +.absolute { + position: absolute; +} + +.relative { + position: relative; +} + +.m-2 { + margin: 0.5rem; +} + +.m-auto { + margin: auto; +} + +.mx-2 { + margin-left: 0.5rem; + margin-right: 0.5rem; +} + +.ml-1 { + margin-left: 0.25rem; +} + +.mr-1 { + margin-right: 0.25rem; +} + +.mr-2 { + margin-right: 0.5rem; +} + +.ml-4 { + margin-left: 1rem; +} + +.flex { + display: flex; +} + +.h-12 { + height: 3rem; +} + +.h-full { + height: 100%; +} + +.w-12 { + width: 3rem; +} + +.w-2\/3 { + width: 66.666667%; +} + +.w-auto { + width: auto; +} + +.w-fit { + width: -moz-fit-content; + width: fit-content; +} + +.w-1\/3 { + width: 33.333333%; +} + +.scale-125 { + --tw-scale-x: 1.25; + --tw-scale-y: 1.25; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.scale-150 { + --tw-scale-x: 1.5; + --tw-scale-y: 1.5; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.flex-row { + flex-direction: row; +} + +.flex-col { + flex-direction: column; +} + +.items-center { + align-items: center; +} + +.justify-center { + justify-content: center; +} + +.justify-between { + justify-content: space-between; +} + +.text-nowrap { + text-wrap: nowrap; +} + +.rounded-full { + border-radius: 9999px; +} + +.rounded-xl { + border-radius: 0.75rem; +} + +.bg-black { + --tw-bg-opacity: 1; + background-color: rgb(0 0 0 / var(--tw-bg-opacity)); +} + +.bg-feature { + --tw-bg-opacity: 1; + background-color: rgb(35 35 35 / var(--tw-bg-opacity)); +} + +.bg-panel { + --tw-bg-opacity: 1; + background-color: rgb(18 18 18 / var(--tw-bg-opacity)); +} + +.bg-white { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + +.bg-accent { + --tw-bg-opacity: 1; + background-color: rgb(30 215 95 / var(--tw-bg-opacity)); +} + +.p-2 { + padding: 0.5rem; +} + +.p-6 { + padding: 1.5rem; +} + +.px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; +} + +.px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; +} + +.px-4 { + padding-left: 1rem; + padding-right: 1rem; +} + +.py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} + +.text-center { + text-align: center; +} + +.align-middle { + vertical-align: middle; +} + +.font-sans { + font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; +} + +.text-2xl { + font-size: 1.5rem; + line-height: 2rem; +} + +.text-3xl { + font-size: 1.875rem; + line-height: 2.25rem; +} + +.text-5xl { + font-size: 3rem; + line-height: 1; +} + +.text-xl { + font-size: 1.25rem; + line-height: 1.75rem; +} + +.font-bold { + font-weight: 700; +} + +.text-background { + --tw-text-opacity: 1; + color: rgb(0 0 0 / var(--tw-text-opacity)); +} + +.text-focused { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.text-unfocused { + --tw-text-opacity: 1; + color: rgb(167 167 167 / var(--tw-text-opacity)); +} + +.no-underline { + text-decoration-line: none; +} + +.outline-none { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.transition-transform { + transition-property: transform; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.duration-200 { + transition-duration: 200ms; +} + +.duration-150 { + transition-duration: 150ms; +} + +.ease-in-out { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); +} + +.hover\:scale-110:hover { + --tw-scale-x: 1.1; + --tw-scale-y: 1.1; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.hover\:cursor-pointer:hover { + cursor: pointer; +} + +.hover\:bg-feature:hover { + --tw-bg-opacity: 1; + background-color: rgb(35 35 35 / var(--tw-bg-opacity)); +} + +.hover\:bg-slate-300:hover { + --tw-bg-opacity: 1; + background-color: rgb(203 213 225 / var(--tw-bg-opacity)); +} + +.hover\:bg-accent-hover:hover { + --tw-bg-opacity: 1; + background-color: rgb(17 166 69 / var(--tw-bg-opacity)); +} + +.hover\:p-3:hover { + padding: 0.75rem; +} + +.hover\:p-2:hover { + padding: 0.5rem; +} + +.hover\:p-2\.5:hover { + padding: 0.625rem; +} + +.hover\:transition-all:hover { + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} \ No newline at end of file diff --git a/static/plus.svg b/static/plus.svg new file mode 100644 index 0000000..b8924e6 --- /dev/null +++ b/static/plus.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..ee9f1a0 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,18 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ['./view/**/*.templ'], + theme: { + extend: { + colors: { + 'background': '#000000', + 'panel': '#121212', + 'feature': '#232323', + 'unfocused': '#a7a7a7', + 'focused': '#ffffff', + 'accent': '#1ed75f', + 'accent-hover': '#11a645', + }, + }, + }, + plugins: [], +}; diff --git a/tailwind.exe b/tailwind.exe new file mode 100644 index 0000000..8f7414a Binary files /dev/null and b/tailwind.exe differ diff --git a/temp.html b/temp.html new file mode 100644 index 0000000..d01f779 --- /dev/null +++ b/temp.html @@ -0,0 +1,11 @@ + + + + + + Document + + + + + \ No newline at end of file diff --git a/view/components/addTagForm.templ b/view/components/addTagForm.templ new file mode 100644 index 0000000..01dca33 --- /dev/null +++ b/view/components/addTagForm.templ @@ -0,0 +1,31 @@ +package components + +templ AddTagForm(){ +
+ + +
+} \ No newline at end of file diff --git a/view/components/addTagForm_templ.go b/view/components/addTagForm_templ.go new file mode 100644 index 0000000..8155987 --- /dev/null +++ b/view/components/addTagForm_templ.go @@ -0,0 +1,35 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.543 +package components + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import "context" +import "io" +import "bytes" + +func AddTagForm() templ.Component { + return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) + if !templ_7745c5c3_IsBuffer { + templ_7745c5c3_Buffer = templ.GetBuffer() + defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} diff --git a/view/components/tag.templ b/view/components/tag.templ new file mode 100644 index 0000000..262c386 --- /dev/null +++ b/view/components/tag.templ @@ -0,0 +1,7 @@ +package components + +templ Tag(name string){ +
+ {name} +
+} \ No newline at end of file diff --git a/view/components/tag_templ.go b/view/components/tag_templ.go new file mode 100644 index 0000000..17a6f5d --- /dev/null +++ b/view/components/tag_templ.go @@ -0,0 +1,48 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.543 +package components + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import "context" +import "io" +import "bytes" + +func Tag(name string) templ.Component { + return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) + if !templ_7745c5c3_IsBuffer { + templ_7745c5c3_Buffer = templ.GetBuffer() + defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var2 string + templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(name) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `view\components\tag.templ`, Line: 4, Col: 13} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} diff --git a/view/home.templ b/view/home.templ new file mode 100644 index 0000000..c2e2bc1 --- /dev/null +++ b/view/home.templ @@ -0,0 +1,29 @@ +package view + +import ( + "github.com/JaiiR320/SpotifAI/view/components" + "github.com/JaiiR320/SpotifAI/view/layout" +) + +templ Home(){ + @layout.Base(){ +
+
+
+
Tags
+
+ @components.AddTagForm() +
+
+
+ @components.Tag("New Tag") + @components.Tag("New Tag") + @components.Tag("New Tag") + @components.Tag("New Tag") +
+
+ +
+ } +} \ No newline at end of file diff --git a/view/home_templ.go b/view/home_templ.go new file mode 100644 index 0000000..50f0760 --- /dev/null +++ b/view/home_templ.go @@ -0,0 +1,83 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.543 +package view + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import "context" +import "io" +import "bytes" + +import ( + "github.com/JaiiR320/SpotifAI/view/components" + "github.com/JaiiR320/SpotifAI/view/layout" +) + +func Home() templ.Component { + return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) + if !templ_7745c5c3_IsBuffer { + templ_7745c5c3_Buffer = templ.GetBuffer() + defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var2 := templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) + if !templ_7745c5c3_IsBuffer { + templ_7745c5c3_Buffer = templ.GetBuffer() + defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Tags
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = components.AddTagForm().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = components.Tag("New Tag").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = components.Tag("New Tag").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = components.Tag("New Tag").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = components.Tag("New Tag").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = io.Copy(templ_7745c5c3_W, templ_7745c5c3_Buffer) + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = layout.Base().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} diff --git a/view/input.css b/view/input.css new file mode 100644 index 0000000..bd6213e --- /dev/null +++ b/view/input.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; \ No newline at end of file diff --git a/view/layout/base.templ b/view/layout/base.templ new file mode 100644 index 0000000..6da5289 --- /dev/null +++ b/view/layout/base.templ @@ -0,0 +1,20 @@ +package layout + +templ Base(){ + + + + + + + + SpotifAI") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = Navbar().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} diff --git a/view/layout/navbar.templ b/view/layout/navbar.templ new file mode 100644 index 0000000..8d1e726 --- /dev/null +++ b/view/layout/navbar.templ @@ -0,0 +1,51 @@ +package layout + +import ( + "github.com/JaiiR320/SpotifAI/model" +) + +var imageUrl string +var spotifyUrl string + +func isLogged() bool { + images := model.CurrentUser.Images + if images == nil { + return false + } + imageUrl = images[0].Url + spotifyUrl = model.CurrentUser.ExternalUrls.Spotify + return true +} + +templ loginButton(){ +
+ Login +
+} + +templ userImage(){ +
+
+ Good Evening, +
+
+ { model.CurrentUser.DisplayName } +
+ + User Image + +
+} + +templ Navbar(){ + +} \ No newline at end of file diff --git a/view/layout/navbar_templ.go b/view/layout/navbar_templ.go new file mode 100644 index 0000000..b4683e8 --- /dev/null +++ b/view/layout/navbar_templ.go @@ -0,0 +1,145 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.543 +package layout + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import "context" +import "io" +import "bytes" + +import ( + "github.com/JaiiR320/SpotifAI/model" +) + +var imageUrl string +var spotifyUrl string + +func isLogged() bool { + images := model.CurrentUser.Images + if images == nil { + return false + } + imageUrl = images[0].Url + spotifyUrl = model.CurrentUser.ExternalUrls.Spotify + return true +} + +func loginButton() templ.Component { + return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) + if !templ_7745c5c3_IsBuffer { + templ_7745c5c3_Buffer = templ.GetBuffer() + defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Login
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} + +func userImage() templ.Component { + return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) + if !templ_7745c5c3_IsBuffer { + templ_7745c5c3_Buffer = templ.GetBuffer() + defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Good Evening, \r
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(model.CurrentUser.DisplayName) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `view\layout\navbar.templ`, Line: 31, Col: 34} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
\"User
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} + +func Navbar() templ.Component { + return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) + if !templ_7745c5c3_IsBuffer { + templ_7745c5c3_Buffer = templ.GetBuffer() + defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var5 := templ.GetChildren(ctx) + if templ_7745c5c3_Var5 == nil { + templ_7745c5c3_Var5 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +}