const async = require('async');
const integrate = require('./integrate');

const FEEDS = {
  "bbc-rss": {
    "worldNews": "http://feeds.bbci.co.uk/news/world/us_and_canada/rss.xml",
  },
  "reddit-rss": {
    "frontPage": "https://www.reddit.com/.rss",
    "subreddit": "https://www.reddit.com/r/{subreddit}/.rss",
  }
}

async.parallel(Object.keys(FEEDS).map(key => {
  let ops = FEEDS[key];
  return acb => {
    integrate({
      name: key,
      rss: ops,
    }, acb)
  }
}), err => {
  if (err) throw err;
})

@@ -188,130 +188,1112 @@
 %0A  %22
-reddit-rss%22: %7B%0A    %22frontPage%22: %22https://www.reddit.com/.rss%22,%0A    %22subreddit%22: %22https://www.reddit.com/r/%7Bsubreddit%7D/.rss
+nytimes-rss%22: %7B%0A    %22homePage%22: %22http://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml%22,%0A    %22world%22: %22http://rss.nytimes.com/services/xml/rss/nyt/World.xml%22,%0A    %22business%22: %22http://rss.nytimes.com/services/xml/rss/nyt/Business.xml%22,%0A    %22sports%22: %22http://rss.nytimes.com/services/xml/rss/nyt/Sports.xml%22,%0A    %22science%22: %22http://rss.nytimes.com/services/xml/rss/nyt/Science.xml%22,%0A  %7D,%0A  %22reddit-rss%22: %7B%0A    %22frontPage%22: %22https://www.reddit.com/.rss%22,%0A    %22subreddit%22: %22https://www.reddit.com/r/%7Bsubreddit%7D/.rss%22,%0A  %7D,%0A  %22cnn-rss%22: %7B%0A    %22topStories%22: %22http://rss.cnn.com/rss/cnn_topstories.rss%22,%0A    %22world%22: %22http://rss.cnn.com/rss/cnn_world.rss%22,%0A    %22politics%22: %22http://rss.cnn.com/rss/cnn_allpolitics.rss%22,%0A    %22business%22: %22http://rss.cnn.com/rss/money_latest.rss%22,%0A  %7D,%0A  %22npr-rss%22: %7B%0A    %22news%22: %22http://www.npr.org/rss/rss.php?id=1001%22,%0A  %7D,%0A  %22bbc-rss%22: %7B%0A    %22topStories%22: %22http://feeds.bbci.co.uk/news/rss.xml%22,%0A    %22world%22: %22http://feeds.bbci.co.uk/news/world/rss.xml%22,%0A    %22uk%22: %22http://feeds.bbci.co.uk/news/uk/rss.xml%22,%0A    %22technology%22: %22http://feeds.bbci.co.uk/news/technology/rss.xml
 %22,%0A 

add more rss integrations