chore: drop unused data; simplify music name
This commit is contained in:
parent
67bd7fb798
commit
cd09c2735c
3 changed files with 4 additions and 24 deletions
|
@ -1,20 +0,0 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
|
||||
module.exports = async function () {
|
||||
const APPLE_BEARER = process.env.API_BEARER_APPLE_MUSIC
|
||||
const APPLE_TOKEN = process.env.API_TOKEN_APPLE_MUSIC
|
||||
const url = `https://api.music.apple.com/v1/me/history/heavy-rotation`
|
||||
const res = EleventyFetch(url, {
|
||||
duration: '1h',
|
||||
type: 'json',
|
||||
fetchOptions: {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${APPLE_BEARER}`,
|
||||
'music-user-token': `${APPLE_TOKEN}`,
|
||||
},
|
||||
},
|
||||
}).catch()
|
||||
const rotation = await res
|
||||
return rotation.data
|
||||
}
|
Reference in a new issue