Created
October 12, 2021 15:08
-
-
Save RyanHirsch/e2ad99d2cee5075e729e6c199f762836 to your computer and use it in GitHub Desktop.
Podverse integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pt = parseFeed(result.feedResponse); | |
/** Compatibility function to align partytime output with existing podverse item format */ | |
const itemCompat = (episode) => { | |
const { | |
author, | |
description, | |
duration, | |
enclosure, | |
explicit, | |
guid, | |
summary, | |
pubDate, | |
image, | |
title, | |
link, | |
} = episode; | |
return { | |
author: [author], | |
imageURL: image, | |
funding: [], | |
soundbite: [], | |
transcript: [], | |
value: null, | |
link, | |
explicit, | |
description, | |
duration, | |
enclosure, | |
title, | |
guid, | |
pubDate, | |
summary, | |
}; | |
}; | |
const episodes = pt.items.map(itemCompat); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment