From 65b49e8e0e7168fa9606d03766020a9c08db6795 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Tue, 20 Jun 2023 19:23:51 -0700 Subject: [PATCH] feat: drop last.fm data files --- src/_data/albums.js | 12 ------------ src/_data/artists.js | 12 ------------ 2 files changed, 24 deletions(-) delete mode 100644 src/_data/albums.js delete mode 100644 src/_data/artists.js diff --git a/src/_data/albums.js b/src/_data/albums.js deleted file mode 100644 index 1763947d..00000000 --- a/src/_data/albums.js +++ /dev/null @@ -1,12 +0,0 @@ -const EleventyFetch = require('@11ty/eleventy-fetch') - -module.exports = async function () { - const MUSIC_KEY = process.env.API_KEY_LASTFM - const url = `https://ws.audioscrobbler.com/2.0/?method=user.gettopalbums&user=cdme_&api_key=${MUSIC_KEY}&limit=8&format=json&period=7day` - const res = EleventyFetch(url, { - duration: '1h', - type: 'json', - }).catch() - const albums = await res - return albums['topalbums'].album -} diff --git a/src/_data/artists.js b/src/_data/artists.js deleted file mode 100644 index 5751760f..00000000 --- a/src/_data/artists.js +++ /dev/null @@ -1,12 +0,0 @@ -const EleventyFetch = require('@11ty/eleventy-fetch') - -module.exports = async function () { - const MUSIC_KEY = process.env.API_KEY_LASTFM - const url = `https://ws.audioscrobbler.com/2.0/?method=user.gettopartists&user=cdme_&api_key=${MUSIC_KEY}&limit=8&format=json&period=7day` - const res = EleventyFetch(url, { - duration: '1h', - type: 'json', - }).catch() - const artists = await res - return artists['topartists'].artist -}