chore: standardize formatting
This commit is contained in:
parent
e94e5a523c
commit
a0d064be6a
58 changed files with 971 additions and 1673 deletions
|
@ -1,12 +1,12 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
|
||||
module.exports = async function () {
|
||||
const MUSIC_KEY = process.env.API_KEY_LASTFM
|
||||
const url = `http://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',
|
||||
})
|
||||
const albums = await res
|
||||
return albums.topalbums.album
|
||||
const MUSIC_KEY = process.env.API_KEY_LASTFM
|
||||
const url = `http://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',
|
||||
})
|
||||
const albums = await res
|
||||
return albums.topalbums.album
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
|
||||
module.exports = async function () {
|
||||
const MUSIC_KEY = process.env.API_KEY_LASTFM
|
||||
const url = `http://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',
|
||||
})
|
||||
const artists = await res
|
||||
return artists.topartists.artist
|
||||
const MUSIC_KEY = process.env.API_KEY_LASTFM
|
||||
const url = `http://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',
|
||||
})
|
||||
const artists = await res
|
||||
return artists.topartists.artist
|
||||
}
|
||||
|
|
|
@ -2,11 +2,13 @@ const { extract } = require('@extractus/feed-extractor')
|
|||
const { AssetCache } = require('@11ty/eleventy-fetch')
|
||||
|
||||
module.exports = async function () {
|
||||
const url = 'https://oku.club/rss/collection/POaRa'
|
||||
const asset = new AssetCache('books_data')
|
||||
if (asset.isCacheValid('1h')) return await asset.getCachedValue()
|
||||
const res = await extract(url).catch((error) => {})
|
||||
const data = res.entries
|
||||
await asset.save(data, 'json')
|
||||
return data
|
||||
const url = 'https://oku.club/rss/collection/POaRa'
|
||||
const asset = new AssetCache('books_data')
|
||||
if (asset.isCacheValid('1h')) return await asset.getCachedValue()
|
||||
const res = await extract(url).catch((error) => {
|
||||
console.log(error.message)
|
||||
})
|
||||
const data = res.entries
|
||||
await asset.save(data, 'json')
|
||||
return data
|
||||
}
|
||||
|
|
|
@ -2,11 +2,13 @@ const { extract } = require('@extractus/feed-extractor')
|
|||
const { AssetCache } = require('@11ty/eleventy-fetch')
|
||||
|
||||
module.exports = async function () {
|
||||
const url = 'https://letterboxd.com/cdme/rss'
|
||||
const asset = new AssetCache('movies_data')
|
||||
if (asset.isCacheValid('1h')) return await asset.getCachedValue()
|
||||
const res = await extract(url).catch((error) => {})
|
||||
const data = res.entries.splice(0, 5)
|
||||
await asset.save(data, 'json')
|
||||
return data
|
||||
const url = 'https://letterboxd.com/cdme/rss'
|
||||
const asset = new AssetCache('movies_data')
|
||||
if (asset.isCacheValid('1h')) return await asset.getCachedValue()
|
||||
const res = await extract(url).catch((error) => {
|
||||
console.log(error.message)
|
||||
})
|
||||
const data = res.entries.splice(0, 5)
|
||||
await asset.save(data, 'json')
|
||||
return data
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
"name": "Cory Dransfeldt",
|
||||
"url": "https://coryd.dev",
|
||||
"title": "Cory Dransfeldt",
|
||||
"description": "I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 4 rescue dogs, technology, automation, music, writing, reading and tv and movies.",
|
||||
"gmail": "mailto:hi@coryd.dev",
|
||||
"savvycal": "https://savvycal.com/coryd",
|
||||
"github": "https://github.com/cdransf",
|
||||
"mastodon": "https://social.lol/@cory",
|
||||
"glass": "https://glass.photo/coryd",
|
||||
"lastfm": "https://last.fm/user/cdme_",
|
||||
"letterboxd": "https://letterboxd.com/cdme",
|
||||
"trakt": "https://trakt.tv/users/cdransf",
|
||||
"oku": "https://oku.club/user/cory",
|
||||
"coffee": "https://www.buymeacoffee.com/cory"
|
||||
"name": "Cory Dransfeldt",
|
||||
"url": "https://coryd.dev",
|
||||
"title": "Cory Dransfeldt",
|
||||
"description": "I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 4 rescue dogs, technology, automation, music, writing, reading and tv and movies.",
|
||||
"gmail": "mailto:hi@coryd.dev",
|
||||
"savvycal": "https://savvycal.com/coryd",
|
||||
"github": "https://github.com/cdransf",
|
||||
"mastodon": "https://social.lol/@cory",
|
||||
"glass": "https://glass.photo/coryd",
|
||||
"lastfm": "https://last.fm/user/cdme_",
|
||||
"letterboxd": "https://letterboxd.com/cdme",
|
||||
"trakt": "https://trakt.tv/users/cdransf",
|
||||
"oku": "https://oku.club/user/cory",
|
||||
"coffee": "https://www.buymeacoffee.com/cory"
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
|
||||
module.exports = async function () {
|
||||
const url = 'https://api.omg.lol/address/cory/statuses/'
|
||||
const res = EleventyFetch(url, {
|
||||
duration: '1h',
|
||||
type: 'json',
|
||||
})
|
||||
const status = await res
|
||||
return status.response.statuses[0]
|
||||
const url = 'https://api.omg.lol/address/cory/statuses/'
|
||||
const res = EleventyFetch(url, {
|
||||
duration: '1h',
|
||||
type: 'json',
|
||||
})
|
||||
const status = await res
|
||||
return status.response.statuses[0]
|
||||
}
|
||||
|
|
|
@ -2,12 +2,14 @@ const { extract } = require('@extractus/feed-extractor')
|
|||
const { AssetCache } = require('@11ty/eleventy-fetch')
|
||||
|
||||
module.exports = async function () {
|
||||
const TV_KEY = process.env.API_KEY_TRAKT
|
||||
const url = `https://trakt.tv/users/cdransf/history.atom?slurm=${TV_KEY}`
|
||||
const asset = new AssetCache('tv_data')
|
||||
if (asset.isCacheValid('1h')) return await asset.getCachedValue()
|
||||
const res = await extract(url).catch((error) => {})
|
||||
const data = res.entries.splice(0, 5)
|
||||
await asset.save(data, 'json')
|
||||
return data
|
||||
const TV_KEY = process.env.API_KEY_TRAKT
|
||||
const url = `https://trakt.tv/users/cdransf/history.atom?slurm=${TV_KEY}`
|
||||
const asset = new AssetCache('tv_data')
|
||||
if (asset.isCacheValid('1h')) return await asset.getCachedValue()
|
||||
const res = await extract(url).catch((error) => {
|
||||
console.log(error.message)
|
||||
})
|
||||
const data = res.entries.splice(0, 5)
|
||||
await asset.save(data, 'json')
|
||||
return data
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
|
||||
module.exports = async function () {
|
||||
const KEY_CORYD = process.env.API_KEY_WEBMENTIONS_CORYD_DEV
|
||||
const url = `https://webmention.io/api/mentions.jf2?token=${KEY_CORYD}&per-page=1000`
|
||||
const res = EleventyFetch(url, {
|
||||
duration: '1h',
|
||||
type: 'json',
|
||||
})
|
||||
const webmentions = await res
|
||||
return {
|
||||
mentions: webmentions.children,
|
||||
}
|
||||
const KEY_CORYD = process.env.API_KEY_WEBMENTIONS_CORYD_DEV
|
||||
const url = `https://webmention.io/api/mentions.jf2?token=${KEY_CORYD}&per-page=1000`
|
||||
const res = EleventyFetch(url, {
|
||||
duration: '1h',
|
||||
type: 'json',
|
||||
})
|
||||
const webmentions = await res
|
||||
return {
|
||||
mentions: webmentions.children,
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue