Skip to content

Commit

Permalink
Stop extending from Feeds and instantiate them directly instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Enrico B committed Aug 2, 2017
1 parent 73bc132 commit ff68ae7
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 57 deletions.
8 changes: 2 additions & 6 deletions src/data/sources/538.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const Feed = require('./feed');
const types = require('../types');

class FiveThirtyEight extends Feed {
constructor() {
super('https://fivethirtyeight.com/features/feed/', types.FiveThirtyEight);
}
}
const FiveThirtyEight = new Feed('https://fivethirtyeight.com/features/feed/', types.FiveThirtyEight);

module.exports = new FiveThirtyEight();
module.exports = FiveThirtyEight;
6 changes: 1 addition & 5 deletions src/data/sources/av-club.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const Feed = require('./feed');
const types = require('../types');

class AVClub extends Feed {
constructor() {
super('http://www.avclub.com/feeds/rss/', types.AVClub);
}
}
const AVClub = new Feed('http://www.avclub.com/feeds/rss/', types.AVClub)

module.exports = new AVClub();
8 changes: 2 additions & 6 deletions src/data/sources/beta-list.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const Feed = require('./feed');
const types = require('../types');

class BetaList extends Feed {
constructor() {
super('http://feeds.feedburner.com/BetaList', types.BetaList);
}
}
const BetaList = new Feed('http://feeds.feedburner.com/BetaList', types.BetaList);

module.exports = new BetaList();
module.exports = BetaList;
8 changes: 2 additions & 6 deletions src/data/sources/designer-news.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const Feed = require('./feed');
const types = require('../types');

class DesignerNews extends Feed {
constructor() {
super('https://www.designernews.co/?format=rss', types.DesignerNews);
}
}
const DesignerNews = new Feed('https://www.designernews.co/?format=rss', types.DesignerNews);

module.exports = new DesignerNews();
module.exports = DesignerNews;
8 changes: 2 additions & 6 deletions src/data/sources/hacker-noon.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const Feed = require('./feed');
const types = require('../types');

class HackerNoon extends Feed {
constructor() {
super('https://hackernoon.com/feed', types.HackerNoon);
}
}
const HackerNoon = new Feed('https://hackernoon.com/feed', types.HackerNoon);

module.exports = new HackerNoon();
module.exports = HackerNoon;
12 changes: 2 additions & 10 deletions src/data/sources/indie-hackers.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
const Feed = require('./feed');
const types = require('../types');

// All their articles are published at the same time so they'd apprear
// grouped together
// Probably shouldn't use this
const IndieHackers = new Feed('https://www.indiehackers.com/feed.xml', types.IndieHackers);

class IndieHackers extends Feed {
constructor() {
super('https://www.indiehackers.com/feed.xml');
}
}

module.exports = new IndieHackers();
module.exports = IndieHackers;
8 changes: 2 additions & 6 deletions src/data/sources/mac-rumors.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const Feed = require('./feed');
const types = require('../types');

class MacRumors extends Feed {
constructor() {
super('http://feeds.macrumors.com/MacRumors-All', 'mac-rumors', types.MacRumors);
}
}
const MacRumors = new Feed('http://feeds.macrumors.com/MacRumors-All', 'mac-rumors', types.MacRumors);

module.exports = new MacRumors();
module.exports = MacRumors;
8 changes: 2 additions & 6 deletions src/data/sources/product-hunt.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const Feed = require('./feed');
const types = require('../types');

class ProductHunt extends Feed {
constructor() {
super('https://www.producthunt.com/feed', types.ProductHunt);
}
}
const ProductHunt = new Feed('https://www.producthunt.com/feed', types.ProductHunt);

module.exports = new ProductHunt();
module.exports = ProductHunt;
8 changes: 2 additions & 6 deletions src/data/sources/the-outline.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const Feed = require('./feed');
const types = require('../types');

class TheOutline extends Feed {
constructor() {
super('https://theoutline.com/feeds/recent.rss', types.TheOutline);
}
}
const TheOutline = new Feed('https://theoutline.com/feeds/recent.rss', types.TheOutline);

module.exports = new TheOutline();
module.exports = TheOutline;

0 comments on commit ff68ae7

Please sign in to comment.