Medium-Feed

A simple utility to get a list of articles for any Medium feed, including the ability to get user feeds, topic feeds, and tag feeds.
Additionally allows for both synchronous & asynchronous usage, and a CORS proxy for local development.

Usage

Initialize a feed:

var mediumFeed = new MediumFeed();
mediumFeed.development = true; //Optionally enable development mode for a CORS proxy

var mediumFeed = new MediumFeed({development: true}); //Enables a CORS proxy for localhost development via options object

Get articles:

mediumFeed.getUserFeed("caden"); //Pass username of the feed you want
mediumFeed.getTopicFeed("technology"); //Pass topic (see: https://medium.com/topics)
mediumFeed.getTagFeed("reactjs"); //Pass a specific tag

Asynchronous:

function alertCount(articles){alert(articles.length)} // function to print # of articles returned
mediumFeed.getUserFeed("caden", alertCount); //Pass a callback as second param

MediumArticle:

The MediumFeed functions return arrays of "MediumArticle" objects which contain the following (if available):
class MediumArticle {
  title //String
  link //String
  creator //String
  pubDate //Date
  content //String
  categories //Array of Strings
}