Skip to content

Instantly share code, notes, and snippets.

@RyanHirsch
Created October 12, 2021 15:08
Show Gist options
  • Save RyanHirsch/e2ad99d2cee5075e729e6c199f762836 to your computer and use it in GitHub Desktop.
Save RyanHirsch/e2ad99d2cee5075e729e6c199f762836 to your computer and use it in GitHub Desktop.
Podverse integration
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