Skip to content

Instantly share code, notes, and snippets.

@dannyrb
Last active May 16, 2018 00:50
Show Gist options
  • Save dannyrb/d9422517f78f1d79728f28174ce789f9 to your computer and use it in GitHub Desktop.
Save dannyrb/d9422517f78f1d79728f28174ce789f9 to your computer and use it in GitHub Desktop.
Quick way to retrieve a Medium.com RSS feed as JSON
import axios from "axios";
async function getMediumFeed() {
try {
const mediumRssFeed = "https://medium.com/feed/coffee-driven-dev";
const rssToJsonApi = "https://api.rss2json.com/v1/api.json";
const data = { params: { rss_url: mediumRssFeed } };
return await axios.get(rssToJsonApi, data);
} catch (error) {
console.error(error);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment